Hi All
I cant get this part of the code to work in the simulator? Basically I'm using a 28X, reading the portA inputs off a switch matrix to give me six modes depending on the switches that are active. However when I try to run this on the simulator ( pixace editor 5.5.5)
turning on the portA button, loads a 5 into the simulator and the outputs will not activate. So I either have the code wrong, or not using the simulator correctly....
So any answers on this would be wonderful
Thank you
Code sample below
chksw:
if portA pin1 = 1 and pin2 = 0 and pin3 = 0 then lightR1 ; AND funtction to match switch input matrix
if portA pin1 = 0 and pin2 = 1 and pin3 = 0 then lightR2
if portA pin1 = 0 and pin2 = 0 and pin3 = 1 then lightR3
if portA pin1 = 1 and pin2 = 1 and pin3 = 0 then lightR4
if portA pin1 = 1 and pin2 = 0 and pin3 = 1 then lightR5
if portA pin1 = 0 and pin2 = 1 and pin3 = 1 then lightR6
goto chksw
lightR1:
high B.0 ;turn on Rollover 1 ligh
goto chksw
I cant get this part of the code to work in the simulator? Basically I'm using a 28X, reading the portA inputs off a switch matrix to give me six modes depending on the switches that are active. However when I try to run this on the simulator ( pixace editor 5.5.5)
turning on the portA button, loads a 5 into the simulator and the outputs will not activate. So I either have the code wrong, or not using the simulator correctly....
So any answers on this would be wonderful
Thank you
Code sample below
chksw:
if portA pin1 = 1 and pin2 = 0 and pin3 = 0 then lightR1 ; AND funtction to match switch input matrix
if portA pin1 = 0 and pin2 = 1 and pin3 = 0 then lightR2
if portA pin1 = 0 and pin2 = 0 and pin3 = 1 then lightR3
if portA pin1 = 1 and pin2 = 1 and pin3 = 0 then lightR4
if portA pin1 = 1 and pin2 = 0 and pin3 = 1 then lightR5
if portA pin1 = 0 and pin2 = 1 and pin3 = 1 then lightR6
goto chksw
lightR1:
high B.0 ;turn on Rollover 1 ligh
goto chksw