Below is part of some code that I have been using without
any problems, now while making some changes and running it
in the simulator I have come across what looks to be a bug
in the simulator. With the "bit0=1" line removed pressing
pin1 (pins=2) then pin4 goes high now pressing pin2 (pins=6)
pressing pin1 again pins now equals 4 as expected.
With the "bit0=1 line inserted and pressing the input buttons
in the same sequence pin1 (pins=2) pin2 (pins=6) then pressing
pin1 again instead of pins=4 pins now equals 20.
Watching with the simulator slowed down pins equals 4 for a
moment then changes to 20, it appears pins is seeing pin4 as
an input. Pressing pin1 ON then OFF again fixes it and pins=4
as it should. I'm using PE 5.2.1
any problems, now while making some changes and running it
in the simulator I have come across what looks to be a bug
in the simulator. With the "bit0=1" line removed pressing
pin1 (pins=2) then pin4 goes high now pressing pin2 (pins=6)
pressing pin1 again pins now equals 4 as expected.
With the "bit0=1 line inserted and pressing the input buttons
in the same sequence pin1 (pins=2) pin2 (pins=6) then pressing
pin1 again instead of pins=4 pins now equals 20.
Watching with the simulator slowed down pins equals 4 for a
moment then changes to 20, it appears pins is seeing pin4 as
an input. Pressing pin1 ON then OFF again fixes it and pins=4
as it should. I'm using PE 5.2.1
Code:
#Picaxe 08m
do
if pins = 2 then
high 4
do
if pins = 4 then
bit0 = 1 'Any variables here cause a problem
exit
elseif pins = 0 then
exit
end if
loop
end if
loop