QTouch code examples for Touch SLCD Xplained Pro?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm running the SAML22 Xplained Pro board with the Touch SLCD Xplained Pro peripheral.  I've run the Atmel START "SLCD Example" which displays all of the segments on the LCD, and I've run "SAML22-Xpro-touch-project-selfcap" which exercises *one* of the QTouch points on the Touch SLCD Xplained Pro.

 

But I'd like to write an app that responds to all five QTouch points.

 

Are there any code examples or starting points to use all 5 QTouch points on the Touch SLCD Xplained Pro?  I looked at the Atmel START QTouch Configurator 7.1 (https://start.atmel.com/#dashboa...), but I'm not sure that's the tool I need.

 

Thanks in advance...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Solved (I think): The QTouch configurator *is* what I need for this.  So far what I have is as follows.

  • If you haven't already, on the Atmel START Dashboard page, add the "QTouch Library" to your project
  • Select the "QTouch" page
  • Under the "Sensors" pane, click on the "down button" next to the Button icon
  • Select "Technology: Multicap"
  • Select 5 buttons
  • Under the "Pins" pane, select "Table view" (towards the right side of the pane)

 

Then, by cross-correlating the SAML22 Xplained data sheet with the Touch SLCD Xplained Pro data sheet, assign the buttons as follows:

  • button 0 (Up):    X = PC28 (X/20), Y = PA27 (Y/21)
  • button 1 (Down):  X = PB06 (X/12), Y = PA27 (Y/21)
  • button 2 (Left):  X = PB06 (X/12), Y = PB05 (Y/11)
  • button 3 (Right): X = PC28 (X/20), Y = PB05 (Y/11)
  • button 4 (Enter): X = PB07 (X/13), Y = PB05 (Y/11)

 

Now I need to figure out how to use the API, but that's probably the easier part.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A bit more info (mostly for the benefit of the future me!) smiley:

 

Since we want only one button pressed at a time, in the QTouch Page:

  • In the "Parameters" pane, scroll to the "Sensor AKS" column
  • Set each cell in that column to "Group 1"

This will assure that only one button changes at a time.  You can't do multi-select, but it make selection more robust.

 

Also, in the "Pins" pane, uncheck the "Enable Data Streaming" box.