Result: ADC (Analog to Digital Conversion) Getting the 10-bit number from the ADCH and ADCL Registers
Result of hte ADC 10-bit conversion shown on the LDC.
When a 10-bit number is desired from the ADC conversion, both the ADCH and ADCL must be used to get the full 10-bit number. The ADC stores the conversion in the ADCH and ADCL registers.
First, the ADCL register must be accessed and saved into another variable. The is a rule that must be followed when trying to get the 10-bit number.
Second, a variable will be needed to store the 10-bit conversion. A 16-bit variable is used. A bitwise shift operation will be used to get the data into the variable correctly. The Right Adjusted method ADLAR = 0 is shown in this case.
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.