gdaporta
Member level 5
- Joined
- Apr 4, 2006
- Messages
- 86
- Helped
- 12
- Reputation
- 24
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Argentina
- Activity points
- 1,944
pic adc conversion
Hello everybody,
I´m looking for someone ho has some expierence in working with ADC.
Actually I'm working with a PIC, the 16F873 and I'm using the AD0 to test a voltage. This voltage is always oscilating, there are two possibilities, going up to 14.8v and then goes down to 12.3v; or going up to 28.8v and then goes down to 26.2v more or less.
I have to show the average voltage value in an LCD.
Right now, I put any fix voltage in AD0 and I convert and show it OK, but when it's oscillating I'm having a lot of problems to show the correct average. In major situations, the average calculation is under the real average voltage, when the voltage is under the 20v, my firmware shows 200mV less, and when the voltage is over 20v, my firmware shows 300 mV over.
For the average calculation I'm saving the maximum and minimum voltage, then I calculate the average and show it.
The ADC conversions are done by pooling an input, like a trigger.
The ADC input have a serial resistor of 150k, a grounded resistor of 15k and then a 47nF capacitor to ground.
Any idea or suggestion ???
By,
GuillerMo [AR]
Hello everybody,
I´m looking for someone ho has some expierence in working with ADC.
Actually I'm working with a PIC, the 16F873 and I'm using the AD0 to test a voltage. This voltage is always oscilating, there are two possibilities, going up to 14.8v and then goes down to 12.3v; or going up to 28.8v and then goes down to 26.2v more or less.
I have to show the average voltage value in an LCD.
Right now, I put any fix voltage in AD0 and I convert and show it OK, but when it's oscillating I'm having a lot of problems to show the correct average. In major situations, the average calculation is under the real average voltage, when the voltage is under the 20v, my firmware shows 200mV less, and when the voltage is over 20v, my firmware shows 300 mV over.
For the average calculation I'm saving the maximum and minimum voltage, then I calculate the average and show it.
The ADC conversions are done by pooling an input, like a trigger.
The ADC input have a serial resistor of 150k, a grounded resistor of 15k and then a 47nF capacitor to ground.
Any idea or suggestion ???
By,
GuillerMo [AR]