58
8.23 Send Bytes SEND
Format:
Send BaudRate InterCharDelay ByteString
BaudRate to suit the on-chip program. This baud rate applies only to the Send command,
Xplor8 reverts to the MON08 interface communication rate at the end of the
command. Note: not all baud rates are obtainable. On most PC systems the
UART is a 16550 compatible device, and the Comms port driver is the
standard one that comes with Windows. The result is that the only baud rates
obtainable in practice are those which are integer divisions of 115200 baud, for
example 7680 baud is obtainable because 7680 = 115200 ÷15. If a rate
somewhere between the available rates is entered in 'BaudRate', then the 16550
defaults to the first available rate above the rate entered, and a warning dialog
appears.
InterCharDelay a delay, in milliseconds, to be inserted between the sending of each character.
A value of zero may be used. Short delays (<50 ms) are subject to some
variability. The last byte sent is also followed by the inter-character delay.
ByteString the bytes to be sent. Use pairs of hexadecimal characters, without any gaps, for
example: 41420D0A.
SEND is a specialized command. It simply emits the specified bytes from the PC's serial port. Bytes
sent are displayed in the output window in black; and any bytes received are displayed in red. Note that
the half-duplex nature of the hardware interface on most target boards will cause each byte sent to be
echoed once anyway. SEND is one of the few commands available in user mode.
Examples
The following sends the ASCII characters 'ABC' at 9600 baud with no delay between each:
SEND 9600 0 414243
The following example sends the bytes necessary to read a single memory location. $4A is the MON08
command to read a single memory location, $FF81 is the location being read:
send 9600 20 4AFF81
The command replies with: (the $D7 depends, of course, on what was in $FF81)
Sent/Received: 4A4A4AFFFFFF818181D7
Comentários a estes Manuais