March 2016
Beginner to intermediate
296 pages
6h 34m
English
The aim of this recipe is to configure the ADC in single-conversion mode and then convert the voltage set by the thumbwheel into a 12-bit digital value. We'll configure the ADC to generate an interrupt at the end of each conversion and write an interrupt handler to read the ADC and initiate a new conversion. The only task for our main function to perform is to output the ADC value to the LEDs, but as there are only 8 LEDs we can only display the most-significant 8-bits of the ADC value. We'll call this recipe adcISR_c5v0.
To set up the ADC follow the steps outlined:
adcISR_c5v0 and create a new project named adcISR.uvprojx.Read now
Unlock full access