![background image](http://html2.mh-extra.com/html/rabbit/rabbitcore/rabbitcore_user-manual_3112756123.webp)
User’s Manual
117
R
C
M
3
7
2
0
RS-232 can be used effectively at the RabbitCore module’s maximum baud rate for dis-
tances of up to 15 m.
When stuffed, the RS-232 chip brings out Serial Ports C and D to the header J3 area on the
RCM3720 Prototyping Board. An optional 2 × 5 header strip with a 0.1" pitch can be
installed at J3 to allow you to connect a ribbon cable that leads to a standard DB-9 serial
connector. The 2 × 5 header (Part No. 405-0023) can be purchased through our
, and is included with the subassembly (Part No. 151-0082) described above.
Table B-9 summarizes the serial port locations.
These serial ports can be configured in software as either one 5-wire or two 3-wire RS-232
channels. RS-232 flow control on an RS-232 port is initiated in software using the
serX-
flowcontrolOn
function call from
RS232.LIB
, where
X
is the serial port (C or D). The
locations of the flow control lines are specified using a set of five macros.
SERX_RTS_PORT
—Data register for the parallel port that the RTS line is on (e.g., PCDR).
SERA_RTS_SHADOW
—Shadow register for the RTS line's parallel port (e.g., PCDRShadow).
SERA_RTS_BIT
—The bit number for the RTS line.
SERA_CTS_PORT
—Data register for the parallel port that the CTS line is on (e.g., PCDRShadow).
SERA_CTS_BIT
—The bit number for the CTS line.
Standard 3-wire RS-232 communication using Serial Ports C and D is illustrated in the
following sample code.
#define CINBUFSIZE 15 // set size of circular buffers in bytes
#define COUTBUFSIZE 15
#define DINBUFSIZE 15
#define DOUTBUFSIZE 15
#define MYBAUD 115200 // set baud rate
#endif
main(){
serCopen(_MYBAUD); // open Serial Ports C and D
serDopen(_MYBAUD);
serCwrFlush(); // flush their input and transmit buffers
serCrdFlush();
serDwrFlush();
serDrdFlush();
serCclose(_MYBAUD); // close Serial Ports C and D
serDclose(_MYBAUD);
}
Table B-9. RCM3720 Prototyping Board Serial Port Locations
Serial Port
Signal Header
Header Pins
C
J3
TxC…6
RxC…4
D
J3
TxD…3
RxD…5
Summary of Contents for RabbitCore
Page 6: ...RabbitCore RCM3750...
Page 40: ...34 RabbitCore RCM3750...
Page 64: ...58 RabbitCore RCM3750...
Page 126: ...120 RabbitCore RCM3750...
Page 162: ...156 RabbitCore RCM3750...
Page 172: ......