Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AFEC Automatic Comparison Example

Purpose

The example demonstrates how to use the automatic comparison feature inside the microcontroller to compare analog voltage.

Requirements

This example can be used on SAM4E-EK boards,SAMV71-Xplained-Ultra, SAME70-Xplained-Pro.

Description

The example is aimed to demonstrate the automatic comparison feature inside the microcontroller. To use this feature, the channel 5 which is connected to the potentiometer should be enabled. Users can change the potentiometer voltage to compare with threshold value.The terminal will output current potentiometer voltage and configured window value.

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 Automatic Comparison Examplexxx --
    -- xxxxxx-xx
    -- Compiled: xxx xx xxxx xx:xx:xx --
  4. The application will output comparison result on the terminal.