Binary Command mode FAQs

Since sending and receiving binary commands takes place through the same serial data path as live data, interference between the two types of data can be a concern. Some common questions about using binary commands are:

You must assert the CMD pin (pin 29) in order to send binary commands to the device. You can assert the CMD pin to recognize binary commands anytime during the transmission or reception of data.

The device only checks the status of the CMD signal at the end of the stop bit as the byte shifts into the serial port.

The firmware does not allow control over when the device receives data, except by waiting for dead time between bursts of communication.

If the command is sent in the middle of a stream of payload data, the device executes the command in the order it is received. If the device is continuously receiving data, it waits for a break in the data it receives before executing the command.

The host must observe a minimum time delay of 100 µs after sending the stop bit of the command byte before the host de-asserts the CMD pin. The command executes after the host sends all of its associated parameters. If the device does not receive all of these parameters within 0.5 seconds, the device returns to Idle mode.

Note When a host sends parameters, 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.
Example: to set PL to 3, send the following data: 0x3A 0x03 0x00 (Binary Command, LSB, MSB).

To query command parameters using Binary Command mode, set the most significant bit of the binary command. This can be accomplished by logically ORing (bit-wise) the binary command with hexadecimal 0x80. The parameter bytes are returned in hexadecimal bytes with the least significant bit first (if multiple bytes are returned).

Example: to query HP in Binary Command mode, instead of setting it, send 0x11 (HP binary command) as 0x91 with no parameter bytes.

The device must be in Binary Command mode in order for the device to recognize a binary command; see Enter Binary Command mode.

If the device is not in Binary Command mode (the RT parameter value is not 1), the device does not recognize that the CMD pin is asserted and therefore does not recognize the data as binary commands.

For an example of binary programming, see Send binary commands.