Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AFEC Enhanced Resolution Example

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

  1. Build the program and download it into the evaluation board.
  2. 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
  3. 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--
  4. The application will output current voltage of potentiometer on the terminal.