1
LV24- v6 Development System
MikroElektronika
page
10.0. RS-232 Communication Module
USART (
Universal Synchronous/Asynchronous Receiver/Transmitter
) is one of the most common ways of exchanging data between
the PC and peripheral units. RS-232 serial communication is performed through a 9-pin SUB-D connector and the microcontroller
USART module. The
LV24-33 v6
provides two RS-232 ports, RS-232A and RS-232B. Use switches marked as RX232-A (pin RF2 or
RB9) and TX232-A (pin RF3 or RB8) on the DIP switch SW16 to enable port RS-232A. Likewise, use switches marked as RX232-B (pin
RF4 or RB11) and TX232-B (pin RF5 or RB10) on the DIP switch SW16 to enable port RS-232B. The microcontroller pins used in such
communication are marked as follows: RX -
receive data line
and TX -
transmit data line
. Data rate goes up to 115 kbps.
In order to enable the USART module of the microcontroller to receive input signals which meet the RS-232 standard, it is necessary
to adjust voltage levels using an IC circuit such as MAX3232CDR.
Figure 10-2
: RS-232 module connection schematic
The function of the switches 1-8 on the DIP switch SW16 is to determine which of the microcontroller pins are to be used as RX and
TX lines, Figure 10-2.
Figure 10-1
: RS-232 module
Port RS-232A is connected to the microcontroller via RF2 and RF3 pins
RS-232 connector