[En-Nut-Discussion] Need Analog Help
Daniel Buergin
itisnt at yahoo.com
Sun Sep 25 14:03:59 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
But with my Program, i only get 1023 ticks.
Program-Fragment:
u_short adc_value = 0;
ADCInit();
ADCSetRef(AREF);
ADCSetMode(SINGLE_CONVERSION);
ADCSetChannel(ADC0);
ADCSetPrescale(128);
for(;;){
ADCStartConversion();
while (ADCRead(&adc_value))
NutThreadYield();
printf("ADC: %u\n",adc_value);
}
What am i doing wrong ?
Thanks in advance
Daniel
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the En-Nut-Discussion
mailing list