How to index Port variable


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default This works

    Code:
    Counter VAR BYTE
    Output  VAR PORTB.0
    
    START:
        FOR Counter = 0 to 7
            Output[Counter] = 1  'High
            PAUSE 100
            Output[Counter] = 0  'Low
            PAUSE 100
        NEXT
        GOTO START:
    END
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=4002&stc=1&d=126640253 9">
    Attached Images Attached Images  
    Roger

Similar Threads

  1. EEPROM Variables (EE_Vars.pbp)
    By Darrel Taylor in forum Code Examples
    Replies: 79
    Last Post: - 26th October 2012, 00:06
  2. accessing ports pins using an index variable
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th March 2008, 20:36
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  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. Question on assigning pin port to variable
    By khufumen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st June 2005, 22: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