226
Platforms
©2000-2008 Tibbo Technology Inc.
UART Mode
In the UART mode the serial port has standard UART functionality. You can select
the baudrate, parity, number of bits in each character, and full- or half-duplex
operation (see
). The UART works with signals of "TTL-serial"
polarity -- RX and TX lines are at logical HIGH when no data transmission is taking
place, the start bit is LOW, stop bit is HIGH (shown below for the case of 8 bits/
character and enabled parity).
UART data is sent and received via TX output and RX input lines. Two additional
lines- RTS output and CTS input may also be used depending on the serial port
setup (see below).
Please, remember that on your platform you may be required to
correctly configure some of your serial port's lines as inputs or outputs
through the
object. Additionally, you
may have the freedom of re-mapping certain serial port lines to
different I/O pins of the device if required. See "Platform-dependent
Programming Information" topic inside your platform specifications
section.
How the serial port sends and receives UART data
The serial port can send and receive the data with no parity, or even, odd, mark,
or space parity configuration. Additionally, you can specify the number of bits in
each character (7 or 8). The serial port takes care of parity calculation
automatically. When parity bit is enabled, it will automatically calculate parity bit
value for each character it transmits. When receiving, the serial port will correctly
process incoming characters basing on the specified number of bits and parity
mode. Actual parity check is not done. The serial port will receive the parity bit but
won't actually check if it is correct.
Actual parity check is not done. The serial port will receive the parity
bit but won't actually check if it is correct. Parity is mostly kept for
compatibility with older devices, so the serial port transmits it
correctly.
How the UART data is stored in the RX and TX buffers of the serial port
When in the UART mode, each data byte in the TX or RX buffer of the serial port
represents one character. When the serial port is configured to send and receive 7-
bit characters, the most significant bit of each byte in the RX buffer will be 0, and
the most significant bit of each byte in the TX buffer will be ignored. Parity bits are
not stored in the buffers. For the outgoing data stream, the serial port will
calculate and append the parity bit automatically. For the incoming serial data, the
236
370
365