OG_MU-4-434_v10e Circuit Design, Inc.
62
OPERATION GUIDE
6.3 Command Transmission
Do NOT use commands other than those specifically for the MU-4.
6.3.1 Issuing commands
It is possible to feed the characters of a command such as ‘@CH 03
C
R
L
F
’ to UART sequentially.
* @: @ (40h) = prefix
C
R
L
F
: CR (0Dh) = carriage return,
L
F
(0Ah) = line feed
a. With the on-board CPU
To issue a command, first prepare the command data, then feed it to UART 1 byte at a time from the beginning.
Since UART applies transmission interrupt with each byte transmitted, ensure that all bytes of the command are
transmitted within that routine.
Example: with ‘@CH 20
C
R
L
F
’
As transmission interrupt is applied automatically when the first ‘@’ is sent with discretionary timing, ensure that
the next byte ‘C’ is sent within the transmission interrupt routine. In order to stop transmission interrupt when all
the characters within the command have been sent, obtain a suitable command size including a terminator, and
keep the number of transmissions within that size.
b. With a program for OSs such as Windows
Feed already prepared command strings to an RS232C processing component or the like.
6.3.2 Issuing data transmit commands
Example: with the 5-byte transmission data ‘#%&45’.
Make the command string ‘@DT 05 #%&45
C
R
L
F
’
First obtain the 2 digit hexadecimal value for the number of bytes of the transmission data (#%&45), and enter the
‘@DT’ command data size component in ASCII characters. The response is ‘*DT= 05
C
R
L
F
’.
The MU-4 can send data with a size of 255 bytes or less at one time, although internally it has a 255-byte double
buffer structure. In addition, although the mode is normally the receive mode, when user data is sent to one side of
the buffer, the MU-4 switches to the transmit mode and starts radio transmission. When transmission ends, the
MU-4 returns to the receive mode.
If the next user data is sent when user data is being transmitted, the MU-4 does not return to the receive mode and
enters the continuous transmission mode. This enables efficient cyclic data transmission and transmission of data
that exceeds 255 bytes.
In other words, after sending data with the ‘@DT’ command, and after confirming the ‘*DT’ response, the MU-4 will
always enter the continuous transmission mode if the next data is sent within the time found with the following
equation. If this time is exceeded, the MU-4 returns to the receive mode.
Time for sending the next data = within 5 ms + 2.08 ms × amount of user data
* Hardware flow control operates to control sending of the data.
Note