Purpose
The example demonstrates how to use the enhanced resolution mode inside the microcontroller to sample analog voltage.
Requirements
This example can be used on SAM4E-EK boards.
Description
The example is aimed to demonstrate the enhanced resolution mode inside the microcontroller. To use this feature, the channel 5 which is connected to the potentiometer should be enabled. Users can select different resolution modes by configuration menu in the terminal.
Usage
- Build the program and download it into the evaluation board.
- On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- In the terminal window, the following text should appear (values depend on the board and the chip used):
-- AFEC Enhanced Resolution Examplexxx --
-- xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
=========================================================
Menu: press a key to change the resolution mode.
---------------------------------------------------------
-- n: Normal Resolution Mode--
-- e: Enhanced Resolution Mode--
-- q: Quit Configuration--
- The application will output current voltage of potentiometer on the terminal.