Hi. Ive seen this in Darrel Taylor's hello world example on his site
Is it possible to do the same thing with an array?Code:LED1 VAR PORTB.1
EG
Code:LED[1] VAR PORTB.1
Hi. Ive seen this in Darrel Taylor's hello world example on his site
Is it possible to do the same thing with an array?Code:LED1 VAR PORTB.1
EG
Code:LED[1] VAR PORTB.1
Maybe Bruce or Melanie or Sayzer can help.
Indexing Port Pins
http://www.picbasic.co.uk/forum/showthread.php?t=3753
_
DT
Hmm. From reading that it doesnt look like i can do it the way i want. I could do what i want with a few if statements.
What i wanted to do
What i will have to doCode:for x=0 to 15 if condition(x)=true then high pins(x) endif next
Code:if condition(0)=true then high porta.1 endif if condition(1)=true then high porta.4 endif 'etc
Master, don't beat me.
But PLEASE try to read Bruce's post.
The answer really is there.
<br>
DT
Oh. Ill read it through again. It looked like something similar was happening but not exactly what i was after. Ill have another read though and see if i get it
Sorry. I still dont quite understand. That thread seems to be about loading all the pins into an array. I want selected pins.
array(0) is porta.6
array(1) is portb.2
array(2) is porta.1
etc
Bookmarks