20
RabbitCore RCM3000
•
IR_DEMO.c
—Demonstrates sending Modbus ASCII packets between two Prototyping
Board assemblies via the IrDA transceivers with the IrDA transceivers facing each other.
Note that this sample program will only work with the RCM30/31/32XX Prototyping
Board.
First, compile and run this program on one Prototyping Board assembly, then remove
the programming cable and press the
RESET
button on the Prototyping Board so that
the first RabbitCore module is operating in the
Run
mode. Then connect the program-
ming cable to the second Prototyping Board assembly with the RCM3000 and compile
and run the same sample program. With the programming cable still connected to the
second Prototyping Board assembly, press switch S2 on the second Prototyping Board
to transmit a packet. Once the first Prototyping Board assembly receives a test packet, it
will send back a response packet that will be displayed in the Dynamic C
STDIO
win-
dow. The test packets and response packets have different codes.
Once you have loaded and executed these sample programs and have an understanding of
how Dynamic C and the RCM3000 modules interact, you can move on and try the other
sample programs, or begin building your own.
3.3.1 Serial Communication
The following sample programs can be found in the
SAMPLES\RCM3000\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.
J5
RxC TxC
GND
TxB RxB
J5
RxC
RxB
GND
TxB
TxC
Содержание 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: ......