User`s manual
PK2200 System Development s 39
Echo Option
If the echo option is turned on during initialization of the serial port (with
Dinit
_
z0, Dinit
_
z1, or Dinit
_
uart) any character received is
automatically echoed back (transmitted out). This feature is ideal for use
with a dumb terminal and also for checking the characters received.
CTS/RTS Control
Z180 port 0 is constrained by hardware to have the CTS (clear to send)
pulled low by the RS-232 device with which it is communicating. An RS-
232 expansion card, however, can enable or disable the effect of the CTS
line. Z180 port 1 does not support the CTS / RTS lines.
If you choose the CTS/RTS option, the support software pulls the RTS
(request to send) line high when the receive buffer has reached 80 percent
of capacity. Thus, the transmitting device (if its CTS is enabled) stops
transmitting. The RTS line is pulled low again when the received buffer
has gone below 20 percent of capacity.
If the device with which the PK2200 is communicating does not support
CTS and RTS, the CTS and RTS lines on the PK2200s side can be tied
together to make communication possible.
XMODEM File Transfer
The PK2200 supports the XMODEM protocol for downloading and
uploading data. Currently, the library supports downloading an array of
data whose size is a multiple of 128 bytes.
Uploaded data is written to a specified area in RAM. The targeted area
for writing should not conflict with the current resident program or data.
During XMODEM transfers, character echo is automatically suspended.
Modem Communication
Modems and telephone lines allow serial communication across a great
distance. If you choose the modem option, character streams that are read
from the receive buffer are automatically scanned for modem commands.
When a modem command is found, the software takes appropriate action.
Normally, the communication package functions in COMMAND mode
while waiting for valid modem commands or messages. Once a link is
established, communication functions in DATA mode. However, the
software continues to monitor the modem for a NO
_
CARRIER message.
The software assumes that modem commands are terminated with CR,
which is carriage return (0x0D). The modem option is easiest to use when
the user protocol also has CR as the terminating character. Otherwise, the
software has to check for two different terminating characters. The users
terminating character cannot be any of the ASCII characters used in
modem commands, nor can it be a line-feed character.