hi,
Even the IF tests are remmed out the problem shows in simulation.
Camerart, try this.
Rem out as the following lines...
Use the Program Tracking Option.
When it executes the Break , single step thru the code.
rled will become set when the rled=1 statement is executed.
But will
reset when you execute the gled=1 statement! this should not happen
Do you follow that OK.?
Code:
loop:
'Adcin 0, an0 'Sets first pulse
'Adcin 1, an1 'Sets second pulse
Break
'If an0 >= 100 Then
rled = 1 'ON IN SIMULATOR = OFF
'firstpulse = an0
'WaitMs an0
'firstpulse = 0
'Else
'rled = 0 'OFF IN SIMULATOR = ON
'Endif
'If an1 >= 100 Then
gled = 1 'ON IN SIMULATOR = OFF
'secondpulse = an1
'WaitMs an1
'secondpulse = 0
'Else
'gled = 0 'OFF IN SIMULATOR = ON
'Endif
Goto loop