Searching \ for '[PIC]: How do I use indiect referrencing using pic' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'How do I use indiect referrencing using pic'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: How do I use indiect referrencing using pic'
2000\07\06@222015 by Mathew Cohen

flavicon
face
Hi All,

Can someone enlighten on how to indirectly referrence a pin/input or output
Take no notice of the application it is just so you can figure out what I am
trying to achieve.
i.e.
input1    var    portb.1
input2    var    portb.2
input2    var    portb.3
led1    var    porta.1
led2    var    porta.2
led3    var    porta.3
temp    var    byte

   If     temp < 3    then
    temp = temp +1
   Else
    temp = 1
   Endif

   If  ( input+temp ) then        'I don't know what the syntax for the
referrencing. Is it possible ????
    High    led+temp
   Else
    Low    led+temp
   Endif



Thanks in Advance


Mathew Cohen

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\07\07@132238 by Timothy Box

flavicon
face
Mathew

Since led1, input1 can only be a 1 or 0, so you can only check it for those
states

   If  ( input+temp ) then

should read

    If input1 = 1 and input 2 = 0 then

or if you are checking both for the same state

    If input1 and input 2 = 1 then




Hope that helps

PS it's probably quicker if you look in the manual.


Tim Box

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...