What is the output impedance of your transducer (is it < 10kOhms)?
Try converting the low rail and see if you get 0
Try converting the high rail and see if you get 255
If these work, try a simple voltage divider and see what you get.
Long Shot - You also are using a 20MHz XTAL and not putting the PIC to sleep while sampling ... you may want to try using the TAD of the XTAL rather than the TAD of the internal RC - you are "supposed" to use minimum TAD possible.
If no luck above, what is your power source? Do you have decoupling caps between VDD and VSS? How about a cap on RA3?
Let us know
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks