Guide to Interpret CC Calibration Value

This page provides information on computing sensor capacitance value using the Compensation Capacitor (CC) value. The CC value is also called CC calibration value as it is computed during the calibration phase. The CC value of each touch button can be obtained as follows:

uint16_t cc_value = ptc_qtlib_node_stat1[SENSOR_NUMBER].node_comp_caps;

The unsigned 16-bit CC values are stored node_comp_caps in PTC CC Register format.

PTC CC Register Format

Depending on the device, the CC register format changes.

For SAMD10/SAMD11/ATmega328PB/ATmega324PB

cc-register.png

For ATtiny81x/ATtiny161x - Self-Capacitance

cc-register-tinyself.png

For ATtiny81x/ATtiny161x - Mutual Capacitance

cc-register-tinymutual.png

CC Register Bit Values

Coarse/Fine/Accurate Bit Values

coarse-fine-accure.png

Rough Bit Values

rough.png

Computing Sensor Capacitance

For SAMD10/SAMD11/ATmega328PB/ATmega324PB

Read CC value in decimal: 11639
Read CC value in hexadecimal: 0x2D77

Substitute the rough, coarse, fine and accurate values from the table.
Rough = 21.25
Coarse = 8.775
Fine = 0.4725
Accurate = 0.04725

Sensor Capacitance (pF) = Rough + Coarse + Fine + Accurate = 30.54 pF (maximum 32 pF)

For ATtiny81x/ATtiny161x - Self-Capacitance
Read CC value in decimal: 46967
Read CC value in hexadecimal: 0xB777

Substitute the rough, coarse, fine and accurate values from the table.
Rough = 21.25
Coarse = 4.725
Fine = 0.4725
Accurate = 0.04725

Sensor Capacitance (pF) = Rough + Coarse + Fine + Accurate = 39.99 pF (maximum 48 pF)

© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.