User's Manual
Lotek Biotracker Receiver User’s Manual Page 19
Using the serial port
The receiver should be connected to a PC via its serial port (RS232, or ‘COMM’ Port) then
switched on and set to Frequency or Channel Mode. The PC sends messages to it via this
serial link, and the receiver replies. If the message is a command, the receiver replies
with “OK” (as an ASCII code), whereas if the message is a query, the receiver sends data
corresponding to the query type (i.e. frequency, channel number or gain). The command
and query formats are detailed below. Serial to USB converters are available (with their
own installation software) for computers with no serial port.
Commands
sf###.####x Set Frequency
Sets the receiver to Frequency Mode and to the frequency
‘###.####’, which must be a number in the range 138.0000 to
173.9999. The data are in ASCII format and are usually sent as a
string. For example, if the frequency to be set is 150.1234 MHz,
the string “sf150.1234x” would be sent to the PC serial port. The
receiver will respond by returning ASCII “OK” to the host PC.
sc##x Set Channel
Sets the receiver to Channel Mode and to channel ‘##’, which must
be a two byte hex number corresponding to the wanted channel in
the range 0000h (0) to 0100h (256). The left byte (sent first) is the
least significant byte (LSB) and the right byte is the most significant
byte (MSB). Usually the data are sent as the ASCII characters
represented by the numbers. For example, if the desired channel is
256, the two byte number will be 0100h (the hex equivalent of
decimal 256). The LSB (00h), should be sent first, and the MSB
(01h) second. Using a BASIC programming language, such as MS
Visual Basic, the message sent to the serial port would be “sc” &
CHR(0) & CHR(1) & “x”. The receiver will respond by returning
ASCII “OK” to the host PC.
sg#x Set Gain
Sets the gain level of the receiver, where # is a 1 byte number
corresponding to the gain level setting and can be in the range 00h
(0) to 63h (99). As explained above for channel setting, the data
byte is usually sent as the ASCII character represented by it. The
receiver will respond by returning ASCII “OK” to the host PC.
Queries
qfx Query Frequency
The receiver transmits its current frequency setting via the serial
link to the host PC in the format ###.#### where # are ASCII
numeric characters representing the frequency e.g. “150.1234”
qcx Query Channel
The receiver transmits its current channel setting via the serial link
to the host PC in the format ## ,where ## is a 2 byte number
corresponding to the channel and can be in the range 0000h (0) to
0100h (256). The byte sent first is the LSB followed by the MSB.
e.g. 01h 00h is channel 1.
qgx Query Gain
The receiver transmits its current gain level via the serial link to the
host PC in the format # ,where # is a 1 byte number corresponding
to the gain level setting and can be in the range 00h (0) to 63h
(99).