saving program variables


Results 1 to 17 of 17

Threaded View

  1. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    OOPS i am really sorry about that.... i really don't know where my head was when i wrote it. Thanks Dwayne for correcting me!

    here's a little example
    Code:
    SetButton VAR PORTA.0
    InitialValue VAR BYTE
    
    Read 0,InitialValue
    
    start:
           While NOT SetButton
                 PORTB=InitialValue
                 pause 1000
                 PORTB=0
                 PAUSE 1000
           Wend
           InitialValue=InitialValue-1
           write 0,Initialvalue
           While setbutton
           wend       
           pause 50 ;cheap way to debounce pushbutton
           goto start
    Last edited by mister_e; - 1st November 2004 at 19:19.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. Saving variable(s) contents before power is removed
    By emavil in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th July 2007, 17:26
  4. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30
  5. Saving Variables
    By Tear in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th June 2005, 19:48

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