Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

pic16f887 analogue reference

Status
Not open for further replies.

spuffock

Member
Am I correct in assuming that I can read the 600mV reference on address 1111, and use this to determine the true VCC?
 
spuffock said:
Am I correct in assuming that I can read the 600mV reference on address 1111, and use this to determine the true VCC?
Yes, select Vdd as the reference to the A/D converter and the 600 mV reference as the input (setting CHS0/3, as you said).
 
Good find. I have a project at the moment where this would be useful. The data sheet is a little unclear as to how this can be used, it appears that the only place that the Fixed Vref goes is to the ADC input - is this correct? I'll probably get time tomorrow to try this but just thought I'd ask (it's midnight here). The reason I ask is because I'm using the comparators with the ladder Vref and the diagrams in the data sheet suggest that this would still work to measure Vdd.

Mike.
 
I believe there's an application note that specifically describes using the hardware for that function. I'll see if I can find it for you Mike.

Mike


<added>

It's application note AN1072A - Measuring Vdd using the 0.6v reference
 
Hi Mike,

Thanks for the AN, that will come in useful tomorrow. It doesn't however answer my question, can you have both the ladder Vref and the Fixed Vref at the same time. I.E ladder to comparator inputs and fixed to ADC input.

Mike.
 
Pommie said:
it appears that the only place that the Fixed Vref goes is to the ADC input - is this correct?
The fixed Vref can be used as the reference to for the comparators too. CVref and the fixed Vref are multiplexed (see bits C1Rsel and C2Rsel).
Also, CVref can be selected as the input of the A/D converter according to the datasheet (ADCON0, CHS0/3).
I haven't used both at the same time but I agree with you, the diagrams in the datasheet suggest that it's possible.

Pommie said:
The reason I ask is because I'm using the comparators with the ladder Vref and the diagrams in the data sheet suggest that this would still work to measure Vdd.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top