ADC_SAR_Seq problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello! 
It is necessary to measure the voltage across the resistor using psoc 4 prototyping kit (CY8C4125AXI-483).
I add an ADC_SAR_Seq component, but it makes two errors.
"Too many clocks allocated for SARADC components."
"Resource limit: Maximum number of SAR Fixed Blocks exceeded (max=1, needed=2)."
I just add a component to empty project. What I have to do? Maybe there is another method to get a voltage?


Taras

0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

In cases like yours it is always advisable to post your complete project here, so that we all can look at all of your settings.To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Thanks for the advice! I added the archive!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are modifying an existing design which already contains an ADC. In the view of Topdesign.cysch you will find several tabs at the bottom of that window, one of them is named "ADC" some others ("DAC". "LCD") are disabled and so do not use any components.

   

It might be easier for you to start with one of the examples that that have been installed together with your kit or to be found on the Creator Start page under "Examples and Kits"->"Find Example Project"

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Instead of starting with a bare project you used the prepopulated schematics which

   

are using most if not all the resources. Right click the other schematic tabs you are

   

not using and either delete them of disable them.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Ok! Thanks I understand that ADC based in another tab.
I made a circuit which I use. In terminal I see only "voltage = 0".
Where I make a mistake?

   

   

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Your schematic shows you feeding 5V to chan 0 of the SAR, buts its range is setup

   

for 0 - 2.048V (single ended). So thats an issue.

   

 

   

Note you do not buffer chan 0 so any measurement you take will be affected by the

   

SARs low input Z.

   

 

   

Also you do not use ADC_IsEndConversion(uint32 retMode) API to determine when

   

data is ready, when the SAR has finished converting all channels. Or use the EOC ISR

   

and set a flag to indicate your SAR finished. There is a placeholder in the ISR file to put

   

your defines and code. Any variables used that are global should be declared volatile.

   

Note if so desired you can let the SAR run continuously rather than start and stop it.
 

   

http://www.barrgroup.com/Embedded-Systems/How-To/C-Volatile-Keyword    Volatile

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I measure the voltage across the resistor. I know that it is equal to 1 volt. But terminal not display anything. The error is in the code, or the Customize ADC or connection?

0 Likes
Anonymous
Not applicable

Thank you all! I found the solution! It was necessary to use a different function!

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Glad we could help.

   

 

   

Regards, Dana.

0 Likes