Multiple Variables - Pins


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Posts
    24

    Default Multiple Variables - Pins

    I would like to make one variable an alias for more then one pin. So far I have not been able to make it work. Here is an example of what I have tried. There are more but this gives the idea. What am I doing wrong, or is it possible? Array?

    Code:
    s1 var porta.1 & porta.2

  2. #2
    Join Date
    Jan 2010
    Location
    morocco
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by GatorGuy View Post
    I would like to make one variable an alias for more then one pin. So far I have not been able to make it work. Here is an example of what I have tried. There are more but this gives the idea. What am I doing wrong, or is it possible? Array?

    Code:
    s1 var porta.1 & porta.2
    if you wnna drive pins EX: portb output and input this will helps u
    Code:
    S_1 VAR  PORTB
    
    S_1 = %00000001
    S_1 = %XXXXXXXX
    '  so on ...     do what you want
    hope this will helps you
    Last edited by MR2010; - 1st February 2010 at 01:11.

Similar Threads

  1. Variables and port pins
    By PeterReed in forum mel PIC BASIC
    Replies: 2
    Last Post: - 22nd September 2009, 14:01
  2. Aliasing multiple pins
    By eshatara in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th April 2009, 14:53
  3. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  4. Variables not appearing in Watch Window MPLabv7.3
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th June 2006, 14:36
  5. PIC PORT 'special' pins
    By barkerben in forum General
    Replies: 1
    Last Post: - 18th January 2005, 21:40

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