Programming interface description – Innotech Systems SpitFIRE II User Manual
Page 9
SpitFIRE
Innotech Systems Inc.
Page 9
PROGRAMMING INTERFACE DESCRIPTION
The SpitFIRE 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 SpitFIRE by writing
commands in the form of simulated button presses
to it. The SpitFIRE will respond by returning
status information for every command.
To maintain flow control, the SpitFIRE 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.
D7, 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 asynchronous
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.
When D7 is set, the SpitFIRE recognizes that a
button is pressed. D7 is cleared when a button is
released. When a command is given as described
below, the SpitFIRE will respond with the same
press/release state via the status byte. (See Status
Byte Format).
Commands are sent to the SpitFIRE in the form
of keypad scancodes (or “virtual key presses”).
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 SpitFIRE
uses a subset to represent the buttons on a typical
remote control.
After the SpitFIRE 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 SpitFIRE can be configured to transmit IR
messages indefinitely, or it can be instructed to
transmit an IR message a fixed number of times
and then stop. When sending an indefinite length
IR message, a ‘transmitting IR now’ status
message is returned at the start of a transmission.