16F690... How to wake from sleep?


Results 1 to 4 of 4

Threaded View

  1. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,617


    Did you find this post helpful? Yes | No

    Default Re: 16F690... How to wake from sleep?

    Hi,
    That's weird, we just had a similar discussion here
    PBP's SLEEP statement accepts and expects a time, in seconds. It then uses the WDT to keep track of the time and continue your PBP program after the number of seconds you specify, roughly.
    Code:
    Main:
    'Do this
    'Do that
    SLEEP 60
    Goto Main
    During those 60 seconds sleep the PIC will wake up briefly, each time the WDT times out, look at the watch and decide if it's time to go to work or if it can go back to sleep. Once it has woken up enough times to "accumulate" 60 seconds it will continue.

    EDIT: Oh, both PBP's SLEEP and @ SLEEP puts the PIC to sleep and the WDT (or an interrupt) wakes the PIC up in both cases. The difference is that the PBP statement has that built in accumulator, basically keeping track of the number of wake-ups, which allows you specify the amount of time you wish to sleep. With @ SLEEP it's one WDT period - period.
    /Henrik.
    Last edited by HenrikOlsson; - 5th July 2011 at 19:40.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts