Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Real Time ADC Del Sig assignment for Psoc 3

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



Real Time ADC Del Sig assignment for Psoc 3
Moderator:
RKRM

Post Reply
Follow this topic



Real Time ADC Del Sig assignment for Psoc 3

SenSok posted on 01 May 2012 11:02 AM PST
Member
6 Forum Posts

 I am using the PSOC 3 to run a stepper motor and a voltage reading to weigh things. Both the stepper motor and voltage reading require a ADC del sig, but the PSOC 3 only has one. Is there a way to have the program switch between these two assignments in real time??




Re: Real Time ADC Del Sig assignment for Psoc 3

Bob Marlowe posted on 01 May 2012 12:30 PM PST
Top Contributor
1768 Forum Posts

There is an analog mux which you may use to switch between different imputs. Look out for the ADC-configuration when swichching inputs. Use combination of a pwm (to generate the control-signals) and a LUT configured as a counter (state-machine) and control directly the ADC. Retrieve converted values by an interrupt at EOC. That will work.

 

Bob 



Re: Real Time ADC Del Sig assignment for Psoc 3

SenSok posted on 03 May 2012 11:47 PM PST
Member
6 Forum Posts

 Thanks for that tip. I understand how to use the AMux, but i am having troubles with the configurations of the ADC. I am new to this FYI, I am still in college studying how to use this stuff :). I am kind of getting lost at how to maintain the needed configurations of the ADC when it is switched. From what I understand, you suggested on using a LUT and PWM to switch between the configurations, but I am not quite sure i know how to do this. Any suggestions, help or guidance would be greatly appreciated. 



Re: Real Time ADC Del Sig assignment for Psoc 3

Gautam Das posted on 03 May 2012 02:14 AM PST
Cypress Employee
742 Forum Posts

Hi SenSok,

 

The configuration of the ADC is simple and straight-forward.

1) The conversion mode should be set to "Multi-Sample" if you are using more than 1 channel. SInce you'll be using an Analog Mux, you should choose "Multi-Sample" mode. This mode will prevent cross-talk between the channels.

2) Resolution can be chosen according to your requirement from between 8 to 20 bits.

3) Conversion rate can be set according to the requirement of your system.

4) The "Input Mode" can be either Differential or Single-ended.

5) The Input Range will depend upon the input mode selected. Choose the appropriate input range taking into account the dynamic range of the input to be measured.

6) The Buffer Gain can be set according to your requirement. The default value is 1.

7) The Reference can be internal 1.024V or External Vref on P0.3 or P3.2

In the "Common" tab, you can set whether the Start of Conversion signal is "Hardware SOC" or not. If it is checked, a Start Of Conversion (SOC) is triggered on rising edge of the signal connected to the terminal.

 



Re: Real Time ADC Del Sig assignment for Psoc 3

hli posted on 03 May 2012 02:19 AM PST
Top Contributor
675 Forum Posts

You can look at the application note AN-60220. It talks about multipliexing comparators, but you should get an idea how to implement this. There is also EP64560 (Hardware multiplexing of SAR ADC for PSoC5) and EP56203 (ADC Channel scan with software for PSoC3 and 5).

IIRC there is a bug that you cannot use the EOC signal of the DelSigADC for triggering the switch to the next input, it can only be used for interrupts.



Re: Real Time ADC Del Sig assignment for Psoc 3

Gautam Das posted on 03 May 2012 02:20 AM PST
Cypress Employee
742 Forum Posts

Delta Sigma ADC in PSoC Creator supports upto 4 different Configurations.

 

If the two channels you are measuring vary greatly in the input range, it may be required that you'll have to use different input range, conversion rate and buffer gain.

You can use Configuration1 and Configuration2 to set the appropriate values.

In the firmware, you can change the configuration using the API "ADC_SelectConfiguration()".



Re: Real Time ADC Del Sig assignment for Psoc 3

SenSok posted on 03 May 2012 11:09 AM PST
Member
6 Forum Posts

 Thanks for your help,

I have made the configurations and I hope they will work with the board!

 

Thanks again!






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: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20