Using "END" in a subroutine?


Results 1 to 7 of 7

Threaded View

  1. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    STOP creates an endless loop with a CLRWDT instruction + GOTO back to the label at
    the CLRWDT instruction.

    END creates a loop with a SLEEP instruction + GOTO back to the label at the SLEEP
    instruction.

    Either will work, but END saves power. If you need it to goto sleep and never wake up
    just insert an @ SLEEP at your label, and disable WDT, interrupts, etc..
    Last edited by Bruce; - 13th February 2010 at 15:33.
    Regards,

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

Similar Threads

  1. Multiple RETURNS within a single subroutine
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st June 2009, 16:43
  2. Pulsin within subroutine
    By Wesley in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 10th January 2009, 23:05
  3. subroutine with hserin
    By volcane in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 19th December 2007, 02:56
  4. subroutine for picbasic
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2005, 18:58
  5. Replies: 0
    Last Post: - 28th May 2004, 17:25

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