View previous topic :: View next topic |
Author |
Message |
championx
Joined: 28 Feb 2006 Posts: 151
|
How to disable MAX232 ? |
Posted: Thu Oct 16, 2008 9:04 am |
|
|
I'm making a low power consumption device. It has a max232. The problem is that the max232 consumes 4mA (a lot). How can I disable it?
Thanks! |
|
|
libor
Joined: 14 Dec 2004 Posts: 288 Location: Hungary
|
|
Posted: Thu Oct 16, 2008 10:14 am |
|
|
You have two options, one requires the redesign of your board: cut off the power supply of the MAX232 when not needed (the easiest would be to supply it from one of the PIC's port directly. It can handle up to 20mA which I thinj is enough for the MAX232. You can use a high-side switching BJT or FET also. Be sure not to drive the MAX inputs when it is switched off.
The other option is to replace the MAX232 with a MAXxxx that has a feature called Auto-Shutdown, this means the transceiver will go into a low-power mode (typically 1uA) when there's no activity on the serial line for a certain time. |
|
|
MarcosAmbrose
Joined: 25 Sep 2006 Posts: 38 Location: Adelaide, Australia
|
Re: How to disable MAX232 ? |
Posted: Thu Oct 16, 2008 6:44 pm |
|
|
championx wrote: | I'm making a low power consumption device. It has a max232. The problem is that the max232 consumes 4mA (a lot). How can I disable it?
Thanks! |
Hi championx,
I had this exact same problem not so long ago. But it's easy to fix in software. As you've already concluded, the problem is caused by the Max chip drawing power through the PICs IO pins. The solution is to turn the UART off, Set all your IO pins to outputs then drive them low prior to putting your device to sleep.
Code: |
//*************************************************
// Turn off uart so we dont draw power through
// the RS485 line driver chip.
//*************************************************
setup_uart(0);
//*************************************************
// Set all pins to outputs and drive then low.
//*************************************************
set_tris_a(0x00);
set_tris_b(0x00);
set_tris_c(0x00);
output_a(0x00);
output_b(0x00);
output_c(0x00);
sleep(); //Put processor to sleep.
|
You'll need to re-initialise your IO pins when your device wakes up or is reset. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
the part you want is the MAX-222 actually |
Posted: Fri Oct 17, 2008 7:13 pm |
|
|
MAX-222 is 18 pins and the low 16 are compatible with the layout of a 16 pin max-232
the 222 has a power down control pin
and in our designs, the TI version of the part
draws less than 1ua - shut down state
and only needs .1UF ceramic power storage
caps instead of 1uF
same $$ too
now go forth and prosper |
|
|
crystal_lattice
Joined: 13 Jun 2006 Posts: 164
|
|
Posted: Mon Oct 20, 2008 12:21 am |
|
|
You could alternatively use the MAX3232 which is a drop-in replacement for the MAX232, it is a low voltage capable part, but might also offer better current consumption benefits... |
|
|
|