Spit
FIRE
Innotech Systems Inc.
Page 7
PROGRAMMING INTERFACE DESCRIPTION
The Spit
FIRE
is controlled via a full-duplex bi-directional asynchronous
serial interface operating at 2400 baud, 8 data bits, with no parity. A host
CPU can manipulate the Spit
FIRE
by writing commands in the form of
simulated button presses to it. The Spit
FIRE
will respond by returning
status information for every command.
To maintain flow control, the Spit
FIRE
will not return a status response
byte until it has processed the previous command.
The command byte consists of 7 scancode bits and one button-pressed bit.
Command byte to Spit
FIRE
D7
D6
D5
D4
D3
D2
D1
D0
Button
pressed
Scan Code
This gives a maximum capacity of 128 buttons. The
button pressed bit
has
several purposes.
‚
It provides a way to hold down a button for an arbitrarily long
period of time.
‚
It provides a flow control mechanism between the two asynchron-
ous processors. Some commands are executed very quickly (10s of
microseconds) and some are quite slow (100s of milliseconds).
‚
It provides a way to distinguish two consecutive identical button
presses.
Commands are sent to the Spit
FIRE
in the form of “virtual” keypad
scancodes. The 7 LSBs of the command are the scancode. This gives the
system 128 virtual buttons that can be “pressed.” Of these 128 buttons the
Spit
FIRE
uses a subset to represent the buttons on a typical remote control.
After the Spit
FIRE
has received and acted on a command it will return a
status byte. The status byte tells the host processor how the previous
scancode was dealt with. It also tells the system that it can send another
command. The details of the status byte are covered later in this document.
The Spit
FIRE
can be configured to transmit IR messages indefinitely, or it
can be instructed to transmit an IR message a fixed number of times and
Spit
FIRE
Innotech Systems Inc.
Page 8
then stop. When sending an indefinite length IR message, a ‘
transmitting IR
now’
status message is returned at the start of a transmission. Subsequently,
when a button release command is sent, the Spit
FIRE
completes the current
transmission and then it returns the appropriate status.
Special scancodes are available to tell the Spit
FIRE
to transmit IR message
until told to stop, or to send messages a fixed number of times. The auto-
repeat range is from 1 to 8 messages. A setting of 0 tells the Spit
FIRE
to
send the message continuously until the button is released.
When the transmit N times feature is used, the Spit
FIRE
will not return a
status byte until the IR transmission is completely sent (N times) so that the
system knows that the transmission is complete.
The following is a list of scancodes that a system can send to the Spit
FIRE
.
Codes are in hexadecimal and do
not
include the button-pressed bit.
Scan Codes
Code
Code
Function
Notes
0
00h
#0
1
01h
#1
2
02h
#2
3
03h
#3
4
04h
#4
5
05h
#5
6
06h
#6
7
07h
#7
8
08h
#8
9
09h
#9
10
0Ah
ENTER
11
0Bh
MUTE
12
0Ch
VOL+
13
0Dh
VOL-
14
0Eh
CH+
15
0Fh
CH-
16
10h
REWIND
17
11h
PLAY
18
12h
FF
19
13h
RECORD
20
14h
STOP
21
15h
PAUSE