Yes, I do this sort of thing all the time in very low power battery designs. Right before you sleep the PIC, power down the MAX3232 and disable the UART. Set the pin of the PIC that's normally the RXD input low -- it shouldn't draw any current as the MAX3232 should be completely powered down. Make sure you don't have a pullup resistor on this input that is pulled high with a supply that is present during sleep mode. That will cause current to flow into the RXD pin. When you wakeup from the key press, re-enable the UART, power up the MAX3232 and proceed normally. This scenario is pretty common anytime you have a UART connected device that you power down and sleep the PIC. Low power stuff is "interesting"... you have to account for all current paths and leakage currents to get to really low power sleep mode. Sometimes they are difficult to find! Matt Pobursky Maximum Performance Systems On Tue, 1 Sep 2015 14:32:43 -0400, John Hansen wrote: > I'm working on a design that has a keypad, a 16F1847 and a MAX3232 for > RS232 conversion. The idea is to have the PIC sleep until a key is > pressed and then have the circuit transmit an RS232 string depending on > which key on the keypad has been pressed. I started with just the keypad > and the PIC with a flashing LED to indicate which key had been pressed. > I have the keypad connected to the PIC on portb. All worked quite well > with the PIC consuming 10 ua in sleep. When a key was pressed the PIC > woke up, flashed the LED the requisite amount of times and then went back > to sleep. > > I then added a MAX3232 to the circuit and interface the RS232 side of > this chip to a PC. I had the MAX3232 powered from one of the pins on the > PIC so I could turn it off except when it was needed to transmit data. > I'm bit-banging the serial data because the EUSART pins are on portb > where the keypad is connected. > > When I hook up the power connection on the MAX3232 everything still works > fine, with a power consumption of about 10 ua except when I'm pressing a > key. But when I hook up the TTL side to the MAX3232, the idle current > jumps to 80 ua and after a keypress, the PIC doesn't go back to sleep. > The PIC datasheet says that one must be careful during sleep not to have > I/O pins floating and I'm guessing that by having the MAX3232 powered > down, I'm essentially allowing those two connections to float and this is > causing the problem. But keeping the power on to the MAX3232 would > defeat the purpose of putting the PIC to sleep. > > By experimenting with the MAX3232 connections one at a time, I've been > able to determine that it is the connecting the PIC receive data line > that causes the idle current consumption to rise from 10 to 80 ua and it > is connecting the PIC transmit data line that causes the PIC to not go > back to sleep. > > Anybody have any thoughts on how to get around this? > > Thanks in advance, > > John --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .