Information Center for ARM - EXAMPLE PROJECTS

## Information Center for ARM

## Flashloader for ATMEL

## adc12_threshold_wakeup

This example uses TIOA0 as external trigger instead of software trigger for ADC conversion. The TIOA0 is a 1ms period square wave. The rising edge during each period would trigger the ADC to start a conversion on given channel which is connected to the potentiometer. This example shows a menu as below upon running, \code -- Menu Choices for this example-- -- 0: Display voltage on potentiometer.-- -- 1: Display thresholds.-- -- 2: Modify low threshold.-- -- 3: Modify high threshold.-- -- 4: Choose comparison mode.-- -- i: Display ADC information.-- -- m: Display this main menu.-- -- c: Set Auto Calibration Mode. -- -- s: Enter sleep mode.-- \endcode With the user interface, comparison window and mode could be set. The ADC supports 4 kinds of comparison events as following: - lower than the lower threshold. - higher than the high threshold. - in the comparison window. - out of the comparison window. If the target got an 'S' or 's' from user's input,the core fell in sleep by __WFI.Tuning the potentiometer to enable the ADC input fall into the comparison window and then generate a trigger event. The comparison event will wake the system up.