Getting Started
21
•
SIMPLE3WIRE.C
—This program demonstrates basic RS-232 serial
communication. Lower case characters are sent by TxC, and are
received by RxB. The characters are converted to upper case and are
sent out by TxB, are received by RxC, and are displayed in the
Dynamic C
STDIO
window.
To set up the Prototyping Board, you will need to tie TxB and RxC together on the
RS-232 header at J5, and you will also tie RxB and TxC together using the jumpers
supplied in the Development Kit as shown in the diagram.
•
SIMPLE5WIRE.C
—This program demonstrates 5-wire RS-232 serial communication
with flow control on Serial Port C and data flow on Serial Port B.
To set up the Prototyping Board, you will need to tie TxB and RxB
together on the RS-232 header at J5, and you will also tie TxC and
RxC together using the jumpers supplied in the Development Kit as
shown in the diagram.
Once you have compiled and run this program, you can test flow con-
trol by disconnecting TxC from RxC while the program is running. Characters will no
longer appear in the
STDIO
window, and will display again once TxC is connected
back to RxC.
•
SWITCHCHAR.C
—This program demonstrates transmits and then receives an ASCII
string on Serial Ports B and C. It also displays the serial data received from both ports
in the
STDIO
window.
To set up the Prototyping Board, you will need to tie TxB and RxC
together on the RS-232 header at J5, and you will also tie RxB and
TxC together using the jumpers supplied in the Development Kit as
shown in the diagram.
Once you have compiled and run this program, press and release S2
and S3 on the Prototyping Board. The data sent between the serial ports will be dis-
played in the
STDIO
window.
Two sample programs,
SIMPLE485-
MASTER.C
and
SIMPLE485
S
LAVE.C
,
are available to illustrate RS-485
master/slave communication. To run
these sample programs, you will need
a second Rabbit-based system with
RS-485, and you will also have to add
an RS-485 transceiver such as the
SP483E and bias resistors to the
RCM30/31/32XX Prototyping Board.
The diagram shows the connections.
You will have to connect PC0 and PC1 (Serial Port D) on the RCM30/31/32XX Proto-
typing Board to the RS-485 transceiver, and you will connect PD4 to the RS-485 trans-
ceiver to enable or disable the RS-485 transmitter.
J5
RxC TxC
GND
TxB RxB
J5
RxC TxC
GND
TxB RxB
J5
RxC TxC
GND
TxB RxB
681
W
220
W
681
W
485+
485
A
B
termi-
nation
bias
bias
Vcc
PC0
PC1
PD4
GND
DI
RO
DE
/RE
Vcc
RS-485
CHIP
Содержание RabbitCore RCM3000
Страница 1: ...RabbitCore RCM3000 C Programmable Module with Ethernet Getting Started Manual 019 0109 050131 E...
Страница 20: ...16 RabbitCore RCM3000...
Страница 40: ...36 RabbitCore RCM3000...
Страница 42: ...38 RabbitCore RCM3000...
Страница 44: ...40 RabbitCore RCM3000...
Страница 46: ......