in the place (pull-up) portb to configure for porta
There's no Pull-up on PORTA. Must use external one wich is always the best pratice... well IMHO.
AND PIC16F676 have internal comparator on PORTA, as i thought, so you must add
CMCON=7
to the top of your code
CMCON=7, click,CMCON=7, click,CMC, click,CMCON, click,CMCON=7, click...
AND, the last one, ADCON1, is not the one you need to set A/D channel. You need to set ANSEL
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=406&stc=1">
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks