16F628A current high during sleep


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    974


    Did you find this post helpful? Yes | No

    Default

    I am not sure if you have seen this.

    Excerpt from the datasheet of PIC16F917. I am sure this applies to the 628 too though I have not checked it.

    <Quote>
    When the SLEEP instruction is being executed, the next
    instruction (PC + 1) is pre-fetched. For the device to
    wake-up through an interrupt event, the corresponding
    interrupt enable bit must be set (enabled). Wake-up is
    regardless of the state of the GIE bit. If the GIE bit is
    clear (disabled), the device continues execution at the
    instruction after the SLEEP instruction. If the GIE bit is
    set (enabled), the device executes the instruction after
    the SLEEP instruction, then branches to the interrupt
    address (0004h). In cases where the execution of the
    instruction following SLEEP is not desirable, the user
    should have a NOP after the SLEEP instruction.
    </quote>

    Perhaps, you need to take care of this

    Like this
    @ sleep
    @ nop
    @ nop

    I use this for my 628 programs and get the sleep operate correctly.

    Jerson

  2. #2
    Rubicon's Avatar
    Rubicon Guest


    Did you find this post helpful? Yes | No

    Default

    Yes I admit to seeing that in the 16F628 datasheet and I tried a single nop without the @ after the sleep command without success. I'll put in what you suggest and see what happens today.

    Thanks,

    Rubicon.

  3. #3
    Rubicon's Avatar
    Rubicon Guest


    Did you find this post helpful? Yes | No

    Default

    Well that didn't work nor did trying it without the @. Back to looking at the pin states and doing a schematic.

    Thanks for your help here. I do appreciate it.

    Regards,

    Rubicon.

Similar Threads

  1. SERIN MIDI out of Synch?
    By jncortes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2009, 20:08
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Using Sleep
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th August 2008, 04:05
  4. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37
  5. 16F628A sleep current
    By David Marks in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th February 2005, 15:12

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