Hi!

I do not know what is going on!

PortB works just fine,
but
a) code does NOT toggle the test (test1, test2) pins
b) code does toggle the test pins

test1 = portA.1 and test2 = portA.2

'a)
loop:
pause 5
toggle test1
toggle test2

if portB = 0 then
portB = $ff
'// toggle test1
else
portB = 0
'// toggle test2
endif
goto loop:

'b)
loop:
pause 5
'// toggle test1
'// toggle test2

if portB = 0 then
portB = $ff
toggle test1
else
portB = 0
toggle test2
endif
goto loop:


Could somebody please try to explain how this is possible?
I'm puzzled, how is this possible?
Using picbasicpro 2.50

regards
key