Datasheet
UART via RS-232
communication
The UART (universal asynchronous
receiver/transmitter) is one of the most
common ways of exchanging data between
the MCU and peripheral components. It is
a serial protocol with separate transmit and
receive lines, and can be used for full-duplex
communication. Both sides must be initialized with
the same baud rate, otherwise the data will not be
received correctly.
RS-232 serial communication is performed through a
9-pin SUB-D connector and the microcontroller UART
module. In order to enable this communication, it
is necessary to establish a connection between
RX and TX lines on SUB-D connector and the
same pins on the target microcontroller using
DIP switches. Since RS-232 communication
voltage levels are dierent than
microcontroller logic levels, it is
necessary to use a RS-232
Transceiver circuit, such as
MAX3232 as shown
on Figure 6-1.
C2-
V-
RX-232
TX-232
RX-FTDI
RX-232
TX-FTDI
TX-232
J23
J12
DATA BUS
1
2
3
4
5
6
7
8 9
10
11
12
13
14
15
16
C1+
V+
C1-
C2+
C2-
V-
T2OUT
R2IN
T1IN
T2IN
VCC
GND
T1OUT
R1IN
R1OUT
R2OUT
U3
MAX3232
5
9
4
8
3
7
2
6
1
1
5
9
6
CN12
DB-9
C11
100nF
C20
100nF
C22
100nF
C21
100nF
E2
10uF
VCC-BRD VCC-BRD
R35
100K
VCC-BRD
RS-232
CONNECTOR
1 2 3 4 5 6 7 8
O
N
SW10
RX
TX PD1
PD3
PD0
PD2
Figure 6-1: RS-232 connection schematic
Enabling RS-232
In order to enable RS-232
communication, you must set
J23 and J12 jumpers in the RS-
232 position, and enable desired
RX and TX lines via SW10 DIP
switch. For example, if you want
to enable RS-232 connection
on UART module of the default
ATmega32 chip, you should
enable SW10.1 (RD0) and
SW10.2 (RD1) lines.
page 14
EasyAVR
v7