- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone;
I want to filter 2 signal sequentially. My purpose is to get values from 2 ADC and send them filter with 2 DMA. After that I receive them from filter with DMA and I will separate signals and I send them to 2 DAC. There is no problem to send values to filter. But I can't separate them. Do you have any idea that how can I do ? Also are there anyway to add offset to output of filter ?
I can add them into interrupt with VDAC8_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u); but I need on DMA request.
Thanks for your advices
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The filter has two channels maybe that will solve your problem. You cannot mix signals from different sources into the filter and separate them again.
Adding an offset could be done using DMA only by creating a DMA capable component yourself using verilog. Not quite easy, but doable.
Bob
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, I can see output of the dac which seems 256 byte from first ADC -256 byte from second ADC. However I want to put index between them. When index is 0, Results shown from first DAC, when index is 1, results shown from second DAC. (In the oscilloscope output you can see my first ADC connect to signal generator, second ADC connect to GND)
For this I put my code between my TD's, which shown on pictures. But I couldn't give value my "ptr3" on my codes.
Do you have any idea about that too ?
Thanks
Burak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure this is correct?
The filter has a memory of previous values of the signal.
If you switch the input source of the filter does not know about it.
at the output of the filter appears a mess of two signals.
I will not tell the length distortion when taps = 128
Maybe easier to use one ADC, Filter and DAC and multiplexer at input and output.
- 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
Actually, I used another method to do. In for loop, I am stopping DMA's sequencally. With them I had something less complex and more useful. However, I still think to obtain with filter>>DMA. Read 128 and write it on DAC1 then again read and write on DAC2. But with this result shown meaningless.
In for loop;
CyDmaChEnable(DMA_Chan, 1);
CyDmaChDisable(DMA_2_Chan);
i=1;
CyDelay(1000);
CyDmaChEnable(DMA_2_Chan, 1);
CyDmaChDisable(DMA_Chan);
i=0;
CyDelay(1000);
In ISR;
if(i==1)
VDAC8_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u);
if(i==0)
VDAC8_1_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I do not understand you. How do you plan to separate 2 signals on the same channel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
apologize for my late reply,
My plan is
With two dma of the output, I will send them on dac or somewhere.
CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)Filter_HOLDAH_PTR), LO16((uint32)VDAC8_Data_PTR));
CyDmaTdSetAddress(DMA_1_TD[1], LO16((uint32)Filter_HOLDAH_PTR), LO16((uint32)VDAC8_Data_PTR));
CyDmaTdSetAddress(DMA_1_TD[2], LO16((uint32)Filter_HOLDAH_PTR), LO16((uint32)VDAC8_1_Data_PTR));
CyDmaTdSetAddress(DMA_1_TD[3], LO16((uint32)Filter_HOLDAH_PTR), LO16((uint32)VDAC8_1_Data_PTR));
Input of Filter is
CyDmaTdSetConfiguration(DMA_TD[0], 2000, DMA_TD[1], DMA__TD_TERMOUT_EN );
CyDmaTdSetConfiguration(DMA_TD[1], 2000, DMA_2_TD[0], DMA__TD_TERMOUT_EN );
CyDmaTdSetConfiguration(DMA_2_TD[0], 2000, DMA_2_TD[1], DMA_2__TD_TERMOUT_EN);
CyDmaTdSetConfiguration(DMA_2_TD[1], 2000, DMA_TD[0], DMA_2__TD_TERMOUT_EN);
So, with this configuration, I will send my signals sequentally, after I will receive my signals sequentally. With optimization.
Or I will stop one of DMA from input of filter and receive data from filter after I will stop another DMA from input.
But when I send output of DMA which come from output of filter to the SD card. But my results are between 0-200 with 12 bit DMA. Is it normal or my DMA's dont work ? (ADC input is 4kHZ square wave)
- 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
Merhabalar Burak,
Psoc konusunda paslaşacağım arkadaşlara ihtiyacım var. Sende istersen tanışabilir miyiz?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Burakyasin
I want to learning about these chase, 2 ADC >> 2 DMA >> Filter >> 2 DAC
I have project for 2 chanel signal processing from detector, Can i discuse with you about this project? I'm just 14 days using PSoC from early,
This is my active email, donielianr@gmail.com. Very big thanks if we can discuse. My apologize if my english so poor.
Best Regard
Doni Elian