PDA

View Full Version : 16f87 ADC compiler error



DhesanR
- 14th January 2008, 23:21
Hi all,

im trying to read pin a0 of the 16f87 and using the adcon config but have errors during compiling, "undefined symbol", can some help me in understanding the datasheets in order use them more efficiently for the adc purpose, and what could be wrong with my compiler....

br,
d

b1arrk5
- 14th January 2008, 23:43
I'm sorry, but you won't be able to fix this in software. The 16F87 doesn't have any ADC, only the 16F88. If you look on page 3 of the datasheet there is a table that shows the differences between the two chips, but if you just head off to the ADC section, it's easy to miss the little note that says '16F88 only.' That is why your compiler is giving you an error, there is no ADCON register for the 16F87.

You could add a separate ADC chip of course, but it would be easier and cheaper to get your hands on a 16F88 if you need analog.

Good Luck,

Jerry.