PDA

View Full Version : are MAX232s neccessary?/ Increase reliability?



ericmiles
- 4th November 2007, 00:35
Hello everybody,

I am using a pic18F4520 for some basic PC/PIC serial communication. I really don't need to send that much data back and forth, but I do want everything to be as reliable as possible.

I am currently not using a max232 and everything works fine. I have some resistors in place as per the PBP manual. I've also read that a max232 is uneccesary when communicating between PIC and PC

http://en.wikibooks.org/wiki/Serial_Programming:MAX232_Driver_Receiver.

Intuitively, it makes sense to use a max232 because of the different line levels. However, if the designers of the PIC and the PC have already taking the necessary steps to make the max232 uneccessary, than there's no need to add it in . . .

. . . unless using it would increase overall reliability in some way. Then it would be a good idea.

any thoughts?
eric

Art
- 4th November 2007, 08:14
Never needed one myself.
RS232 standdards seem to have fallen by the wayside, as has support for serial in general.
There is rarely really 12 Volts present at the serial port of any portable device.

mackrackit
- 4th November 2007, 10:54
Never used on either.
Just use an inverted mode for the baud.

Luciano
- 4th November 2007, 10:55
Hi Eric,

RS-232 is an "inverted" logic, so logical "1" is represented as a
low level, and a logical "0" is a high level.

Reliability is achieved if you use the hardware UART of a PIC.
The TTL input and output of a hardware UART are not inverted so
before you can receive data from a PC or send data to a PC you will
need to invert the signals.

Best regards,

Luciano

arniepj
- 4th November 2007, 20:56
A 232 transceiver will provide you with electro static discharge protection and the proper standard voltage levels,which increases noise immunity.This means you can have longer cable runs without drastic waveform degradation.Pc's have transceivers designed into them.If all you plan to do is connect pic to pc for experiments,don't use the transceiver.If your designing for robustness ,better to be safe than sorry.I always use the hardware uart to a transceiver,then dealing with inversions is never a question.

GeoJoe
- 5th November 2007, 04:18
It's always a good idea. Beside the MAX chips are very cool. The capacitor charge pumps are very cool circuits.

wayne2056
- 19th November 2007, 18:17
Hello,

I would like to verify that if I have chosen to use the picbasic method of RS232 interfacing with a 1K resistor from ( 16F877 ) portC.6 to the PC RS232 DB9 pin 2 and a 22K resistor from portC.7 to PC RS232 DB9 pin3, that I can not use the HSERIN or HSEROUT commands.

I tried and have no luck with the HW commands. Tried about every sample piece of code I could find in the forum.

SERIN, SEROUT commands on the other hand work just fine.

Curious why? I'm assuming it's to do with the data inversion as such...

Thanks,
Wayne