cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

Anonymous
Not applicable

Hello,

   

 

   

I'm not too familier with PSOC terminology yet, so I hope you can understand me:

   

I'm using a PSOC 5 LP prototyping kit - the stick kind.

   

How can I get the ADC values out of the ADC so I can use them in hardware?

   

I think it might be better to draw a picture:

   

http://imgur.com/J16l3hk 

   

To be clear: I've gone through the ADC to UART example. From my understanding of how PSOC works, this is not what I want.  From my understanding, the  main loop runs at about 1 KhZ, and I want to be able to access the full 1 MhZ ADC sampling rate.  From my understanding, if I want the full 1 MhZ, then I need to create everything in the top design file, not programatically.

   

Am I under the correct understanding that whenever I enter something into Main(), it gets executed on the microcontroller portion of the chip?

   

Best Wishes,

   

-TJP

0 Likes
1 Solution
HeLi_263931
Honored Contributor II

What do you actually want to do? Typically when using the full 1Msps of the SAR ADC, you transfer the values with DMA into memory. From the you can use your code to evaluate them. Alternatively you can use the DMA to transfer the values to other parts of the hardware (e.g. the DAC, or a UDB register).

   

Yes, anything in main() is software and executed in the MCU part. But you can still control the hardware in the chip from there...

View solution in original post

0 Likes
13 Replies
HeLi_263931
Honored Contributor II

What do you actually want to do? Typically when using the full 1Msps of the SAR ADC, you transfer the values with DMA into memory. From the you can use your code to evaluate them. Alternatively you can use the DMA to transfer the values to other parts of the hardware (e.g. the DAC, or a UDB register).

   

Yes, anything in main() is software and executed in the MCU part. But you can still control the hardware in the chip from there...

View solution in original post

0 Likes
Anonymous
Not applicable

I have a pulse from a radiation detector being processed by my PSOC.  I want to determine the slope of the trailing edge of the and the height of the peak, and increment one of two different kinds of counters depending on those values.  I haven't characterized the pulses yet, but I think it's reasonable to suggest that the features are on a micro-second time scale.

0 Likes
HeLi_263931
Honored Contributor II

Peak detection can be done analog if you want to. You can do it digital in an UDB, using the DataPath. Slope detection is more tricky I guess. But if you only need to compare with a threshold it might be simple: store the previous value, retrieve the new value, calculate the difference and then compare with a threshold.

   

I guess you should look at the UDB / DataPath application notes and videos.

0 Likes
JoMe_264151
Expert II

You may read an 8-bit ADC value and send it to an 8 bit port together with a control signal indicating to the "Other Stuff" that data is ready. All this can be done using DMA, so only few/none CPU action is needed.

   

 

   

Bob

0 Likes
odissey1
Honored Contributor II

it is a third request this week for a Geiger counter..., this world goes "nukelar"!

   

On the other note, wouldn't it be easy to measure amplitude and slope separately by making a derivative of the pulse by simple RC circuit and then using peak detector (picture attached)? Basically, this is what people did back in pre-digital age.

   

 

   

For peak detection look into Cypress Application Note AN60321:

   

http://www.cypress.com/documentation/application-notes/an60321-peak-detection-psoc-3-and-psoc-5lp?so...

   

All you need then is to digitize peak amplitude it with ADC (slowly).

odissey1
Honored Contributor II

Answering your original question, the SarADC on PSoC5 does not have digital output bus (unfortunately). Though I suspect that SarADC component can be custom modified to have output bus (with some verilog tinkering).

0 Likes
odissey1
Honored Contributor II

Good news! ADC_SAR does, actually, has 12-bit output bus, which can be pulled out from schematics with little effort (see picture attached). Does it makes it easy now?

   

   

Anonymous
Not applicable

SarADC Block.PNG

I do not have such SAR ADC Block as shown in previous post. There is no data out available. PSoC 4.2

0 Likes
vigb_1229181
New Contributor II

In which version of PSoC Creator can we get such a component ? It is not available in any versions from 3.3 to 4.2.

0 Likes
odissey1
Honored Contributor II

The ADC_SAR custom component with digital output bus (ADC_SAR_ex) was developed for PSoC5LP only. See example here:

Re: Can be expanded control register component to 16bit or 32bit? (That meaning is not to use two co...

PSoC4.has very limited UDB resources, so making such component for it is not justified.

/odissey1

0 Likes
doc62
New Contributor

Hello, I would like to use ADC_SAR_ex on PSOC5LP but I can't find it anywere. The link in the previous post is not available. Can you help me, please?

Corrado Caruso

0 Likes
odissey1
Honored Contributor II

doc62,

You can find recent example using ADC_SAR_ex here

ADC-SAR-Filter-VDAC-streaming-demo-using-DMA 

SAR-Filter-VDAC_signed_FIFO_02a_A.png

/odissey1

0 Likes
doc62
New Contributor

Thank you very much!

doc62

0 Likes