| Electronic Components Datasheet Search |
|
AN2927 Datasheet(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2927 Datasheet(HTML) 6 Page - STMicroelectronics |
|
6 / 12 page ![]() Firmware implementation AN2927 6/12 3 Firmware implementation This section describes the implementation of the RC acquisition principle in the ST touch sensing firmware library. 3.1 Charge Time measurement principle The charge time measurement must be accurate enough to ensure a robust capacitive sensing application. There are two common ways to measure the charge time: 1. The first solution is using an input capture (IC) timer which is triggered when the voltage reaches the threshold level. This approach offers a time measurement resolution which is directly linked to the timer counter frequency. However, as one input capture channel is required per electrode, standard MCUs are not compatible with this type of capacitive sensing application. 2. The second solution uses both a simple timer (without IC capability) and a simple software sequence which regularly checks if the voltage on the acquisition I/O has reached the threshold level. In this case, the time resolution measurement is equal to the number of CPU cycles used to execute a complete loop of the software sequence. This measurement approach introduces some jitter which is not compatible with the capacitive sensing acquisition. However, a large number of electrodes can be implemented as there are no hardware constraints. A variant of the second solution obtains a fixed measurement resolution equal to the CPU frequency (fCPU) by using an adaptive software sequence. This is the approach used in the ST touch sensing firmware library and is described below. 3.1.1 Basic measurement A general purpose timer performs the charge time measurement. The timer counter start value is saved (or reset) at the beginning of the capacitance charge. When the voltage on the acquisition I/O (Acq I/O) reaches a certain threshold level (VTH), the current timer counter value is saved. The difference of the two time counter values gives the charge or discharge time. Figure 5. Timer counter values Counter = start_value Counter = stop_value VTH |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |