PDA

View Full Version : MAX232 Level Converter



HarryK
- 7th March 2005, 13:05
Hi

I did search for the answer to this first, but couldnt see anything obvious.

I had a simple setup working the other day with a PC to PIC conversation taking place via serial. All was ok.

The PC was sending out serial Data at 2400 baud.

The PIC was responding with serial data at 2400 baud, lovely.

However, someone mentioned using a MAX232 chip. So I got one. I then spent a whole day without any further 232 success. I followed the diagrams and I'm pretty sure it was all connected correctly.

Reading the manual (yes I know, last resort) it mentions the "N" and "T" settings when using "SEROUT".

I was using the following: "SEROUT PORTB.2, N2400,["OK"]" - Or similar

When I was using the MAX232, should I have been using "SEROUT PORTB.2, T2400,["OK"] for "T"rue serial.

Would the "T" or "N" have made any difference or did I just have the MAX232 not wired correctly.

H

mister_e
- 7th March 2005, 17:35
basic of a MAX232... an inverter + level converter (from 5volt to close to 15 volt)

SO, since the computer must read an inverted signal, you must send it inverted... Your pic send it not inverted(true) to the MAX232, the MAX232 invert the signal to the PC... YES you must use T for you communication with a MAX232

HarryK
- 8th March 2005, 09:25
Thanks for that. Problem solved.

I really should read manuals before setting out to do these sort of things.

Doahhhh!.