User’s Manual
17
3.2.1 Serial Communication
The following sample programs can be found in the
SAMPLES\RCM3200\SERIAL
folder.
•
FLOWCONTROL.C
—This program demonstrates hardware flow control by configuring
Serial Port C (PC3/PC2) for CTS/RTS with serial data coming from TxB at 115,200 bps.
One character at a time is received and is displayed in the
STDIO
window.
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.
A repeating triangular pattern should print out in the
STDIO
window.
The program will periodically switch flow control on or off to demonstrate the effect of
no flow control.
•
PARITY.C
—This program demonstrates the use of parity modes by
repeatedly sending byte values 0–127 from Serial Port B to Serial Port
C. The program will switch between generating parity or not on Serial
Port B. Serial Port C will always be checking parity, so parity errors
should occur during every other sequence.
To set up the Prototyping Board, you will need to tie TxB and RxC together on the
RS-232 header at J5 using the jumpers supplied in the Development Kit as shown in the
diagram.
The Dynamic C
STDIO
window will display the error sequence.
•
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.
J5
RxC TxC
GND
TxB RxB
J5
RxC
RxB
GND
TxB
TxC
J5
RxC TxC
GND
TxB RxB
J5
RxC TxC
GND
TxB RxB
Содержание RabbitCore RCM3209
Страница 1: ...RabbitCore RCM3209 RCM3229 C Programmable Module with Ethernet User s Manual 019 0165 080528 D...
Страница 6: ...RabbitCore RCM3209 RCM3229...
Страница 20: ...14 RabbitCore RCM3209 RCM3229...
Страница 58: ...52 RabbitCore RCM3209 RCM3229...
Страница 84: ...78 RabbitCore RCM3200...
Страница 135: ...User s Manual 129 keyConfig continued RETURN VALUE None SEE ALSO keyProcess keyGet keypadDef...
Страница 140: ...134 RabbitCore RCM3209 RCM3229...
Страница 144: ...138 RabbitCore RCM3209 RCM3229...
Страница 158: ...152 RabbitCore RCM3209 RCM3229...
Страница 160: ......