|
|
View previous topic :: View next topic |
Author |
Message |
young
Joined: 24 Jun 2004 Posts: 285
|
sleep and timer |
Posted: Wed Nov 24, 2004 2:31 pm |
|
|
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 |
Posted: Wed Nov 24, 2004 3:47 pm |
|
|
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
|
|
Posted: Mon Nov 29, 2004 7:49 am |
|
|
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? |
|
|
|
|
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
|