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

sleep and timer

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



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

sleep and timer
PostPosted: Wed Nov 24, 2004 2:31 pm     Reply with quote

I am using sleep to save power in a project, I also need in this project to count a pulse, I do not know if sleep mode will affect the timer mode, will the sleep also put the timer into sleep also?
Ttelmah
Guest







Re: sleep and timer
PostPosted: Wed Nov 24, 2004 3:47 pm     Reply with quote

young wrote:
I am using sleep to save power in a project, I also need in this project to count a pulse, I do not know if sleep mode will affect the timer mode, will the sleep also put the timer into sleep also?

If you are using the CCP, as a 'timer', what are you going to use as an oscillator for the timer?. On some PICs, you can leave a timer running, off an external crystal, while the chip sleeps. Normally though, the chip's oscillator stops, so the timer will inherently stop.
If you are using the CCP as a counter, for a pulse that is generated externally, then a look at the data sheet for your chip will show if the particular counters still run. On (for instance), the 18Fxx2, both timer1, and timer3, will still operate, if they are in 'asynchronous' mode (not dependant on the processors clock). The 'key', is that these two timers have the option to use an external clock. The Microchip data sheet for your particular chip, is the 'goldmine', needed for this sort of data.

Best Wishes
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Mon Nov 29, 2004 7:49 am     Reply with quote

what I am wondering right now is I need to setup a sleep mode using a timer and get a reading after a certain period for save energy, for example WDT. if I am using another timer, for example timer1, and count the pulse, timer1 interrupt the sleep, and weakup the chip as well as WDT does, this will afect my setup of certian period.

I am wondering if I could setup a sleep mode and do the pulse counting symoutanously, and the pulse count wont interface sleep mode?
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