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

problem in sleep mode function in ccs compiler
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19258

View user's profile Send private message

PostPosted: Sun Mar 12, 2017 1:50 am     Reply with quote

He doesn't need them.

On this chip the only sleep options are 'full', and 'idle'. On this compiler version, you enable idle, by setting the OSC_IDLE_MODE bit with setup_oscillator, before calling sleep (exactly as the data sheet says!...).

He is complaining that he thinks the chip is not sleeping, because it draws a lot of power, and also seems to wake up. These imply that either he has an interrupt flag set (which would stop it going to sleep), or one is becoming set (which would wake it), or other things in his circuit are drawing power (which would explain the current).....
temtronic



Joined: 01 Jul 2010
Posts: 9134
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Mar 12, 2017 7:22 am     Reply with quote

I just downloaded the datasheet and that PIC only draws 20 nanoamps while in sleep yet his draws 10 milliamps. Thats a huge difference !
I suspect 'other' devices are the culprits. The line 'mdm_inti();' implies there a modem attached to the PIC. Without seeing the schematic or a parts list,odds are good it's the 'other stuff' that's the real power drain.

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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