piclist 2001\02\01\113420a >
Thread: Q about internal A/D converters of 16F877
face BY : Mike Mansheim email (remove spam text)

>I have a problem with the internal A/D converters of a PIC16F877,
>problably due to a misconfiguration of the port, but I can't find the
>solution. The converter seems to work, but only for low voltages (close to
>0V) and for high voltages (close to 5V). For voltages in between, the
>values are very strange, with jumps, continuous changes, ...

This may seem very basic, but the F87x's are 10 bit a/d's vs. 8 bit in
similar 'C' parts. Make sure you understand exactly how the data is
being justified, and that you are properly using the two registers that
the results are reported in.
For example:
if ADFM = 1 (right justified), but you are only looking at ADRESL, the
result will appear to go from 0FFh to 0 at 1.25V, as the 10 bit result
transitions from 0FFh to 100h.
Also basic, but if you have a scope available, always make sure you have
what you think you have on the a/d pin (voltmeters can mislead).

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


See also: www.piclist.com/techref/microchip/ios.htm?key=a%2Fd
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Q about internal A/D converters of 16F877

month overview.

new search...