How long a pause needed between port ops


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Posts
    2

    Default How long a pause needed between port ops

    How long of a delay should it take to make one led stay on when another is turned on as below

    PICkit 2
    pic16f690
    PBP with MPLAB

    LED_power var PORTC.0 ' Alias PORTC.0 to LED for power incicator
    LED_shift var PORTC.1 ' led for Shift clock
    LED_DI var PORTC.2 ' led for DI
    LED_done var PORTC.3 ' led for Finished with changes
    trisc = %00000000

    high led_power
    pause 1000
    HIGH LED_SHIFT
    pause 1000
    HIGH LED_done

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


    Did you find this post helpful? Yes | No

    Default

    The delay only determines how fast each one turns on.

    To get them to stay on, you'll need to turn off the Analog functions.

    Code:
    ANSEL = 0
    ANSELH = 0
    DT

  3. #3
    Join Date
    Apr 2009
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Your a hero for me. I struggled with this for awhile and found the forum thread about putting a PAUSE 1 in the code because of the read/update/write. So I included the code thinking that I might be leaving something out. Thanks...........

Similar Threads

  1. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  2. Replies: 11
    Last Post: - 12th July 2008, 02:36
  3. Fade out LEDs question
    By Sam in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd June 2008, 10:50
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  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 : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts