I did see this in your code and maybe it's just me, but in your new code, I saw this part:
try changing it to and see if it helps:' Initialize the A/D converter
TRISA = 111111
ADCON1 = 000010
' Initialize the A/D converter
TRISA = %11111111
ADCON1 = %00000010
also, I thought you could use byte for that also due to being able to count clear up to 255 with 8 bits.
![]()




Bookmarks