6 Replies Latest reply on May 3, 2012 1:09 PM by userc_44116

    Real Time ADC Del Sig assignment for Psoc 3

       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??

        • 1. Re: Real Time ADC Del Sig assignment for Psoc 3

          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.





          • 2. Re: Real Time ADC Del Sig assignment for Psoc 3

             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. 

            • 3. Re: Real Time ADC Del Sig assignment for Psoc 3

              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.

              • 4. Re: Real Time ADC Del Sig assignment for Psoc 3

                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.

                • 5. Re: Real Time ADC Del Sig assignment for Psoc 3

                  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()".

                  • 6. Re: Real Time ADC Del Sig assignment for Psoc 3

                     Thanks for your help,


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




                    Thanks again!