View previous topic :: View next topic |
Author |
Message |
berlin vince joe V S
Joined: 26 Jun 2015 Posts: 16
|
pic16f676 good for digital voltmeter |
Posted: Sun Jun 28, 2015 8:54 pm |
|
|
Is pic16f676 good for digital voltmeter with lcd module display ????
I am little confused in hardware selection !!!!!! _________________ Thanks |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jun 28, 2015 10:01 pm |
|
|
It will wqrk. Here is an example program to read the voltage on Pin A0
and display it on an LCD:
http://www.ccsinfo.com/forum/viewtopic.php?t=48245&start=1
The lcd requires 6 or 7 pins, and the A/D requires 1 pin. The 16F676 has
more than enough pins for this project. |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Sun Jun 28, 2015 11:41 pm |
|
|
I would suggest putting some signal conditioning/limiting on the input to the PIC for the voltmeter reading. Connecting directly to the pin is likely to blow the chip if you are not careful with spikes etc. You also need to pay attention to the input impedance requirements (see the spec sheet for the chip).
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Mon Jun 29, 2015 12:39 am |
|
|
The questions are what sort of range of voltages you want to handle, and what sort of impedance source you have, and what sort of resolution/accuracy you require?.
Really whether you are just talking reading a voltage over a particular range, or genuinely behaving like a DVM?.
The PIC ADC, has quite a low input impedance requirement (worse on old chips like this). So where a 'DVM', will typically have well over 1MR input impedance, a circuit using the PIC is going to need buffering to get anything like this. Then a DVM, normally has quite a complex FET 'autoranging' circuit in front of the ADC (Typically a input protection circuit, followed by a programmable gain amplifier).
A PIC can quite simply display a number corresponding to the voltage on a pin. PCM_programmer has pointed to code to do this. However to behave more like a real 'DVM', gets more complex. If you want the latter, then consider using a DVM chip. There are quite a few of these around that offer direct interface to microprocessors, have all the autoranging circuitry built in, and will give nice 'example' circuits of the input protection, and give much more accuracy than the PIC ADC can manage (most offer 20000 counts, with linearity better than 0.005%). |
|
|
|