1
Development System EasydsPIC6
MikroElektronika
page
7.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 modules. RS-232 serial communication is performed through a 9-pin SUB-D connector and the microcontroller
USART module. The
EasydsPIC6
provides one RS-232 port. Depending on the microcontroller in use, it is necessary to set appropriate
switches on the DIP switch SW7 or SW8 to enable connection between the microcontroller and the RS-232 communication module.
In case the dsPIC30F4013 microcontroller is used, it is necessary to set switches 2 (RF2) and 6 (RF3) on the DIP switch SW7 to
ON position. Which of these switches is to be used depends on which microcontroller pins are used for the USART communication.
Anyway, the microcontroller pins used in such a 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 MAX202C (MAX232).
Figure 7-2
: RS-232 module connection schematic
NOTE:
Make sure that your microcontroller is provided with the USART module as it is not necessarily integrated in all dsPIC
microcontrollers.
Port RS-232A is connected to the microcontroller
Figure 7-1
: RS-232 communication module
RS-232 connector