Henrik,
Code:
TRISB.0 = 0 ' setup port b.0 as output initially
ANSEL = 0 ' disable all AD convertors
ANSELH = 0 ' Disable PortB AD
Thanks for the reply. I fixed the problem. So simple - configuration fuses. On the Pic16f887 there are 12 A/D ports, spanning port A and port B. Apparently PortB.0 defaulted to analog in. It magically worked when I properly configured it! So much troubleshooting for one little fuse.
Incidently, I tried the pauseUS method you recommended, it didnt help - probably because the pin was setup as an analog convertor.
The code worked without a pause once i configured the chip correctly.
Thanks!
R
Bookmarks