Well if PortE.2 isn't High, then it'll set PortA.0 Low and you'll never know if PortE.1 had set it high beforehand unless you've got a fast scope as it'll only be High for a uS or so...
Try this as an alternative....
Code:
Start:
If PortE.0=1 then
High PortA.0
else
If PortE.1=1 then
High PortA.0
else
If PortE.2=1 then
High PortA.0
else
Low PortA.0
endif
endif
endif
goto Start
or how about...
Code:
start:
MyVar=PORTE & $07
If MyVar<>0 then
High PortA.0
else
Low PortA.0
endif
goto Start
where MyVar is a byte variable.
If you've got an LED on A.0 then any change on any of those three E pins should give the desired indication with either example.
Melanie
Bookmarks