![](http://datasheet.mmic.net.cn/Rabbit-Semiconductor/101-1007_datasheet_95644/101-1007_31.png)
User’s Manual
23
3.2.5 Serial Communication
The following sample programs can be found in the SAMPLES\PowerCoreFLEX\RS232
folder.
PARITY.c
—This program demonstrates the use of parity modes by repeatedly sending
byte values 0–127 from Serial Port E to Serial Port F. The program will switch between
generating parity or not on Serial Port E. Serial Port F will always be checking parity,
so parity errors should occur during every other sequence.
Before running this sample program, jumper TXE to RXF located on pins
3 and 4 on header J1 of the Prototyping Board.
NOTE: For the sequence that does get parity errors, the errors won't occur
for each byte received. This is because certain byte patterns and the stop
bit will appear to generate the correct parity for the UART.
SIMPLE3WIRE.c
—This program demonstrates basic RS-232 serial
communication whose loopback is displayed in the Dynamic C STDIO
window.
Before running this sample program, jumper TXE to RXF located on pins
3 and 4 on header J1 of the Prototyping Board. Then jumper RXE to TXF
located on pins 5 and 6 on header J1 of the Prototyping Board.
SIMPLE5WIRE.c
—This program demonstrates 5-wire RS-232 serial communication
whose loopback is displayed in the Dynamic C STDIO window.
Before running this sample program, jumper TXE to RXE located on
pins 3 and 5 on header J1 of the Prototyping Board. Then jumper RXF to
TXF located on pins 4 and 6 on header J1 of the Prototyping Board.
Once you compile and run this sample program, TXF and RXF will
become the RTS and CTS flow control. To test the flow control, remove
the jumper on J1 pins 4 and 6, which will cause the characters to stop printing in the
Dynamic C STDIO window, and will resume printing when you reinstall the jumper.
J1
RxF
TxF
TxE
RxE
GND
J1
RxF
TxF
TxE
RxE
GND
J1
RxF
TxF
TxE
RxE
GND