- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm designing a capsense application with shield electrode implemented for CY8C21534B.
I saw in one of the documentation saying that it is recommended to "drive the shield only during a scan, additional code in the firmware is needed". Will someone help to share with me the code that was meant for this function?
I'm guessing it is the CSD_DisableSensor function... but need comfirmation or other option (if any).
===========================================================================
CSD_DisableSensor
Description:
Disables the sensor selected by the CSD_wGetPortPin() function. The drive mode is changed to
Strong (001). This effectively grounds the sensor. The connection from the port pin to the Analog-
MuxBus is turned off. The function parameters are returned by CSD_wGetPortPin() function.
===========================================================================
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes,the code snippets have been intergchanged for strong and high impedance analog mode.
The below code sets the mode for P1.7 (Port 1pin[7])
//Configure the drive mode to Strong
PRT1DM2 &= ~0x80;
PRT1DM1 &= ~0x80;
PRT1DM0 |= 0x80;
CSD_ScanAllSensors();
//Configure the drive mode to High Impedance Analog
PRT1DM2 |= 0x80;
PRT1DM1 |= 0x80;
PRT1DM0 &= ~0x80;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When a shield signal is routed on the hatch pattern then the signal is always driven whether sensor is scanned or not because the shield signal is a free running clock. You can stop this clock by using a couple of additional line of codes, here is a code snippet:
//Configure the drive mode to Strong
PRT1DM2 |= 0x80;
PRT1DM1 |= 0x80;
PRT1DM0 &= ~0x80;
CSD_ScanAllSensors();
//Configure the drive mode to High Impedance Analog
PRT1DM2 &= ~0x80;
PRT1DM1 &= ~0x80;
PRT1DM0 |= 0x80;
Best regards,
Pushek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I check in the technical reference, I think you interchanged between Strong and High Impedance Analog... will you please confirm? I assume the example below is for Port 1 pin[7] right?
//Configure the drive mode to Strong
PRT1DM2 &= ~0x80;
PRT1DM1 &= ~0x80;
PRT1DM0 |= 0x80;
CSD_ScanAllSensors();
//Configure the drive mode to High Impedance Analog
PRT1DM2 |= 0x80;
PRT1DM1 |= 0x80;
PRT1DM0 &= ~0x80;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes,the code snippets have been intergchanged for strong and high impedance analog mode.
The below code sets the mode for P1.7 (Port 1pin[7])
//Configure the drive mode to Strong
PRT1DM2 &= ~0x80;
PRT1DM1 &= ~0x80;
PRT1DM0 |= 0x80;
CSD_ScanAllSensors();
//Configure the drive mode to High Impedance Analog
PRT1DM2 |= 0x80;
PRT1DM1 |= 0x80;
PRT1DM0 &= ~0x80;