Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > How to disable shield electrode thru firmware? (CY8C21534B)

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



How to disable shield electrode thru firmware? (CY8C21534B)
Moderator:
ARVI

Post Reply
Follow this topic



How to disable shield electrode thru firmware? (CY8C21534B)

hoxy posted on 20 Oct 2011 2:54 AM PST
Member
6 Forum Posts

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!




Re: How to disable shield electrode thru firmware? (CY8C21534B)

pmad posted on 21 Oct 2011 05:02 AM PST
Cypress Employee
154 Forum Posts

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



Re: How to disable shield electrode thru firmware? (CY8C21534B)

hoxy posted on 27 Oct 2011 12:46 AM PST
Member
6 Forum Posts

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;

 



Re: How to disable shield electrode thru firmware? (CY8C21534B)

viks posted on 30 Oct 2011 11:07 AM PST
Cypress Employee
16 Forum Posts

 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;

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20