Sleep & nap


Closed Thread
Results 1 to 25 of 25

Thread: Sleep & nap

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi,

    From " The Manual" $ 5.46

    Alain
    TRUE!

    But SLEEP should work, shouldn't it?
    The problem is somewhere else, but where?

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Question

    Hi,

    You want a ~1 sec PAUSE ...

    use PAUSE 1000 !!!

    a PAUSE can be "interrupted" so, there are no problem to use it ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    If you're using the Microchip USB loader, it may have WDT disabled in config.

    Try inserting WDTCON.0=1 before any NAP or SLEEP commands to enable WDT.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    If you're using the Microchip USB loader, it may have WDT disabled in config.

    Try inserting WDTCON.0=1 before any NAP or SLEEP commands to enable WDT.
    One would have think that would work, but it did not
    What might be wrong?

    WDTCON.0=1
    sleep 1
    lcdout $FE, $C0, "ok"

    Can't still se the "ok"

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Can't still see the "ok"

    Could the problem come from the LCD setup ???

    Code:
    pause 1
    lcdout $FE, 1
    pause 1
    Generally, we allow 500 ms min for the LCD Power on ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    How long are you waiting? If the WDT poscaler in config is set to 32,768 it's going to take around 131 seconds before it wakes-up.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    How long are you waiting? If the WDT poscaler in config is set to 32,768 it's going to take around 131 seconds before it wakes-up.
    the WDTPS is 128 as in #9, and actually it takes several seconds before that sleep instrucion is reached in the demo code (#9) as well as in the "big" code where I spotted this phenomena/error/failure at first.

    I have never seen sleep working, yet...
    but I would really like to see it

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  3. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  4. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06
  5. Replies: 5
    Last Post: - 5th February 2006, 16:51

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