Hi Rob,
At this stage, I'm just learing the basics (with a 16F628A), so I'm not ready to decide on a chip for that reason. (But thanks for the info)
I have been able to get the comparator working using an external Vref by resistive divider network, and it works quite well. This I am ok with. (thanks to mister_e's simple code example).
However, no luck when trying to use the internal voltage reference.
I think this is my problem...
The datasheet is not very clear when setting the VCON VR<3:0>: bits.
For example, the datasheet states that the voltage reference specs should be
3.0V < VDD < 5.5V
But by following the formula for configuring the voltage reference I get values between:
0 to 3.13V for VRR=1 and
1.25 to 3.59V for VRR=0,
assuming VDD=5V.
Also, on another matter, if we want to output the internal Vref to RA2, (to monitor this voltage), should we set TRISA.2 to an output pin?
Any Ideas?
Bookmarks