158
Boards
© Tibbo Technology Inc.
Pin headers
Pin #
RS232 mode
RS422 mode
(IB1002/3 only)
RS485 mode
(IB1002/3 only)
1
---
RTS- (output)
---
2
RX (input)
RX- (input)
RX- (input)
3
TX (output)
TX+ (output)
TX+ (output)
4
DTR (output)
TX- (output)
TX- (output)
5
SYSTEM GROUND
SYSTEM GROUND
SYSTEM GROUND
6
DSR (input)
RX+ (input)
RX+ (input)
7
RTS (output)
RTS+ (output)
---
8
CTS (input)
CTS+ (input)
---
9
---
CTS- (input)
---
10
---
---
---
Serial Ports
The serial ports of the IB1000/2/3 are controlled by the
module (located on
the
Tibbo BASIC/C application running on the EM1000 works with serial ports through a
"serial" (ser.) object (see TIDE, TiOS, Tibbo BASIC, and Tibbo C Manual). The object
takes care of the data transmission through the TX line as well as data reception
through the RX line. When the flow control of a serial port is enabled
(ser.flowcontrol= 1- ENABLED), the serial object also handles RTS and CTS lines of
this port automatically.
With flow control disabled, the CTS and RTS lines can be controlled by the
application as general-purpose I/O lines (GPIO). The DTR and DSR lines of ports are
always treated as GPIO, the serial object does not "touch" them. Actually, even TX
and RX lines of each port can be controlled as GPIO lines, but this is only possible
when the corresponding serial port is "closed" (ser.enabled= 0- NO). I/O line control
is effected through another object called the "I/O" (io.) object.
The IB1002 and IB1003 boards have universal RS232/422/485 ports. Two interface
selection lines -- HD/FD and RS_MODE -- are provided for each port and connected
to GPIO lines of the EM1000:
·
The HD/FD line selects half-duplex (LOW) or full-duplex (HIGH) mode for the serial
port.
·
The RS_MODE line selects "physical" signal mode: RS232 (LOW) or RS422/485
(HIGH).
To select RS232, RS422, or RS485 mode for a serial port, setup the HD/FC and
RS_MODE lines as shown in the table below. Ser.interface property of the serial
object must also be set correctly:
Mode
HD/FD
RS_MODE
ser.interface
RS232
HIGH
LOW
0- PL_SER_SI_FULLDUPLEX
RS422
HIGH
HIGH
0- PL_SER_SI_FULLDUPLEX
RS485
LOW
HIGH
1- PL_SER_SI_HALFDUPLEX