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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.