MAX202
From uCtrl.net
Contents |
Information
MAX202 is a simple interfacing circuit that makes TTL-leveled signals RS-232 compatible. This allows for devices such as the AVR microcontroller to communicate with a computer or other RS-232 compatible equipment. The large number of capacitors needed is due to the voltage doubler (+10V) and inverter (-10V), these power levels are required to be RS-232 compatible. A stable power source is very important, so if you are experiencing noise or faults in the RS-232 signal you probably need more stabilizing capacitors.
RS-232 and AVR
The circuit on the schematic drawing is MAX232, the capacitor values are not necessary correct for MAX202. Check the datasheet specifications for your device. It's important that the Divide clock by 8 internally fuse is unset.
Projects using MAX202; Serial I/O system.
Source code
The program is written in basic, using Bascom-AVR.
'-------------------------------------------------------------- ' Thomas Jensen '-------------------------------------------------------------- ' file: RS232_test ' date: 27/05/2006 '-------------------------------------------------------------- Dim Name As String * 10 $crystal = 4000000 $baud = 9600 Config Lcdpin = Pin , Db4 = Portb.3 , Db5 = Portb.2 , Db6 = Portb.1 , Db7 = Portb.0 , E = Portb.6 , Rs = Portb.7 Config Lcd = 16 * 2 Cls Cursor Off Print "Welcome to AVR projects" Lcd "Powerup..." Lowerline Do Input "Give your name " , Name Print "Hello " ; Name ; " your serial communication is OK!" Lcd Name Loop End
Images
MAX202 curcuit, AVR to PC |
