The MAX232 requires 5 external 1uF capacitors. These are used by the internal charge pump to create +10 volts and -10 volts.
• For the first capacitor, the negative leg goes to ground and the positive leg goes to pin 16.
• For the second capacitor, the negative leg goes to 5 volts and the positive leg goes to pin 2.
• For the third capacitor, the negative leg goes to pin 3 and the positive leg goes to pin 1.
• For the fourth capacitor, the negative leg goes to pin 5 and the positive leg goes to pin 4.
• For the fifth capacitor, the negative leg goes to pin 6 and the positive leg goes to ground.
The MAX232 includes 2 receivers and 2 transmitters so two serial ports can be used with a single chip. We will only use one transmitter for this project. To power the MAX232, Connect pin 16 to 5 volts. Connect pin 15 to ground.
UART (Universal Asynchronous Receiver Transmitter) or USART (Universal Synchronous Asynchronous Receiver Transmitter) are one of the basic interface which you will find in almost all the controllers available in the market till date. This interface provide a cost effective simple and reliable communication between one controller to another controller or between a controller and PC.
RS-232 Level Converters
Usually all the digial ICs works on TTL or CMOS voltage levels which cannot be used to communicate over RS-232 protocol. So a voltage or level converter is needed which can convert TTL to RS232 and RS232 to TTL voltage levels.
The most commonly used RS-232 level converter is MAX232. This IC includes charge pump which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also includes two receiver and two transmitters and is capable of full-duplex UART/USART communication.
MAX232 Interfacing with Microcontrollers
To communicate over UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). So to interface MAX232 with any microcontroller (AVR, ARM, 8051, PIC etc..) we just need the basic signals. A simple schematic diagram of connections between a microcontroller and MAX232.
Bits SM0 and SM1 let us set the serial mode to a value between 0 and 3, inclusive. The four modes are defined in the chart immediately above. As you can see, selecting the Serial Mode selects the mode of operation (8-bit/9-bit, UART or Shift Register) and also determines how the baud rate will be calculated. In modes 0 and 2 the baud rate is fixed based on the oscillators frequency. In modes 1 and 3 the baud rate is variable based on how often Timer 1 overflows. Well talk more about the various Serial Modes in a moment.
The next bit, SM2, is a flag for "Multiprocessor communication." Generally, whenever a byte has been received the 8051 will set the "RI" (Receive Interrupt) flag. This lets the program know that a byte has been received and that it needs to be processed. However, when SM2 is set the "RI" flag will only be triggered if the 9th bit received was a "1". That is to say, if SM2 is set and a byte is received whose 9th bit is clear, the RI flag will never be set. This can be useful in certain advanced serial applications. For now it is safe to say that you will almost always want to clear this bit so that the flag is set upon reception of any character.
TH1 = 256 - ((Crystal / 192) / Baud)
TH1 = 256 - ((11059000 / 192) / 19200)
TH1 = 256 - ((57699) / 19200)
TH1 = 256 - 3 = 253
MAX 232 serial communication between humidity data acquisition unit and computer
BACK to Content Page
. Next Page
. Previous Page
MAX 232 serial communication between humidity data acquisition unit and,computer,max232 circuit,max232 schematic,max232 datasheet,max232cpe,rs232,max232n,max233,max485,look rs232 software,serial port software,serial port rs232,docklight rs232 terminal rs232 monitor
• For the first capacitor, the negative leg goes to ground and the positive leg goes to pin 16.
• For the second capacitor, the negative leg goes to 5 volts and the positive leg goes to pin 2.
• For the third capacitor, the negative leg goes to pin 3 and the positive leg goes to pin 1.
• For the fourth capacitor, the negative leg goes to pin 5 and the positive leg goes to pin 4.
• For the fifth capacitor, the negative leg goes to pin 6 and the positive leg goes to ground.
The MAX232 includes 2 receivers and 2 transmitters so two serial ports can be used with a single chip. We will only use one transmitter for this project. To power the MAX232, Connect pin 16 to 5 volts. Connect pin 15 to ground.
UART (Universal Asynchronous Receiver Transmitter) or USART (Universal Synchronous Asynchronous Receiver Transmitter) are one of the basic interface which you will find in almost all the controllers available in the market till date. This interface provide a cost effective simple and reliable communication between one controller to another controller or between a controller and PC.
RS-232 Level Converters
Usually all the digial ICs works on TTL or CMOS voltage levels which cannot be used to communicate over RS-232 protocol. So a voltage or level converter is needed which can convert TTL to RS232 and RS232 to TTL voltage levels.
The most commonly used RS-232 level converter is MAX232. This IC includes charge pump which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also includes two receiver and two transmitters and is capable of full-duplex UART/USART communication.
MAX232 Interfacing with Microcontrollers
To communicate over UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). So to interface MAX232 with any microcontroller (AVR, ARM, 8051, PIC etc..) we just need the basic signals. A simple schematic diagram of connections between a microcontroller and MAX232.
Bits SM0 and SM1 let us set the serial mode to a value between 0 and 3, inclusive. The four modes are defined in the chart immediately above. As you can see, selecting the Serial Mode selects the mode of operation (8-bit/9-bit, UART or Shift Register) and also determines how the baud rate will be calculated. In modes 0 and 2 the baud rate is fixed based on the oscillators frequency. In modes 1 and 3 the baud rate is variable based on how often Timer 1 overflows. Well talk more about the various Serial Modes in a moment.
The next bit, SM2, is a flag for "Multiprocessor communication." Generally, whenever a byte has been received the 8051 will set the "RI" (Receive Interrupt) flag. This lets the program know that a byte has been received and that it needs to be processed. However, when SM2 is set the "RI" flag will only be triggered if the 9th bit received was a "1". That is to say, if SM2 is set and a byte is received whose 9th bit is clear, the RI flag will never be set. This can be useful in certain advanced serial applications. For now it is safe to say that you will almost always want to clear this bit so that the flag is set upon reception of any character.
TH1 = 256 - ((Crystal / 192) / Baud)
TH1 = 256 - ((11059000 / 192) / 19200)
TH1 = 256 - ((57699) / 19200)
TH1 = 256 - 3 = 253
MAX 232 serial communication between humidity data acquisition unit and computer
BACK to Content Page
. Next Page
. Previous Page
MAX 232 serial communication between humidity data acquisition unit and,computer,max232 circuit,max232 schematic,max232 datasheet,max232cpe,rs232,max232n,max233,max485,look rs232 software,serial port software,serial port rs232,docklight rs232 terminal rs232 monitor
No comments:
Post a Comment