CY8CKIT-040 PSoC
®
4000 Pioneer Kit Guide, Doc. # 001-91316 Rev. *F
58
Code Examples
5.3.2
Project Description
5.3.2.1
PSoC Creator Component Configuration
CapSense
The CapSense Component is configured in SmartSense Auto-tuning mode with one proximity sen-
sor for the design with the parameters shown in
PRSm (TCPWM Mode)
The TCPWM Component is used to control the LED brightness. The CapSense proximity sensor's
signal output is used to deduce the LED brightness.
TCPWM Component. The TCPWM block is configured as a PWM in Pseudo Random Sequence
modulator (PRSm) mode with a resolution of 15 bits (fixed by the TCPWM block architecture). This
15-bit resolution of the PRSm along with a 16-MHz input clock generates a period of 500 Hz (PRS
repeat period). The output line is inverted to drive the Active Low LED. A period of 32767 is set in the
Table 5-2. CapSense Component Parameters
Parameter
Tab Present
Value
Rationale
Tuning method
General
Auto (Smart-
Sense)
Automatically adjust sensitivity for different system
environments.
Threshold mode
Automatic
To enable runtime threshold calculation for a 5:1
SNR
Raw data noise filter
First Order IIR 1/4
Filter out noise or unwanted spikes in raw count.
This setting can be tweaked based on require-
ment.
ProximitySensor0
Widgets Config
-
Add a proximity sensor by clicking
Proximity Sen-
sors
and then clicking
Add Proximity Sensor
.
The only parameter that is available to modify in
this tab is debounce. This can be set or adjusted
based on system requirements.
Analog switch drive
source
Advanced
PRS-12b
Reduce EMI emission and enhance EMC immu-
nity.
Sensor auto-reset
Disabled
Not required in the design. Add if required by the
application.
Low baseline reset
5
System dependent number. Configure according
to user needs.
Inactive sensor con-
nection
Ground
Make the proximity loop not pick up any charge
when not scanned
Shield
Disabled
Not used in the design.
Guard sensor
Disabled
Not used in the design.
Cmod precharge
Precharge by Vref
buffer
Vref is enough for precharging, as there is only
one sensor. Cmod voltage will not drop too low for
a fast GPIO precharge.
Sensitivity
Scan Order
1
Obtain the maximum possible sensitivity using
SmartSense. The parameter controls the scan
time, so for a lower number sensitivity setting, the
scan rate will be higher. This parameter can be
adjusted depending on the response rate and
proximity range needed.
Enable tuner helper
Tuner helper
Unchecked
No tuner used.
Содержание CY8CKIT-040 PSoC 4000 Pioneer Kit
Страница 20: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 20 Kit Operation...
Страница 37: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 37 Hardware...
Страница 73: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 73 Code Examples Raw count and Baseline...