Code and Data Memory Considerations at mix-and-match mutual-and self-capacitance sensors

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

Hallo,

 

I want to use mix-and-match self and mutual capacitance touch on a SAMD20 or SAMD21 at the same time (self: proximity with long range; mutual: buttons or long slider). Do I have to add the used code and data memory of both methods or is there a part used by both? When adding is correct I would need about 12k + 13k = 25k code memory and about 2k data memory (with IAR) for the touch.

 

To get my application, do I have to start two projects each with one method and then mix them up? I think I can use the AT09363: PTC Robustness Design Guide ( SAM D20 QTouch Robustness Demo) as an example.

I've asked the same in the old forum two weeks ago, but it is closed and unfortunately deleted.

 

Thanks.

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

Hi,

In SAMD2x based touch projects, it is possible to integrate both self-capacitance and mutual capacitance sensor configurations with in a single touch project. The QTouch library for SAMD2x devices supports both self and mutual capacitance acquisition methods. Hence, the combined project does have a QTouch Library which works for both self and mutual capacitance sensor configuration.

In the touch project, the self and mutual touch measurements are mutually exclusive events. Thus, the touch measurement happens sequentially depending upon the sequence in which the touch sensor measurement APIs (i.e. touch_selfcap_sensors_measure() and touch_mutlcap_sensors_ measure()) are called in the application.

To create a mutual plus self capacitance project, as a first step self and mutual capacitance projects needs to be independently generated for the desired sensor configuration using QTouch Composer. Then, follow the steps described in section 5.2 of the application note “AT08774: SAM D20 PTC with I2C Slave”(http://www.atmel.com/images/atmel-42325-sam-d20-ptc-with-i2c-slave_applicationnote_at08774.pdf) to create a combined project.

 

In a touch project the data and code memory requirement is calculated based on the code and data memory required for both QTouch Library and application. For more information on the data and code memory requirements for QTouch library of a particular MCU device, refer QTouch Library selection guide (http://www.atmel.com/Images/QTouch_Library_Selection_Guide.xls). The code and data memory values provided for a mutual plus self capacitance project would be different. Since, the QTouch Library is common for both self and mutual capacitance acquisition methods. Hence, in the combined project, the code memory and data memory requirement would be lesser than the calculation provided and it greatly depends upon the sensor configuration used in the project.

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

Hallo Sai,

 

thanks for your answer. I had a short look at the AN, the description is very good.

We start with the maximum flash size, so it should be no problem with the code memory. When I started I will write here again to give you the used memory (with my settings). 

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

I'm working on a similar project, using  “AT08774: SAM D20 PTC with I2C Slave" and make some modifications. I want to use only mutual cap, but the AT08774 example uses only one 4-channel slider as mutual cap. I want to add 2 more mutual cap sliders. What will happen with the internal address map registers ? I mean, on the document we can find that internal register addr 4 we can read the status of the slider, but if I add 2 more sliders, where I can set which internal register address they will have? I couldn`t find this at the code.. someone can help?

 

Thanks

Renan Margon

Computer Engineer