Asm sleep - pbp sleep


Results 1 to 32 of 32

Threaded View

  1. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: Asm sleep - pbp sleep

    Here is something from me:

    1. Leave the RX pin unconnected for testing. Check the pin state. Does it stay low or high? If it is high and you get int at high already, then it never sleeps.
    2. IF all ok, then before sleep instructon, disable GIE and PEIE first. Disable eusart module. Then re-enable it. clear the flags. Then enable GIE, PEIE and lastly usart int bit. Make sure usart flag is cleared, and Usart int bit enabled at the last just before SLEEP command.
    3. There should be at least two NOP() immediately after SLEEP.
    4. If there are some other ints in your code not shown here, than they may be the cause of wake up. Remember, Most of the ext int sources wake the device up eventhough you do not care for them. Make sure you disable all other ext int sources (if you are using any) before SLEEP.
    Last edited by sayzer; - 11th May 2020 at 09:42.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Can't @sleep
    By MOUNTAIN747 in forum General
    Replies: 3
    Last Post: - 30th December 2010, 18:29
  2. Trying to add a sleep function or pretend to sleep
    By lilimike in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th May 2010, 20:10
  3. Help with PBP 'SLEEP' command
    By dreadmaul in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th November 2006, 08:40
  4. How to go to sleep
    By savnik in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd September 2006, 19:38
  5. Sleep Mode in PBP
    By Keith in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th March 2005, 21:58

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