I'am trying to test the CY3212-CapSense demo board with
Plastic (Nylon) Overlay Thickness of 3 mm.
To calibrating CSR User Module, I started form AN2355
and AN2397.
Basing on AN2397 Projets (CSD_3213), I modified project
to adapt to CSR User Module instaed of CSD User Module.
With the following settings:
CSR_SetDacCurrent(5,CSR_DAC_LOW);
CSR_SetScanSpeed(3);
I can see, with MultiChart applicaton, the attached immages:
1 - NoFingerPresent.bmp
2 - FingerPresent.bmp
In case 1 the value of Signal (CSR_waSnsDiff for button 0)
is from 200 to 1600, while in the case 2 le value of signal
is from 200 to 2100.
How I sets noise and finger thresholds?
Why the values of signal oscillate so much?
Thanks.
Software version:
- PD 4.3 build 1884
- SP1 build 162
- SP2 build 305
- CY24x94 build 128
- CY20x34 build 394
- CYRF69xx3 build 228
- EP NewUMs build 221
- +UM:SDCARD
- +UM:USBUART
- +UM:CSD
- Code: Select all
//----------------------------------------------------------------------------
// C main line
//----------------------------------------------------------------------------
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#include "TX8.h"
//#define BOTTON_NUM CSR_BUTTONS_EXIST
#define BOTTON_NUM 0x1
// Keeps track of button press status
BYTE prev_buttons = 0;
void Scan_Buttons()
{
// Scan all sensors starting from sensor 0
CSR_StartScan(0,BOTTON_NUM,CSR_SCAN_ONCE);
// wait till all the scans are complete
while(!(CSR_bGetScanStatus() & CSR_SCAN_SET_COMPLETE));
CSR_bUpdateBaseline(0);
}
void main()
{
M8C_EnableGInt;
CSR_Start();
//Set DAC current for all button
CSR_SetDacCurrent(5,CSR_DAC_LOW);
//Set scan speed for all button
CSR_SetScanSpeed(3);
TX8_Start();
while (1) {
//Scan all sensors starting with sensor 0
Scan_Buttons();
TX8_PutCRLF();
TX8_Write((char *) (CSR_waSnsResult), BOTTON_NUM*2);
TX8_Write((char *) (CSR_waSnsBaseline), BOTTON_NUM*2);
TX8_Write((char *) (CSR_waSnsDiff), BOTTON_NUM*2);
TX8_PutChar(0);
TX8_PutChar((CHAR)0xFF);
TX8_PutChar((CHAR)0xFF);
}
}

