Quick question how to read in a3 28x1

Hi all a quick question i hope i need to read if a pin (phicial pin 5) on a picaxe 28x1 is hi or low
i have tryed this

#picaxe 28x1
main:
if in.a3 = 1 then high 4
if in a3 = 0 then low 4
goto main

Thankd Andy Quirot
 

Chavaquiah

Senior Member
Code:
if [B][COLOR="DarkSlateBlue"]portA pin3[/COLOR][/B] = 1 then
   high 4
else
   low 4
endif
This is explained in Manual 1, Appendix E.
 
Thank you works ok BUT one more question i get an error when i try this

symbol G06a = pin6
symbol Jlfa = pin7
symbol G02a = portA pin3
symbol active = 0

Regards AQ
 

Chavaquiah

Senior Member
I'm affraid you can't use PortA in a symbol definition. You could get close:

symbol G02a = pin3
'...
if portA G02a = 1 then ...

It's not a great solution but I think that's as close as can go on the 28X1.
 
Top