225
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
8.3.2.2
Overview
This section covers the serial port object in detail. Here you will find:
Three modes of the serial port
Sending and Receiving Data (TX and RX buffers)
Anatomy of a Serial Port
A serial port is composed of actual hardware which controls serial port lines, and of
buffers that store incoming data (which is to be processed by your application) and
outgoing data (which has not yet left the port).
The serial port object contains properties, methods and events which relate both to
the buffers and the UART itself (see
).
The buffers available are:
The TX buffer, which contains data due to be sent out of the port (i.e, it's the
transmit of your device!). Your Tibbo Basic application puts the data into the TX
buffer.
The RX buffer, which contains incoming data received by the port. This data is
to be processed by your application.
The logical lines available are:
The TX/W1out/dout output line.
The RX/W1in/din input line.
The RTS/W0out/cout output line.
The CTS/W0&1in/cin input line.
TX/W1out/dout and RX/W1in/din lines always have fixed "position" in the device i.
e. they cannot be re-mapped to a different I/O pin. RTS/W0out/cout and CTS/
W0&1in/cin lines can be re-mapped on select devices. Also, depending on the
device and the serial port mode you may or may not require to explicitly configure
the lines of the serial port as inputs or outputs. Sometimes it will happen
automatically, and sometimes you need to take care of this in your application
through the
object. You will find this information in the "Platform-related
Programming Information" topic inside your platform specifications section.
Details of I/O line usage in each of the three operating modes of the port can be
found
.
Three Modes of the Serial Port
Each port of the serial object can operate in one of the three modes:
The following subsections detail the signals that the serial port sends and expects
to receive in each mode.
225
225
234
236
239
236
365
225
226
229
232