Sunday 4 March 2012

UART Circuit

Figure 16: UART circuit contain of MAX232 circuit and the DB9 pin socket

For this post, there will be discussing on the UART circuit which enable for the GSM Modem connection to the PIC16F877A.

Figure 17: DB9 Serial Port Female Connector and MAX232 IC

A serial port is used to connect devices or computers, and therefore it should be connected to another serial port. An external device or modem that is connected to the serial port has an identical built-in serial port. It is possible two connection types between serial ports: straight (pins2 on both sides are connected) or null-modem (pin2 is connected to pin3 on another side). First connection type is used between DTE (Data Terminal Equipment) and DCE (Data Communications Equipment) devices (for example, a computer and modem), and the second connection type is used between two DTE devices (for example, two computers or a computer and an external device).

All signals of the RS232 port is are unidirectional. For example, if pin 2 outputs data, then it is unable to receive any signal using this pin. Therefore, two devices that can send data out (DTE-DTE connection) can’t connect using a straight cable. If not, then they would both send out signals on the same wire but neither would be able to receive any signal. Initially, RS232 ports were used for connecting a dumb terminal (DTE) to a modem (DCE). Nowadays computers used as DTE instead of a terminal. The meaning of the pins is the same on both Data Terminal Equipment and Data Communications Equipment. The names: "receive" and "transmit" should be interpreted from the "point of view" of the computer (DTE).

For this project, the microcontroller works on TTL logic; Logic 1= 5V and Logic 0 = 0V. The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of PIC16F877A with GSM Modem. It is a dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage levels from a single 5V supply. Each receiver converts RS232 inputs to 5V TTL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also called transmitters, convert the TTL/CMOS input level into RS232 level. The transmitters take input from controller’s serial transmission pin and send the output to RS232’s receiver. The receivers, on the other hand, take input from transmission pin of RS232 serial port and give serial output to microcontroller’s receiver pin. MAX232 needs four external capacitors whose value ranges from 1µF to 22µF.

1 comment:

  1. I hope you may continue to keep in posting new posts & thank you for sharing your great experience among us.i will bookmark you and come back soon.distribution boards

    ReplyDelete