11
UNI-DS3 Development System
MikroElektronika
page
56&RPPXQLFDWLRQ0RGXOH
USART (
8QLYHUVDO6\QFKURQRXV$V\QFKURQRXV5HFHLYHU7UDQVPLWWHU
) is one of the most common ways of exchanging data between
the PC and peripheral units. The RS232 serial communication is performed through a 9-pin SUB-D connector and the microcontroller
USART module. The
UNI-DS3
provides one RS232A port. Use switches marked as RX232A and TX232A as well as RX232B and
TX232B on the DIP switch SW3 to enable port RS232A. The microcontroller pins used in such communication are marked as follows:
RX -
UHFHLYHGDWDOLQH
and TX -
WUDQVPLWGDWDOLQH
. Data rate goes up to 115 kbps.
In order to enable the microcontroller’s USART module to receive input signals which meet the RS232 standard, it is necessary to
adjust voltage levels using an IC circuit such as MAX232.
)LJXUH
: RS232 module and microcontroller connection schematic
As mentioned above, the
UNI-DS3
development system is a
universal tool which makes it suitable for use with different
microcontrollers. The position of pins used for RS232
communication is not the same for all microcontrollers. In
order to enable different microcontrollers to make advantage
of RS232 communication it is necessary to select appropriate
microcontroller pins to be used for such communication. DIP
switch SW3 is used as a communication line selector.
The method of connecting the RS232 communication module
depends on the MCU card placed into the DIMM-168P socket.
All MCU cards are described at the end of this manual and it is
clearly stated which pins are used for RS232 communication
with microcontrollers. For example, for the 8051 MCU card,
switches 5 (RX232A) and 6 (TX232A) on the DIP switch
SW3 are used. For the ATmega128 MCU card, switches 5,
6, 7 and 8 on the DIP switch SW3 may be used. Which of
these four pins are to be used here depends on which pins
on the ATmega128 microcontroller you want to use for RS232
communication. In case pins RE0 and RE1 are used, switches
5 (RX232A) and 6 (TX232A) on the DIP switch SW3 should be
set to the ON position. In case pins RD2 and RD3 are used,
switches 7 (RX232B) and 8 (TX232B) on the DIP switch SW3
should be set to the ON position.
)LJXUH
: RS232 module
RS232 connector
)LJXUH
: RS232 module connector
3RUW56$LVFRQQHFWHGWRWKHPLFURFRQWUROOHU