I have a 40x1 Picaxe and prototype board.
I am trying to check the status of pin 2 and 3 (Analogue 0 and 1 / input PortA 0 and 1) used as digital inputs. The High or Low status would then be pasted into variables
I have tried various versions of the code below but always get syntax errors.
If porta 8 = 1 then let b8=1 elseif pin porta 8 = 0 then let b8=0
endif
If porta 9 = 1 then let b9=1 elseif pin porta 9 = 0 then let b9=0
endif
or
If Pins porta 8 = 1 then let b8=1 elseif pin Pins porta 8 = 0 then let b8=0
endif
If Pins porta 9 = 1 then let b9=1 elseif pin Pins porta 9 = 0 then let b9=0
endif
Any help much appreciated
Cheers
Alan
I am trying to check the status of pin 2 and 3 (Analogue 0 and 1 / input PortA 0 and 1) used as digital inputs. The High or Low status would then be pasted into variables
I have tried various versions of the code below but always get syntax errors.
If porta 8 = 1 then let b8=1 elseif pin porta 8 = 0 then let b8=0
endif
If porta 9 = 1 then let b9=1 elseif pin porta 9 = 0 then let b9=0
endif
or
If Pins porta 8 = 1 then let b8=1 elseif pin Pins porta 8 = 0 then let b8=0
endif
If Pins porta 9 = 1 then let b9=1 elseif pin Pins porta 9 = 0 then let b9=0
endif
Any help much appreciated
Cheers
Alan