CapSense Performance Tuning with User Modules
CY8C20xx7/S CapSense
®
Design Guide
Doc. No. 001-78329 Rev. *E
43
10 to 23
1360
17 to 35
1360
10 to 23
680
23 to 41
2730
35 to 41
2730
23 to 41
1360
41 to 45
5460
41 to 45
5460
41 to 45
2730
Table 4-6. Sampling Time for a Sensor with IMO = 6 MHz
Sensitivity = 0.2 pF
Sensitivity = 0.3 pF
Sensitivity = 0.4 pF
C
P
(pF)
ST (µs)
C
P
(pF)
ST (µs)
C
P
(pF)
ST (µs)
8 to 11
680
8 to 10
680
8 to 11
680
11 to 23
1360
10 to 17
1360
11 to 23
1360
23 to 42
2730
17 to 35
2730
23 to 41
2730
42 to 45
5460
35 to 41
5460
41 to 45
5460
41 to 45
10920
shows the value for processing time with various CPU frequencies.
Table 4-7. Processing Time for a Sensor
CPU CLK
Processing Time (PT) in µs
24
71
12
142
6
284
3
568
For example, if a CapSense system is designed with a 24-MHz IMO frequency, a 6-MHz CPU clock (IMO/4), and a
SmartSense_EMCPLUS sensitivity level of 0.3 pF, the scan time of the sensor that has parasitic capacitance around
15 pF can be calculated from the previous tables using Equation 4-1.
Sampling time for the previously mentioned configuration (24 MHz of IMO and 0.3 pF of sensitivity) is chosen from
; it is 680 µs. Processing time for the previously mentioned configuration (CPU clock of 6 MHz) Is chosen
; it is 284 µs.
Thus, the total scan time in this configuration is 680 + 284 = 964 µs. Scan time for more than one sensor is the sum
of the scan time of each sensor.
4.3.7 SmartSense_EMCPLUS Response Time
Consider the following application with standard CSD along with typical CapSense scanning firmware.
Three CapSense sensors with parasitic capacitance of sensor between 5 pF and 10 pF
IMO of 12 MHz and CPU clock of 12 MHz
Sensor sensitivity level of 0.4 pF
Debounce = 3
According to the previous tables, scanning of each sensor requires 482 µs and three sensors have a scan time of
1.45 ms. The following firmware example requires 1 ms for additional firmware execution; thus, the loop execution
time will be 2.45 ms.
while (1)
{
SmartSense_EMC_PLUS_ScanAllSensors();
SmartSense_EMCPLUS _UpdateAllBaselines();
if(SmartSense_EMCPLUS _bIsAnySensorActive() )
{
//1ms firmware routines
}
}