How to disable shield electrode thru firmware? (CY8C21534B)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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!

0 Likes
1 Solution
Anonymous
Not applicable

 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;

View solution in original post

0 Likes
3 Replies
pushekm_21
Employee
Employee
10 likes received 5 likes given First like received

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

0 Likes
Anonymous
Not applicable

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;

0 Likes
Anonymous
Not applicable

 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;

0 Likes