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.

Is it possible to have 2 separate ADC inputs AND an external Vref?

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

I am trying to figure out how to build a circuit using a PIC16F628A or possibly a 16F887A to read two separate voltages accurately and display them on LCD, for accuracy using an external precision Voltage Reference.

I understand the LCD part but I am puzzled about the use of external Vref and two input channels. I do understand how to divide the voltages to levels the PIC is happy with.

I have never used an external Vref before nor have I measured two voltages at the same time.

I have tried to understand the datasheet for the PICs but they seem to assume I know something already and its obvious to me that I don't.

Can anyone explain the way (if it is possible at all) to do this? Or point me to a link that explains it better?

Thanks, Al
 
I don't the PIC16F628A has a ADC. So how are you going to measure voltages?

The 16F887A has a ADC. You can use Vref- at ground and Vref+ at 2.5 volts from a good source.

You can not really measure two voltages at the same time. You will need to measure the voltages one at a time as close together as possible. (in time)
 
Pics like the 16f88x series permit an external precision reference Voltage for accurate ADC conversion.

However, there is only one ADC converter. U can switch the input to the converter by assigning different PORT pins to it during the program execution. When u do that u can effectively sample different voltage sources at each of those pins. There is a short settling time and a suggested max impedance of 10k per input. The settling time is on the order of a few uSeconds. Thus u can sample thousands of times per second. When u work at 10bit ADC accuracy for precision, it is useful to do sample averaging to eliminate 'noise' for a better result. If u have rapidly changing sampling voltages, this may not be possible.
 
16F876/F877 are both obsolete. 16F886/F887 supersedes these chips.
 
The exact same thing applies though, there's little difference across 14 bit PIC's.

Even though 16F PIC's use a 14 bit long word instruction, they are still 8 bit PIC's as the data buss width is only 8 bit.
 
The original post was asking a question. If Big Al has a 16f877 to hand, then Nigel's tutorial 11 is just what is required. I have made the 'analogue board' mentioned, programmed the chip and it all works very well.
It's hardly important if the chip is old, dead, non-existant, dresses as a woman. . . etc.. ;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top