Quote Originally Posted by skimask View Post
Re-read that linked post above...read it good, read it carefully...then re-read the 3rd paragraph...then re-read it again...

And if you're not sure if it's a TOGGLE failure or not, then don't use TOGGLE...
Surely you can come up with a different method of changing the state of a bit from one to the other and back again...
...when I add ADCON1 = 7 to the code after trisA and trisB it does not change the outcome. Here is the code:

DEFINE OSC 48
'
test1 var PORTA.1
test2 var PORTA.2

trisA = 0
trisB = 0
ADCON1 = 7

ProgramStart:

pause 5
toggle test1 '// comment -- THIS DOES NOT WORK!
toggle test2 '// these two lines AND

if portB = 0 then
portB = $ff
'//toggle test1 '// uncomment -- THIS WORKS
else
portB = 0
'//toggle test2 '// uncomment
endif

goto ProgramStart

Depending where toggle is it either work or does not work. If you have the possibility to test this, please let me know if works on your pic.

Thank you in advance

Regards
Key