If then question

#2
You can't use decisions spread across more than 1 port in the one statement. Either change your code to 2 lines with 'If' statements (or change your hardware so that the 2 pins are in the same port).

Edited by - inglewoodpete on 02/09/2007 09:42:40
 
#3
Thanks, I think this works, or could it be written better?


if b0=0 then
if portc pin0 =1 then
goto jump1

if b0=1 then
if portc pin0 =0 then
goto jump2

endif
endif
endif
endif


Natalie
 

MORA99

Senior Member
#4
That wont work, when the second b0 is inside the first.
<code><pre><font size=2 face='Courier'>
if b0=0 then
if portc pin0 =1 then
goto jump1
endif
else
if portc pin0 =0 then
goto jump2
endif
endif
</font></pre></code>
 
Top