[En-Nut-Discussion] Need Analog Help
Ole Reinhardt
ole.reinhardt at kernelconcepts.de
Sun Sep 25 16:55:39 CEST 2005
Hi,
> I've a Motorla 4115A Pressure Sensor attached at
> Port PF0 of the ADC. I measure 3.799V by Hand at
> this Port. The Board is Ethernut 2.1b with NutOS 3.9.8
First question: What's your reference voltage? (So what is connected to
AVRs AREF pin?)
It seems your reference voltage is either lower than 3.799V or you'r
measuring with internal 2.56 Volt reference.
> u_short adc_value = 0;
>
> ADCInit();
> ADCSetRef(AREF);
Try to set to AVCC / 5V (don't know the right constant name right now)
> ADCSetMode(SINGLE_CONVERSION);
> ADCSetChannel(ADC0);
Try not to set the prescaler. This is normaly done correctly for most
applications during the ADCInit()
BTW: AFAIK the change of the output voltage of your 4115A is quite small
(if you try to measure atmospheric pressure) so you perhaps want to use
an OpAmp to adjust the scaling of your measurement.
Best regards,
Ole Reinhardt
--
_________________________________________________________________
| |
| WWW.R-WEB.DE Systementwicklung, Softwareentwicklung |
| |
| Ole Reinhardt |
| Luisenstraße 29 Tel. / Fax: +49 (0)271 7420433 |
| 57076 Siegen Mobil: +49 (0)177 7420433 |
| Germany ole.reinhardt at r-web.de |
|_________________________________________________________________|
--
kernel concepts Tel: +49-271-771091-14
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen E+ : +49-177-7420433
--
More information about the En-Nut-Discussion
mailing list