Newbie Pause Question


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    16

    Default Newbie Pause Question

    Is it possible to use a variable with the Pause command?

    Here's my code. It seems to compile but won't run on my 16f88. To test it I connected an LED to Port A.2 that should flash on/off with longer and longer duration:

    i var word
    ii var word

    ii = 200

    For i = 1 to 100
    HIGH PORTA.2 ' Turn on LED connected to PORTA.2
    Pause ii ' Delay

    Low PORTA.2 ' Turn off LED connected to PORTA.2
    Pause ii ' Delay

    ii = ii + 200

    Next i

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Your code should work as described.

    Well ... barring other problems like ... Analog mode or CONFIGs.

    Possibly ...

    Presetting Configuration Fuses (PIC Defines) into your Program
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    Another good thread ...

    PortA Doesn't Work
    http://www.picbasic.co.uk/forum/showthread.php?t=561
    <br>
    DT

  3. #3
    Join Date
    Dec 2008
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel

    Turns out it was a bad LED.

    Yes, Pause can be used with a variable.

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Replies: 11
    Last Post: - 12th July 2008, 02:36
  4. Fade out LEDs question
    By Sam in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd June 2008, 10:50
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

Members who have read this thread : 1

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