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

ULPWU and current draw.

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



Joined: 14 Nov 2005
Posts: 14

View user's profile Send private message

ULPWU and current draw.
PostPosted: Thu Dec 07, 2006 2:00 pm     Reply with quote

I'm using the ULPWU feature of the 16F688.

I'm experiencing far more current draw than I should be with things turned off and 100K pullups to VDD on inputs. External circuits should offer ~10uA.

However, I'm measuring 60uA over all. Also I note that if I code the machine such that it is in almost permenant sleep mode, waking to execute just a few instructions, the current drawn in sleep increases to 80uA. Additionally, with the small code set, the current drawn in sleep will rise when the voltage rises but not when a longer wake time is used (50ms). I think this may be something to do with the dynamics of the LCD meter I'm using, but I'm not sure.

The ULPWU has a 200nA current sink to draw from the RC load but shouldn't affect anything.

My question is, given there is digital CMOS circuitry in that area and a slow changing voltage on the input pin due to the RC and current generator, could this explain the additional current I am measuring?

Regards,

Steve Jaglowski
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 07, 2006 9:37 pm     Reply with quote

I would look for modules that are still enabled when the PIC is put into
sleep mode. Look for modules that use amount of current:

1. Brownout Detect
2. Comparator
3. Comparator Vref
4. Weak pull-ups on Port A, with an external circuit holding the pin low.

Any of those could account for the 60 ua.
s.jaglowski



Joined: 14 Nov 2005
Posts: 14

View user's profile Send private message

PostPosted: Fri Dec 08, 2006 4:59 pm     Reply with quote

Hi thanks for the suggestion.

I'd already done that and theoretically all are off as are pull ups. I am going back however to turn them on to see if the current increases. Its the only way I can make sure I have actually turned them off.

I agree with the premise though; it must be something I think I've turned off but must actually be on.

.....................

OK. I tried out turning things on and sure enough the current increased and then decreased when I turned them off. So I know they are off.

What's going on?

Regards,

Steve Jaglowski
s.jaglowski



Joined: 14 Nov 2005
Posts: 14

View user's profile Send private message

PostPosted: Fri Dec 15, 2006 9:32 am     Reply with quote

Just to close the thread with the solution to the problem.

It turns out, the source of the current was the receiver circuit of an IrDA device I was using.

Although the shutdown pin for the device was in the required state, it turns out the shutdown only operated the transmitter circuit. This feature was not mentioned in the data sheet. The receiver was automatically shut down when a bit was being transmitted (a high on the TX pin) to prevent local echo. I believed the output state on the pin didn't matter and coincidently had it low.

So I wasn't stupid (which I did think at one point); just ignorant of features not declared in data sheets.

Now who do I bill for the time this took me to resolve???

Regards,

Steve Jaglowski
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