How to interface MAX232 with 8051 micrcontrollers?
To receive data from i.e. a PC, you need a level converter, like a MAX232, or use standard components and make your own level converter (diagrams can be found via Google). A level converter is needed because the COMmunication port of a PC switches the data between approx. -9.23 to 9.23 Volt (I measured these levels, can vari a bit from PC to PC), -9.23 Volt corresponds with a logical '0' (lo), 9.23 Volt corresponds with a logical '1' (hi), both on TTL level of 5 Volt, so can be connected directly to the i/o's of an AVR. The MAX232 can convert at a maximum speed of 120kbit/sec. Here a very simple diagram of an RS232 converter (receive data only):



siddiq.com.np