Page
22
RS
‐
232/485
RF
Modem
Product
Manual
–
MAN0782
‐
02
Binary Commands
Sending and receiving register values using binary commands is the fastest way to change the
operating parameters of the RS-232/485 RF Modem. Binary commands are used most often to
sample signal strength (RS register) and/or error counts; or change modem addresses and
channels for polling systems. Since the sending and receiving register values takes place through
the same serial data path as 'live' data (received RF payload), interference between the two can
be a concern.
Common questions about using binary command mode:
•
What are the implications of asserting CMD in any of the various states while live data is
being sent or received?
•
Specifically, is there a minimum time delay after serial data is sent before which we can
assert CMD and send a command?
•
Is a delay required after CMD is de-asserted before we can send normal data?
•
How can we know if data being received is the return from a command or live data?
•
The application does not allow control over when data is received, except by waiting for
dead time between bursts of communication.
Answers: The CMD line (GPI1) can be asserted to send a command to the radio anytime during
transmission or reception of data. Note that the status of the CMD signal is only checked at the
end of the stop bit as the byte is shifted into the serial port. If the command is sent in the middle
of a stream of payload data to be transmitted, the command will essentially be executed in the
order it is received. If the radio is continuously receiving data, the radio will wait for a break in
the received data before executing the command. The
signal will frame the response coming
from the binary command request [see graphic below].
The CMD pin must be asserted in order to send binary commands to an RS-232/485 Modem. The
CMD pin can be asserted to recognize commands anytime during transmission or reception of
data. A minimum time delay of 100 µs (after the stop bit of the command byte has been sent)
must be observed before the CMD pin can be de-asserted. The command executes after all
parameters associated with the command have been sent. If all parameters are not received
within 0.5 seconds, the modem returns to Idle Mode. Note: When parameters are sent, they are
always two bytes long with the least significant byte sent first.
Commands can be queried for their current value by sending the command logically ORed with
the value 0x80 (hexadecimal) with the CMD pin asserted. When the binary value is sent (with no
parameters), the current value of the command parameter is sent back through the DO pin.
Figure
3.9.
Binary
Command
Write
then
Read
IMPORTANT:
For the RS-232/485 Modem to recognize a binary command, RT (GPI1
Configuration) Command must be issued. If binary programming is not enabled
(RT != 1), the modem will not recognize the data as binary commands.
Signal
#1
is
the
DIN
signal
to
the
modem
Signal
#2
is
the
DOUT
signal
from
the
modem
Signal
#3
is
Signal
#4
is
CMD
In
this
particular
graph,
a
value
was
written
to
a
register
and
then
read
out
to
verify
it.
While
not
in
the
middle
of
other
received
data,
note
that
the
signal
(GPO1)
outlines
the
data
response
out
of
the
modem.