Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Xplain demo application Documentation

This application emulates the Production test which all XMEGA-A1 Xplained boards are delivered with from factory.Further, it shows how to use some of the functionality in the AVR Software Framework found at http://asf.atmel.no.

This application is a Memory game, in which the user must press the board buttons in the same sequence in which their corresponding LEDs have lit up. The game plays back samples or tones, depending on the game configuration, via DAC and onboard speaker when buttons are pressed or LED sequences are played.

A sequence of button presses must be recorded before the game can start, and the board will show running LEDs while waiting for the user to enter such a sequence. The running LEDs indicate the timeout before the button press sequence is saved to EEPROM and the game is started. If the user does not press any buttons before the timeout, the application will simply restart the process.

The game can be configured at startup by means of two jumpers:

For more information on the various drivers included in ASF, see the website, where documentation and code examples detailing each driver and service can be found.

Configuration

Some board-specific configurations and definitions are required for this application. These are contained in conf_example.h.