6.3 Observe ADC Functionality and Current Consumption in Data Visualizer
Open Data Visualizer by clicking the Data Visualizer tab to observe
the ADC functionality and look at the power consumption, as shown in Figure 6-5.
By rotating the potentiometer knob, the voltage input to ADC input pin, PB1, is changing. The ADC result is printed to the terminal only when it is below 80, which is the ADC window low threshold value. When the value is above that, ADC WCMP interrupt will not be triggered and hence no data will be printed to the terminal.
In the power analysis window, when looking at the current consumption, the
average current consumption is about 1.18 μA which is slightly reduced from 1.32 μA in the
previous assignment. This is because the ADC WCMP mode is now used. There are now two
categories of the high peak glitches:
- When the RTC overflow interrupt triggers to start the ADC conversion while the ADC result is above the ADC window low threshold value and the USART transmission is NOT performed. This is illustrated in the first half of the power analysis graph, with a current consumption around 240 μA. This has been reduced from constant 690 μA in the previous assignment at where no window filter feature is available.
- When the RTC overflow interrupt triggers to start the ADC conversion while the ADC result is below the ADC window low threshold value and the USART transmission is performed. This is illustrated in the second half of the power analysis graph, with a current consumption around 690 μA. This is equivalent to the peak glitches in the previous assignment.
Result: The ADC
WCMP mode slightly reduces the average current consumption. It mainly reduces the current
consumption for the scenario when the ADC result is above the window threshold value and no
USART transmission triggers. The benefit varies depending on how often this scenario happens.
Note that there are four different window compare modes available to fit the user's
requirement.