233
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
The serial port outputs clock/data signals through cout and dout lines and
receives the data via cin and din lines. Your application should not attempt to
work with cout and dout outputs directly through the
object when the serial
port is in the clock/data mode.
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 raw clock/data data
Clock/data from different "tracks" has different encoding. Encoding defines how
"raw" data bits are processed and converted into actual data. To allow maximum
flexibility, and also to maintain the data processing style used by the
, the serial port leaves the task of converting between the raw and
actual data to your application. The serial port only sends and receives raw data
without checking or transforming its contents.
How the clock/data stream is stored in the RX and TX buffers of the serial
port
When in the clock/data mode, each data byte in the TX or RX buffer of the serial
port represents one bit of the clock/data stream. This bit is recorded in the least
significant bit position of each data byte in the buffer. For your application's
convenience, when the serial port receives clock/data bit stream, it adds an offset
of 30Hex to each data bit. Therefore, the data recorded into the RX buffer can only
consist of bytes 30H and 31H. These correspond to ASCII characters '0' and '1'.
This way, when your application reads RX buffer contents into a string variable the
data will be "readable" without any additional conversion (ASCII characters with
codes 0 and 1 would not be "readable").
When the serial port outputs clock/data stream, it only takes bit 0 of each byte in
365
370
365
229