Saturday, 13 April 2013

INTRODUCTION ABOUT MAX-232 IC AND WORKING FUNCTION,CONNECTION DIAGRAMS



MAX-232:
           Serial RS-232 (V.24) communication works with voltages (-15V ... -3V for high [sic]) and +3V ... +15V for low [sic]) which are not compatible with normal computer logic voltages. On the other hand, classic TTL computer logic operates between 0V ... +5V (roughly 0V ... +0.8V for low, +2V ... +5V for high). Modern low-power logic operates in the range of 0V ... +3.3V or even lower.

So, the maximum RS-232 signal levels are far too high for computer logic electronics, and the negative RS-232 voltage for high. In the other direction (sending data from some logic over RS-232) the low logic voltage has to be "bumped up", and a negative voltage has to be generated, too.

Logic Voltages
All this can be done with conventional analog electronics, e.g. a particular power supply and a couple of transistors or the once popular 1488 (transmitter) and 1489 (receiver) ICs. However, since more than a decade it has become standard in amateur electronics to do the necessary signal level conversion with an integrated circuit (IC) from the MAX232 family (typically a MAX232A or some clone). In fact, it is hard to find some 

The MAX232 & MAX232A 

The MAX 232 translates RS232 voltages to TTL voltages. RS232 represent a binary 1 or HI anywhere between –3V to –12V, a zero logic or LOW, between 3V and 12V.
TTL in the other hand responds to 0 to 2.1V as logic zero and 2.8V to 5V as a HI. The MAX 232 provides voltage translation so the TTL PIC 16F84 can understand the messages sent to it from the computer. A serial cable is also provided to connect the MAX232 to the PC and jumper cables to connect the MAX232 to the micro controller.
The MAX232 from Maxim was the first IC which in one package contains the necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally. This greatly simplified the design of circuitry. Circuitry designers no longer need to design and build a power supply with three voltages (e.g. -12V, +5V, and +12V), but could just provide one +5V power supply, e.g. with the help of a simple 78x05 voltage converter.
MAX232 (A) DIP Package


                 DIP Package of MAX 232A

A Typical Application

The MAX232 (A) has two receivers (converts from RS-232 to TTL voltage levels) and two drivers (converts from TTL logic to RS-232 voltage levels). This means only two of the RS-232 signals can be converted in each direction.
There are not enough drivers/receivers in the MAX232 to also connect the DTR, DSR, and DCD signals. Usually these signals can be omitted when e.g. communicating with a PC's serial interface. If the DTE really requires these signals either a second MAX232 is needed, or some other IC from the MAX232 family can be used (if it can be found in consumer electronic shops at all). An alternative for DTR/DSR is also given below.
Maxim's data sheet explains the MAX232 family in great detail, including the pin configuration and how to connect such an IC to external circuitry. This information can be used as-is in own design to get a working RS-232 interface. Maxim's data just misses one critical piece of information: How exactly to connect the RS-232 signals to the IC. So here is one possible example:
MAX232 to RS232 DB9 Connection as a DCE
MAX232 Pin No.
MAX232 Pin Name
Signal
Voltage
DB9 Pin
7
T2out
CTS
RS-232
7
8
R2in
RTS
RS-232
8
9
R2out
RTS
TTL
n/a
10
T2in
CTS
TTL
n/a
11
T1in
TX
TTL
n/a
12
R1out
RX
TTL
n/a
13
R1in
RX
RS-232
2
14
T1out
TX
RS-232
3
15
GND
GND
0
5
                            Connections between MAX 232 & RS 232
In addition one can directly wire DTR (DB9 pin 4) to DSR (DB9 pin 6) without going through any circuitry. This gives automatic (brain dead) DSR acknowledgement of an incoming DTR signal.
Sometimes pin 6 of the MAX232 is hard wired to DCD (DB9 pin 1). This is not recommended. Pin 6 is the raw output of the voltage pump and inverter for the -10V voltage. Drawing currents from the pin leads to a rapid breakdown of the voltage, and as a consequence to a breakdown of the output voltage of the two RS-232 drivers. It is better to use software which doesn't care about DCD, but does hardware-handshaking via CTS/RTS only. The circuitry is completed by connecting five capacitors to the IC as it follows.
MAX232(A) external Capacitors:
Capacitor
+ Pin
- Pin
Remark
C1
1
3

C2
4
5

C3
2
16

C4
GND
6
This looks non-intuitive, but because pin 6 is
on -10V, GND gets the + connector, and not the -
C5
16
GND



Drawbacks of MAX232:
                                            i.            The MAX-232 chip receives data from the receiver, and converts it to the standard RS-232 data format that can be read in by a serial port on a personal computer or workstation.
                                          ii.            For the RS-232 interface, a standard MAX232 chip is used for level conversion. Both use the on chip USART and thus the same firmware.

Connections In Max 232:
               If you wanted to do a general RS-232 connection, you could take a bunch of long wires and solder them directly to the electronic circuits of the equipment you are using, but this tends to make a big mess and often those solder connections tend to break and other problems can develop. To deal with these issues, and to make it easier to setup or take down equipment, some standard connectors have been developed that is commonly found on most equipment using the RS-232 standards

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...