[En-Nut-Discussion] Ethernut: ADC usage

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Jan 21 10:24:34 CET 2008


Hi,

> I was sure that I had seen some sample code for using the Ethernut ADC API
> on the Ethernut web site but, of course, I can't find it when I need it.

Just a short example for avr:


ADCInit();
ADCSetPrescale(ADC_PRESCALE_DIV64);    
ADCSetRef(AVCC);
ADCSetMode(SINGLE_CONVERSION);
ADCSetChannel(ADC0);
ADCStartConversion();

Bye,

Ole Reinhardt

-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list