[En-Nut-Discussion]Problem with ADC
Tommaso Fabbri
atfabbri at gmail.com
Mon May 29 18:14:34 CEST 2006
This is my code:
ADCInit();
ADCSetChannel(0);
ADCStartConversion();
ADCSetMode (0);
ADCSetPrescale(ADC_PRESCALE_DIV64);
printf("Siamo QUA!!\n");
for(;;)
{
ADCRead(&adc_value);
//printf("%u", adc_value);
//NutSleep(100);
vadc=adc_value*5/1024;
printf("%f\n", vadc);
//n=NutUdpSendTo(sock,inet_addr("255.255.255.255"), port,
str, sizeof(str));
}
the resullt is f if don't connect anything to the channel.
someone can give me an example of a read from the ad converter. i am doing a
spectre analyzer and i need to translate analog signals. someone can help
me?
More information about the En-Nut-Discussion
mailing list