Programming: ADC (Analog to Digital Converter) Setting the Prescaler

The ADC must run between 50kHz and 200kHz. This is an example of how to set the prescaler. The ADCSRA Control and Status Register is the register that contains the ADPS2, ADPS1 and ADPS0 bits that control the prescaler. In this case the 16 prescaler was selected since this microcontroller is running at 1mHz and 16 prescaler would allow the ADC to run between 50 and 200 kHz. The ADPS2 is the bit to set for this prescaler.



Back to blog

Leave a comment

Please note, comments need to be approved before they are published.