ADwin-Gold
USB / ENET, manual version 3.8, October 2005
39
CAN add-on
ADwin
The instructions are in the include file
<ADWGCAN.INC>
. More information can
also be found in the
ADbasic
manual and the online help.
9.3 RSxxx Interfaces
Each of the 2 RSxxx interfaces is equipped with the "Quad Universal Asynchro-
nous Receiver/Transmitter" controller (UART), type TL16C754 from Texas
Instruments
®
. Functionality and programming of the interfaces are based on
this controller.
Both interfaces can be operated individually with the RS232 or RS485 protocol.
The physical difference between the protocols is the level of the signals, which
are generated by special driver components on the bus.
Pin assignment
Bus termination
(RS485 only)
If an RS485 interface functions as the physical bus termination, the terminator
must be a resistor (only the first or last RS485 participant). RS485 participants,
which are not positioned in an end-location, must not be terminated.
For the termination there is – if required for the chosen circuit type – a voltage
of +5V provided at pin 6.
9.3.1 Setting the interface parameters
Each interface has an input and an output FIFO with a length of 64 bytes each.
The settings of the interface parameters are made separately for each channel,
using the controller register. Below the settings are described more detailed:
Handshake
– Handshake: The interface is operated in 4 modes:
1. RS232 without handshake
2. RS232 with software handshake (Xon/Xoff)
3. RS232 hardware handshake (RTS/CTS). The signals RTS and CTS
must be connected.
4. RS485
Receiving and sending of data
CAN_MSG
EN_RECEIVE
EN_TRANSMIT
READ_MSG
TRANSMIT
Write / read access to the
controller register
SET_CAN_REG
GET_CAN_REG
Range
Instructions
COM1, COM2
(RS232)
(male)
5
4
3
2
1
9
8
7
6
nc
Rx
ec
ei
ve
D
at
a
Tx
rans
m
it
D
at
a
nc
S
ignal
G
rou
ND
+5
V
R
eques
t
T
o
S
end
C
lear
T
o
S
end
nc
S
ignal
HIGH
R
ESER
VED
S
ignal
G
ro
u
ND
+5
V
R
ESER
VED
S
ignal
LOW
R
ESER
VED
5
4
3
2
1
9
8
7
6
R
ESER
VED
COM1, COM2
(RS485)
(male)