BL4S200 User’s Manual
61
•
SIMPLE5WIRE.C
—This program demonstrates 5-wire RS-232 serial communication
using the Dynamic C
STDIO
window. Follow these instructions before running this
sample program.
The BL4S210 model only has one RS-232 serial port available, and so this sample
program cannot be run on the BL4S210 model.
Before you compile and run this sample program on any of
the other BL4S200 models, connect TxE (pin 1 on connector
J11) to RxE (pin 6 on connector J11), then connect TxF (pin
2 on connector J11) to RxF (pin 7 on connector J11).
TxF and RxF become the flow control RTS and CTS. To test
flow control, disconnect RTS from CTS while running this
program. Characters should stop printing in the Dynamic C
STDIO
window and should resume when RTS and CTS are connected again
The following sample programs are found in the
SAMPLES\BLxS2xx\RS485
subdirectory.
•
MASTER.C
—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave. The slave will send back converted upper case letters back to the
master BL4S200 and display them in the
STDIO
window. Use
SLAVE.C
to program the
slave. Make the following connections between the master and slave:
•
SLAVE.C
—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave. The slave will send back converted upper case letters back to the
master BL4S200 and display them in the
STDIO
window. Use
MASTER.C
to program
the master BL4S200. Make the following connections between the master and slave:
485+ to 485+ (pin 9 on connector J11)
485- to 485- (pin 4 on connector J11)
GND to GND (pin 5 on connector J11)
485+ to 485+ (pin 9 on connector J11)
485- to 485- (pin 4 on connector J11)
GND to GND (pin 5 on connector J11)
2
7
8
3
9
4
RXF
RXE
TXF
TXE
6
1
5
10
J11
MASTER
SLAVE
2
7
8
3
9
4
485+
GND
485
6
1
5
10
2
7
8
3
9
4
485+
GND
485
6
1
5
10
J11
J11
MASTER
SLAVE
2
7
8
3
9
4
485+
GND
485
6
1
5
10
2
7
8
3
9
4
485+
GND
485
6
1
5
10
J11
J11