CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How to disable MAX232 ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

How to disable MAX232 ?
PostPosted: Thu Oct 16, 2008 9:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Oct 16, 2008 10:14 am     Reply with quote

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

View user's profile Send private message

Re: How to disable MAX232 ?
PostPosted: Thu Oct 16, 2008 6:44 pm     Reply with quote

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

View user's profile Send private message AIM Address

the part you want is the MAX-222 actually
PostPosted: Fri Oct 17, 2008 7:13 pm     Reply with quote

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 Smile
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

PostPosted: Mon Oct 20, 2008 12:21 am     Reply with quote

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...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group