feeding DAC output with delayed values of ADC input

Just about everything about Red Pitaya
Post Reply
jujava
Posts: 4
Joined: Thu Aug 03, 2023 11:08 am

feeding DAC output with delayed values of ADC input

Post by jujava » Thu Aug 03, 2023 11:31 am

Hello everyone,

I'm totally new to FPGAs, and I think that I what I want to do is very simple, but I do not know where to start. Here it is: I would like to output from the DAC the data from the ADC after a possible large time delay (and maybe in the future some simple transformation, scaling, squaring), Essentially, what I want to do is a FIR filter with, e.g., 1e6 coefficients equal to zero and the last one being unity.

This must works without time gap and so I cannot simply "read" and subsequently "write" with either matlab or C API I believe since during this time data could be lost (or is some buffering preventing that possible ?)

I could already implement such an idea efficiently on a STM32 using DMA and reading and writing in a single memory buffer with simply a shift of one cell. Yet, it took me 3 months learning microcontroller programing to write, essentially, 5 lines of codes :)

My hope would be that I could achieve the same result with the RP using the C API and not having to mess around with the "wiring" of the FPGA, but, I could not find a full documentation of the C API and in particular how to talk to ADC and DAC. Is this documentation available somewhere ? In particular, I think that with one example of FIR filter or a look up table would certainly be a good starting point for me to get started.

thank you very much in advance for your help,

JJ.

User avatar
redpitaya
Site Admin
Posts: 912
Joined: Wed Mar 26, 2014 7:04 pm

Re: feeding DAC output with delayed values of ADC input

Post by redpitaya » Thu Aug 17, 2023 11:55 am

Hello Jujava,

Sorry for the late reply.

The samples from the ADC and DAC are stored in the FPGA you can find the addresses here:
https://redpitaya.readthedocs.io/en/lat ... #registers

There is a small part of programming done in FPGA before the C software takes over.

You can also check out FPGA tutorials from Professor Trost from the University of Ljubljana:
(the 1.04 project is meant for 1.04-28 OS image for STEMlab 125-14)
url]https://lniv.fe.uni-lj.si/redpitaya/[/url]

Otherwise, the C functions are here: https://github.com/RedPitaya/RedPitaya ... i/src/rp.c

I hope this helps.

jujava
Posts: 4
Joined: Thu Aug 03, 2023 11:08 am

Re: feeding DAC output with delayed values of ADC input

Post by jujava » Mon Aug 21, 2023 3:34 pm

Hello

thanks for your answer and yes, it helps !

best regards,

JJ.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 91 guests