Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > SPI Code example for PSOC1

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



SPI Code example for PSOC1
Moderator:
ARVI

Post Reply
Follow this topic



SPI Code example for PSOC1

pnielsen3 posted on 12 Oct 2011 10:24 AM PST
Top Contributor
107 Forum Posts

I am using the PSoC 1 CY29466 MCU. I discovered the internal ADC do not have enough resolution or linearity  for my project. I decided to use ADS1211 ADC. It takes a three wire SPI interface. Can you point me in a direction for examples to write and read from the external ADC?

 

Thank You,

 

Philip




Re: SPI Code example for PSOC1

pmad posted on 15 Oct 2011 12:01 AM PST
Cypress Employee
154 Forum Posts

 Hello Philip,

 

I agree that the ADC provided does not have good resolution and it introduces some offset but there are a few app notes available which employees a technique called Correlated Double Sampling (CDS) to measure the signal. App not available here: http://www.cypress.com/?rID=2894 explains that method in detail with an example of how to measure signal of a thermocouple, where resolution required is as low as 40uV.

 

If you want some code examples for SPI then let me know your email address, I shall be able to send you the projects.

 

Best regards,

Pushek



Re: SPI Code example for PSOC1

pnielsen3 posted on 17 Oct 2011 08:56 AM PST
Top Contributor
107 Forum Posts

I would love help on SPI code. I spent the weekend looking for SPI code to a ADS1211 ADC. I received some nice responses and some responses that should be put in the nasty list. If I can make the 13 bit linear that would be great. I will eventualy need to solve the SPI code problem.

 

Thank You,

 

Philip



Re: SPI Code example for PSOC1

pnielsen3 posted on 17 Oct 2011 09:22 AM PST
Top Contributor
107 Forum Posts

Would it be very difficult to creat a SPI code and .h file to communicate with the TI ADS1211?

 

Thank You,

 

Philip



Re: SPI Code example for PSOC1

pnielsen3 posted on 17 Oct 2011 12:33 PM PST
Top Contributor
107 Forum Posts

I did look at the app note. It would not open. It complained about a cmx problem. I opened the main.C file. Even if I could get my 13 bit AD working with 0% error. The best I could acheive would be +/- .0006. This is marginal. My custumer wants x.xxx. So I am forced into using a high accuracy ADC IC. Do you have any sampls of SPI code talking to ADCS? I am stumped on the SPI code.

 

Thanks

 

Philip






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