Assigning a variable to only a few pins?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Dayaks's Avatar
    Dayaks Guest

    Unhappy Assigning a variable to only a few pins?

    I have a 12F683 and I was curious on how you would assign, let's say "x = pins 3,4,5".

    Thanks

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink very simply

    I.e.

    X.0 = GPIO.0
    X.1 = GPIO.1
    X.2 = GPIO.2
    .
    .
    .

    And so on ...

    Alain

    PS : small head ... mmmmmhhhh !!!
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Dayaks's Avatar
    Dayaks Guest


    Did you find this post helpful? Yes | No

    Default Bahh

    Ignore last port... I needed to define variables.. x = byte, ect. I assumed PBP did this automatically. Good ole' assumptions...
    Last edited by Dayaks; - 28th August 2006 at 10:54.

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. Question on assigning pin port to variable
    By khufumen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st June 2005, 22:25
  5. Accessing pins with a variable
    By Desterline in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 20th August 2004, 16:03

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