PDA

View Full Version : MAX232 minumum connections.



sccoupe
- 29th March 2009, 17:20
If a max232 chip is only used to convert rs232 to ttl are only 4 pins used? I am sending serial from a pc to a pic with no tx from the pic. The datasheet says that the external capacitors are used for the charge pump to get 5v to rs232 levels. If im not converting that direction do I need these? Should just be Vcc, Vss, R1in and R1out right?

Thanks

Jason

Nicmus
- 29th March 2009, 19:59
Hi Jason,

If you are using the 232 chip you must use the charge pump capacitors (0.1µF or 1µF depending on the chip) no mater how many circuits you are using from the chip.

If you want a “dirty, cheap” way out, look up the SERIN and SEROUT instructions (or variants of it) in the PBP manual. Only one resistor will do the trick. You just have to change the inverted/noninverted mode depending on your choice instruction to be used.
I use it all the time in my development stages and some times I leave it in my final version if the serial communication is not a life or death situation.

HTH

Nick

mister_e
- 29th March 2009, 20:49
You could use any type of inverter based on NPN transistor or Mosfet.

In some situation SERIN (or any else bit-banged solutions) are nice, sometimes they're a pain.

Using the PIC USART have poor and cons. Well, the only 2 small cons I know of are:
1. it use a dedicated PIC input (oh... big deal ;) )
2. Not all PIC USART allow you to use only TX or RX for the USART, and the remaining pin for standard I/O.

sccoupe
- 29th March 2009, 21:27
Curious as to why I need the use of the charge pumps if im not sending anything back to the PC, only reading from. If im not converting "to" rs232, why do I need them, just a need of the chip design? The resistor idea ill give a try, but its nice to look at the whole rs232 voltage swing because of the noisy environment that this project is in.

Nicmus
- 29th March 2009, 22:51
The hole idea of RS232 is the voltage swing from ±5 to 12 V for noise immunity.
To make it more confusing your +5 to 10V is a zero and -5 to 12 V is a 1.

Most of the RS232 devices will recognize logic levels 0-5V from a TTL source but you do not have the built in logic inverter, so you must ask your PIC to do it for you by setting the Invert mode.

The resistor solution is simple but your noise immunity is no longer there. You will have to use shielded cables and short runs.

If you are dealing with a harsh environment you must use the RS232 chip and still limited to relatively short runs (I think 50’ maximum) or go RS485 for fairly longer distances without dealing with charge pumps. The charge pumps in the RS232 chips just generate the ±5 to 12 V and invert your TTL signals so you can use one single 5V supply.

Regards,

Nick