Using QTouch with ATTiny1616

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

 

Hi all,

 

I am trying to use the QTouch library for the ATTiny1616, and have a few questions:

 

  • Atmel Studio doesn’t seem to use the same API as what I see referenced in the PTC documentation. For example, in Studio we use scroller_status   = get_scroller_state(0); and scroller_position = get_scroller_position(0); to get the sensor status and slider position respectively. However in the PTC documentation I see uint8_t rotor_slider_position_self = GET_SELFCAP_ROTOR_SLIDER_POSITION(ROTOR_SLIDER_NUMBER); to get the slider position. What gives? Why is there a difference? Is the former not really using QTouch?  Note that the first method came from Atmel Start code, perhaps this explains the source of the discrepancy?
  • In the QTouch documentation I see the naming convention for libraries to be used with GCC tool chain (see below.) I see that the core version of avr used by the MCU dictates which version of QTouch library to use. How do I know what core version is used by the ATTiny1616? Also, is core version effectively the software used by the MCU? If not what is core version? Its surprisingly hard to find any info on this in the documentation.
  • In the QTouch documentation it states that for self capacitance each channel (sense line) requires two pins. However in the documentation for PTC it states that each channel corresponds to only one pin. Which is it? Also is an external capacitor required for these sense lines when using PTC, or is the capacitor integrated into the MCU with PTC?

 

Thank you in advance for the help.

 


 

 

Attachment(s): 

Last Edited: Tue. Jun 1, 2021 - 09:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Qtouch can run on any AVR using 2 GPIO pins to measure a self-capacitance PAD. One to drive and one to measure. The code must perform various tricks and timely recalibrations to avoid false triggering.

 

Advanced AVRs may include a Peripheral Touch Controller where the driver and measurement are implemented within the PTC so only one external pin connection to the PAD is required. The code to use PTC should be significantly easier to write.

 

It's been a long tine since I implemented Qtouch (which I did manually, without Start) so probably cannot help much further.

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

Makes sense! That's exactly what I was thinking, thank you for the help.