This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
void adc_init(void) { ADCSRA=0x00; ADMUX=0x60; ADCSRA=0x87; and the 128 ACSRA=0x80; }
// Function to initialise the ADC feature // Clear previous ADC results and status // 0x40 for 10 bits // We have set the ADSC bit to start a conversion, // ADEN is set, to enable the ADC