Quote Originally Posted by DiGGi
@paul borgmeier, yes i know but i want to read the pin states seperately
Not tried but should work

Code:
poke $85, $04	' make RA2 an input 
...
peek $05, B0	' read all of PORTA
B0=B0 & $04	' isolate bit 2
IF B0 = 0 then TurnOFF
do something here if B0 = 1
goto IFEXIT
TurnOFF:
do something  here if B0 = 0
IFEXIT:
...