ADC module and the 18F2455

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
RKP
Registered User
Registered User
Posts: 82
Joined: Mon Oct 22, 2007 3:14 pm
Location: Maryland

ADC module and the 18F2455

Post by RKP » Wed Oct 31, 2007 1:43 am

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

Post Reply