How to go to sleep


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    I don't know if the
    Code:
    INTCON = $88    ' enable interrupts on RB4 through RB7
    is right

  2. #2
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    some one to help me;

  3. #3
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    INTCON=$88 looks good to me. You've got the interupts enabled, and Port B change enables also.

    Keeping in mind I've not done interupts in PBP (raw assembler yeah) I'd put the button handeling code inside the interupt handler. However, this would be a problem with the BUTTON command as that wants to be inside a loop, so maybe wake up for a while every time you see a keychange.

  4. #4
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ErnieM
    However, this would be a problem with the BUTTON command as that wants to be inside a loop.
    Maybe this is the my problem and i don't know how to solve.

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. SLEEP Command and Interupts 16F648A
    By ghoot in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 28th May 2004, 18:35

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