Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Low Power and QTouch Demo for SAM4L

Purpose

The Low Power and QTouch demo will help new users get familiar with Atmel's SAM4L microcontrollers. This basic application shows how to initialize the QTouch library and optimize the SAM4L configuration to target low power applications.

Main Files

  • main.c demo application,
  • app.c manage SAM4L low-level configuration,
  • event.c manage QTouch and push button,
  • ui.c LCD display and Board Monitor transfers.

Requirements

This package can be used with SAM4L-EK evaluation kits.

Description

  • At startup the application run in full demo mode (all features on, includes QTouch and segment LCD). The applications captures QTouch inputs (sliders and CS0 QTouch button): displays the slider value (0..255) to the segment LCD, CS0 will change the SAM4L Power Scaling mode (from PS0 to PS2).
  • Once the PB0 push button has been pressed, the application switches in low power mode: Stop LCD controller, stop LCD back light, stop QTouch acquisition, switch SAM4L in power scaling PS1 mode. SAM4L is still in RUN mode.
  • If PB0 is pressed, the SAM4L will enter one of the sleep modes (from RUN to WAIT to RET to BACKUP, then restart to RUN). For each sleep mode transition, the SAM4L is sending the information to the board monitor (over the USART). The current SAM4L sleep mode is displayed by the board monitor on the OLED display.

It requires a board monitor firmware version V1.4 if it runs on SAM4L_EK board.

Usage