Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Calculator example for the SAM4S-XPLAINED Documentation

Introduction

This example demonstrates a simple calculator on the display of the mXT143E Xplained, using the Widget Toolkit.

Main files:

Widget library API

The widget library API can be found here, while the graphics service API can be found here. The maXTouch API can be found here.

Device Info

This example has been tested with the mXT143E Xplained on the following kits:

  • UC3-A3 Xplained
  • UC3-L0 Xplained
  • XMEGA-A1 Xplained
  • XMEGA-B1 Xplained
  • XMEGA-A3BU Xplained
  • SAM4S Xplained

Description of the example

This example application shows how widgets can be used to create a simple calculator, allowing the user to perform calculations by touching buttons on the display.

To perform a calculation, the user must first enter an operand (number), then an arithmetic operator ("+", "-", "*", "/") followed by the second operand. The calculation is performed when the "="-button is pressed.

Dependencies

Relevant module dependencies for this application are:

Compilation Info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Microchip.