
Originally Posted by
russman613
The Problem:
~~~~~~~~~
the LED does not blink. The strange thing is, when I put the LED on portb.0 through portb.5 it works just fine. For all porta and portb.6, portb.7 the toggle command does not function.
What am I missing or is there a known issue?
Try adding the line ANSEL=0
The pins that "dont work" are analogue by default.
"Toggle" reads the port data register, modifies the appropriate bit and writes it back to the data register. Because they are analogue inputs they read as "0" so toggle will always set it to a "1" but you wont read that value back.
Had me stumped the first time I came across it
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks