- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
All you need then is to digitize peak amplitude it with ADC (slowly).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not have such SAR ADC Block as shown in previous post. There is no data out available. PSoC 4.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ADC_SAR custom component with digital output bus (ADC_SAR_ex) was developed for PSoC5LP only. See example here:
PSoC4.has very limited UDB resources, so making such component for it is not justified.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
doc62,
You can find recent example using ADC_SAR_ex here
ADC-SAR-Filter-VDAC-streaming-demo-using-DMA
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!
doc62