
XStream-PKG-R™ RS-232/485 RF Modem – Product Manual v5.x00
Bin a ry Com m a n ds
Sending and r eceiv ing par am et er v alues using binary com m ands is t he fast est w ay t o change
oper at ing par am et er s of t he XSt r eam RF Modem . Binary com m ands ar e used m ost oft en t o
sam ple signal st rengt h ( RS par am et er ) and/ or err or count s; or change m odem addr esses and
channels for polling dat a sy stem s. Since t he sending and r eceiv ing of r egist er v alues t ak es place
t hr ough t he sam e ser ial dat a pat h as “ liv e” dat a ( r eceiv ed RF pay load) , int er fer ence betw een t he
t w o ty pes of dat a can be a concer n.
Com m on quest ions about using binary com m ands:
•
What ar e t he im plicat ions of asser t ing CMD w hile liv e dat a is being sent or r eceiv ed?
•
Aft er sending ser ial dat a, is t her e a m inim um t im e delay befor e CMD can be asser t ed?
•
I s a delay requir ed aft er CMD is de- asser t ed befor e pay load dat a can be sent ?
•
How does one discer n betw een liv e dat a and dat a r eceiv ed in r esponse to a com m and?
The CMD pin m ust be asser t ed in order t o send binar y com m ands t o t he RF m odem . The CMD pin
can be asser t ed to r ecognize binar y com m ands any t im e dur ing t he tr ansm ission or r ecept ion of
dat a. The st at us of t he CMD signal is only checked at t he end of t he stop bit as t he by t e is shift ed
int o t he ser ial por t . The applicat ion does not allow cont r ol ov er w hen dat a is r eceiv ed, except by
w ait ing for dead t im e betw een burst s of com m unicat ion.
I f t he com m and is sent in t he m iddle of a st r eam of pay load dat a t o be tr ansm it t ed, t he
com m and w ill essent ially be ex ecut ed in t he order it is receiv ed. I f t he r adio is cont inuously
r eceiv ing dat a, t he r adio w ill w ait for a br eak in t he receiv ed dat a befor e ex ecut ing t he com m and.
The
signal w ill fr am e t he r esponse com ing from t he binary com m and request ( Figur e 3.10) .
A m inim um t im e delay of 100 µs ( aft er t he st op bit of t he com m and by t e has been sent ) m ust be
observ ed before t he CMD pin can be de- asser t ed. The com m and ex ecut es aft er all par am et er s
associat ed w it h t he com m and hav e been sent . I f all par am eter s ar e not r eceived w it hin 0.5
seconds, t he m odem ret ur ns to I dle Mode.
Note: When parameters are sent, they are two bytes long with the least significant byte sent first.
Binary commands that return one parameter byte must be written with two parameter bytes.
Refer to p23 for a binary programming example.
Com m ands can be quer ied for t heir cur rent v alue by sending t he com m and logically ORed ( bit -
w ise) w it h t he v alue 0x 80 ( hex adecim al) w it h CMD asser t ed. When t he binar y v alue is sent ( w it h
no par am et er s) , t he curr ent value of t he com m and par am et er is sent back t hrough t he DO pin.
Figure 3.10.
Binary Command Write then Read
Signal #4 is CMD
Signal #1 is the DIN signal to the radio
Signal #2 is the DOUT signal from the radio
Signal #3 is
I n t his gr aph, a v alue w as wr it t en t o a r egist er and
t hen r ead out t o v er ify it . While not in t he m iddle
of ot her r eceiv ed dat a, not e that t he
( DO2
pin) signal out lines t he dat a response out of t he
m odem .
IMPORTANT:
For the XStream Modem to recognize a binary command, the RT (DI2
Configuration) parameter must be set to one. If binary programming is not
enabled (RT ≠
1), the modem will not recognize that the CMD pin is asserted and
therefore will not recognize the data as binary commands.
© 2014 Digi International Inc.
20