My 12lf1822 ADC won't read zero (lowest reading is 008)


Results 1 to 12 of 12

Threaded View

  1. #5
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: My 12lf1822 ADC won't read zero (lowest reading is 008)

    My apologies, I stripped out some linesfrom my program (ie a list of what I have attached to all the pins), to condense the code & make it eaasier to read , it seems I got carried away with the delete key when posting

    Code:
    TRISA = %11001010    'RA2 hpwm out therefore output needed
    ANSELA =%00000010    'SIG in (RA1) NEED TO BE ANALOGUE.
    ....that above bit missing from my original code.

    I'll try increasing the sampling time (but not sure why it would be 'signal level' sensitive....ie above a few millivolts right up to VCC, the ADC reads fine)

    Walter....oh dear, not what I wanted to hear (re your problems). I did read the errata sheet, but that seems to relate more to ADC not completing (hanging?) under certain circumstances.... whereas this appears to be working as it should my readings are totally fine above 008 upto 255 ....just can't get under 008...even short to the PIC's ground pin.

    I've only recently progressed from using ADCIN ...I'm just using it here cos it's quick!

    Edit: just tried setting the Fosc to Frc ....hmmm, I won one bit back ...my ADC now reads between 007 & 255!
    Last edited by HankMcSpank; - 19th May 2011 at 18:20.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts