After spending a few hours trying to get the PIC to work on my EP4 thru the USB port with a LCD connected. The A/D would not read the AN0 input , it would just hang.
After checking the assembly it appears that the ADCON* registers were not getting set correctly.
I had to change a line in the 18F2455.bas file to get it to work.
I changed this line from :
#const _adc = $05 // 5 ADC channels available
to: #const _adc = $0A // 10 ADC channels available
So if your going to use the A/D module in the 18F2455 you may have to modify the 18F2455.bas file.
Hope this helps,
RKP
ADC module and the 18F2455
Moderators: David Barker, Jerry Messina