20
RabbitCore RCM3305/RCM3315
•
SIMPLE3WIRE.C
—This program demonstrates basic RS-232 serial communication.
Lower case characters are sent by TxE, and are received by RxF. The characters are
converted to upper case and are sent out by TxF, are received by RxE, and are displayed
in the Dynamic C
STDIO
window.
To set up the Prototyping Board, you will need to tie
TxE and RxF together on the RS-232 header at J14, and
you will also tie RxE and TxF together as shown in the
diagram.
•
SIMPLE5WIRE.C
—This program demonstrates 5-wire RS-232 serial communication
with flow control on Serial Port F and data flow on Serial Port E.
To set up the Prototyping Board, you will need to tie
TxE and RxE together on the RS-232 header at J14,
and you will also tie TxF and RxF together as shown in
the diagram.
Once you have compiled and run this program, you can
test flow control by disconnecting TxF from RxF while the program is running. Char-
acters will no longer appear in the
STDIO
window, and will display again once TxF is
connected back to RxF.
•
SWITCHCHAR.C
—This program transmits and then receives an ASCII string on Serial
Ports E and F. 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
TxE and RxF together on the RS-232 header at J14, and
you will also tie RxE and TxF together 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 displayed in the
STDIO
window.
Two sample programs,
SIMPLE485MASTER.C
and
SIMPLE485SLAVE.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—another Rabbit single-board computer
or RabbitCore module may be used as long as you use the master or slave sample program
associated with that board.
Before running either of these sample programs on the RCM3305/RCM3315 assembly,
make sure pins 1–2 and pins 5–6 are jumpered together on header JP5 to use the RS-485
bias and termination resistors. The sample programs use Serial Port C as the RS-485 serial
port, and they use PD7 to enable/disable the RS-485 transmitter.
J14
TxE
RxE
GND
TxF
RxF
485+ GND 485
J14
TxE RxE
GND
TxF RxF
485+ GND 485
J14
TxE
RxE
GND
TxF
RxF
485+ GND 485
Содержание RCM3305
Страница 6: ...RabbitCore RCM3305 RCM3315...
Страница 14: ...8 RabbitCore RCM3305 RCM3315...
Страница 22: ...16 RabbitCore RCM3305 RCM3315...
Страница 28: ...22 RabbitCore RCM3305 RCM3315...
Страница 70: ...64 RabbitCore RCM3305 RCM3315...
Страница 106: ...100 RabbitCore RCM3305 RCM3315...
Страница 144: ...138 RabbitCore RCM3305 RCM3315...
Страница 160: ......