Innotech Systems SpitFIRE III User Manual

Page 6

Advertising
background image

Version 1.0

Preliminary

6

Using the SpitFIRE virtual remote control application

The remote control application software, will display an image of a remote control.
Clicking on any button with the mouse will press that button. The Spitfire comes
preprogrammed to control a typical Sony TV. The CBL/SAT, DVD, VCR, AUD,
and AUX slots are empty. The on-screen LED will flash appropriately and a status
box will interpret and display messages received back from the SpitFIRE.

Customizing the Display

The appearance of the remote control is determined by the file buttons.txt, which
is installed in the SpitFIRE directory. During startup, the program reads the
contents of buttons.txt. This file contains information about the button label, button
scancode, and appearance of each button on the remote. Buttons.txt can be
modified with any text editor, so the user can customize the look and function of
the remote to suit their needs.

Buttons.txt is organized into 64 text lines, for each of 64 possible buttons, starting
from the top left of the remote and reading across. Each line consists of 3 fields
separated by commas.

1. Field one is the button label which appears as text on the button.

2. Field two is the 1-byte scancode, The scancode represents a specific button

in the IR library. (see the button mapping table)

3. Field three is a visibility tag, either 1 (visible) or 0 (invisible) allowing

unused buttons may be hidden.

The included "buttons.bak" file can be renamed to "buttons.txt" to show all

the buttons available on the remote. However, depending on the device being controlled, not all buttons
may be functional.

Developers-Note2:

Communications between the SpitFIRE and the program is simple. When the user presses a button

on screen, the program first finds that button’s associated scancode from an array. This array is
constructed at startup as the program reads the contents of the "buttons.txt" file. Each scancode is
represented by an integer. The program then converts that integer to a byte, sets the button down bit,(data
bit 7) and sends that to the SpitFIRE hardware through the serial port.

The ActiveX control MSComm is used, making it easy to write routines that transmit data to and

from the serial ports. The SpitFIRE communicates at 2400 baud, 8 data bits, 1 stop bit, no parity. After the
SpitFIRE hardware receives a scancode from the serial port, it returns a status byte. The program receives
and acts based upon the type of status byte, which may indicate the number of times to flash the visible
LED, the success or failure of a programming operation, etc. This is accomplished through IF-ELSE and
CASE statements. As the source code demonstrates, Visual Basic's tools simplify the task of writing fully
functional programs to control the SpitFIRE. Feel free to examine the included source files for Visual Basic
5.0:
CONTROL.BAS, CONTROL.FRM, CONTROL.FRX, CONTROL.VBP, CONTROL.VBW

To load the entire project into Visual Basic, open the “SpitFIRE control.vbp” file.

Advertising