
93
Chapter 5, How to Hack a Furby (and Other Talking Toys)
Some of these are cleared by hardware after interrupting. When the inter-
rupt occurs, the CPU will jump to the location shown. You need to write
the code to handle that interrupt and place it at that address. If the code is
more than a few bytes, you will need to put a jump instruction in the vector
and put the interrupt service routine somewhere else where there is room.
See the following table:
Input device Priority Interrupt vectors to
External 0 1 0x0003
Timer 0 2 0x000B
External 1 3 0x0013
Timer 1 4 0x001B
PCA interrupt 5 0x0033
Serial port (PC) 6 0x0023
Timer 2 7 0x002B
The last instruction in your interrupt service routine is always “RET” to
return to whatever was happening when the interrupt arrived (that’s why it
is called an “interrupt”). More specific information can be found on page
19 of the Phillips P89C51 data sheet.
Project Demo
Your new Furby hardware should now be up and running. All you have to
do is code some simple (or complex) Furby applications. The web site http://
www.appspec.net/index.html has a few examples from which to start.
Extensions
Not only can you change the vocabulary and voice of the Furby, you can
use the sensors in interesting ways. You could, for example, turn the Furby
into a simple motion-sensing alarm system that spouts off amusing phrases
when it sees movement.
Extensions
ch05_furby.indd 93 ...