You are here

My Favorite PSoC Hacks - Connect AGND to a Pin | Cypress Semiconductor

My Favorite PSoC Hacks - Connect AGND to a Pin

In this new series I will share with you some of my favorite PSoC Hacks – like cool things you can do by simple register writes or fixes to some of known issues in PSoC.

Usually, in systems that involve bipolar signal measurement, you will have to bring out the internal AGND to an external pin so that the input signal may be referenced to AGND.  The simplest method to do this would be to use the RefMux user module (from the MUXs category in the User Module catalog) and set the reference to AGND – see figure below.

However, the disadvantage with this method is that this occupies one CT block.  If your design has PGAs INSAMPs or CMPPRGs that occupy all the CT blocks, then there is no place for the RefMux user module.   There is another way – The Hacker’s way – to bring out AGND.  See the block diagram of a CT block below.

The TestMux inside the CT block can be configured to connect the AGND to the Analog bus (The RefMux UM uses this resource).  Provided a resource placed in the CT block does not use the Analog bus, the same CT block may be used to bring out AGND by enabling the TestMux using register writes.  For example, if you have a PGA placed in ACB00, the TestMux in ACB00 can be used to connect AGND to the Analog Bus and to P0[5]. 

Enable the Analog buffer in Analog Column 0 and write following 2 lines of code in the beginning of main.c to connect AGND to the analog bus.

ACB00CR2 &= ~0x1C; // Clear the testmux bits
ACB00CR2 |= 0x14;  // Enable Testmux and select AGND as output of TestMux

REFHI and REFLO may be brought out the same way:

ACB00CR2 |= 0x18; // Connect REFLO to analog bus
ACB00CR2 |= 0x1C; // Connect REFHI to analog bus

Remember, for this to work, the analog bus should not be used by either the CT block or the SC blocks in that column.

Stay tuned for more hacks!!

Comments

rolf's picture

Hi Ganesh,

Another neat feature is to connect the PMuxOut to the analog bus:

ACB01CR2 |= 0x10; // Enable Testmux and select PMuxOut as output of TestMux

This gives a slight (rail-to-rail) performance increase over a PGA with a gain of 1. :)

Regards,
Rolf- Gold Design Partner

ahmedraza1001_2805156's picture

Thanks for all this information here. This information will be helpful for my assignment writing help service and I am just so happy about that!

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.