Why Use a Max232?

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
NoSmoke
Posts: 23
Joined: Wed Feb 07, 2007 2:24 am
Location: Calgary, Alberta, Canada

Why Use a Max232?

Post by NoSmoke » Wed Jan 13, 2010 5:34 pm

I'm looking at connecting my 18F4520 to the PC via the serial port and I gather from another thread that an interface chip such as the Max232 is required. I wonder though why that is necessary as the PicAxe project boards communicate with the PC via the Pic's serial port with only a direct connection to the Pic Tx pin and a resistor divider to the Rx pin (or maybe it's the other way around). I suppose I could try it that way but would like to ask for some advice b/f risking damage to the chip or PC port

Any assistance appreciated......

Laurie Forbes

Raistlin
Registered User
Registered User
Posts: 69
Joined: Tue Apr 01, 2008 1:13 pm

Post by Raistlin » Wed Jan 13, 2010 6:04 pm

TTL levels are 5v logic 1 and 0v logic 0 and are inverted when compared to RS232 levels of +12v and -12v.

While most modern serial ports will accept 0-5 volts and you can invert in software it is not standard and is unadvisable.

If you plug onto an older serial port your gonna get a poped pic.

the picaxe just inversts the logic in software which you can 'get away with' personally i'd never do it.

if your wanting to use the hardware uart on a pic then you must use a max232 as logic levels are fixed in hardware , only software serial is capable of this type of jiggery pokery.
If you can read this you are too close

NoSmoke
Posts: 23
Joined: Wed Feb 07, 2007 2:24 am
Location: Calgary, Alberta, Canada

Post by NoSmoke » Wed Jan 13, 2010 6:52 pm

Ah, thanks for the explanation. Looking again at the Picaxe schematic, I see that the serial in line has the resistor divider, I guess to reduce the RS232 level to 5V or so, while the serial out can be connected directly.

I think I'm gonna try it anyhow (don't have a max232 handy and it might be educational in any case).

Thanx again for the help.......

Laurie Forbes

Update:

Switched program to software UART and transmit to PC works perfectly. Now to try transmitting to Pic....

Post Reply