Programming: ADC (Analog to Digital Conversion) Setting up the Prescaler so the ADC Falls Between 50 and 200 KHz
The ADC clock must be between 50 KHz and 200 KHz to do the conversions. The ADC clock ticks with the microcontroller clock and a prescaler can be applied to the ADC clock so that the frequency is slower and in the range of 50 KHz and 200 KHz.
A prescaler of 16 will do the job for this microcontroller running at 1 MHzsince:
1,000,000 Hz / 16 = 62,500 Hz = 62.5 KHz.
The ADPS2 (ADC Pre Scaler) bit must be enabled in the ADCSRA (ADC Status and Control Register) to do this. There are three of these bits ADPS0 and ADPS1, but these are left at 0.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.