Menu

ADCON1 and PCFG bits

Help
kent_twt4
2007-12-18
2013-05-30
  • kent_twt4

    kent_twt4 - 2007-12-18

    I am making a battery monitor with a 16f877a and a precision 4.1V voltage reference (so that you get 4mv/bit with ReadAD10).  Was wanting to institue Vref+ thru the a-d.h file, or perhaps make a copy and modify that.
     
    Tried defining PCFG3:0 as '0101' to get the Vref+ and AN0 and AN1 as a2d.  That didn't seem to work.  Maybe someone else has been down this road for hints on how this can be done? 

     
    • kent_twt4

      kent_twt4 - 2007-12-19

      Modified the a-d.h file with the required PCFG3:0 bits, and everything sticks thru the assembled file.  Readings follows closely with the DVM, so the reference seems to be working.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.