- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Project: ADC => DMA => Filter => DMA => DAC
The input is provided as a DTMF waveform signal. The amplitude is in range 0.2 ..2.2 V.
The problem is with output signal. The waveform is rectangular(should be as a sine). It looks like the DAC is in saturation mode.
Thanks.
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sounds a bit like DAC is 4.080V but power is set to 3.3V.
Or can it be that you get the wrong byte from the filter?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sounds a bit like DAC is 4.080V but power is set to 3.3V.
Or can it be that you get the wrong byte from the filter?
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
Have a look into the datasheet, use the table on pg 21. I'm not experienced with that, but would use the 8-bit entry in the table.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
From your project file, I understand that you are using Band Pass filter. In that case, we can't use DMA directly to move the output data from Filter's Holding register to DAC's data register.
As the ADC is operating between 0-Vdda, its output will have a DC component @ Vdda/2. In the Band pass filter, this DC component will be removed. So the output will be in signed format. But DAC accepts only unsigned numbers. So you need to add an offset of 128 (2^8/2 + 1 for 8 bit DAC) manually before passing the filter output to DAC.
You can add this offset in an ISR connected to the Interrupt pin of Filter component.
Note: The same method of adding offset is applicable to HPF as well because HPF also removes the DC component.
I've herewith attached a sample project for HPF where I'm explaining how to add the offset manually to the output of Filter. Look at this. This should help you.
Regards,
Kishore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,kiku!
You are absolutely right!!! Filter and DMA are working correctly only in "Low Pass Mode". For Band Pass and High pass we need to use "interrupt request".
I've used your example in my project and now my Band Pass Filter works properly.
And I have one question more: Could I transfer signal from one ADC to Filter's Channel_A and Filter's Channel_B simultaneously with ISR? (I don't want to use two ADC. Iis it possible?)
Thanks.
zaq
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Zaq,
Yes it is possible. Use the below code:
CY_ISR(adc_ISR)
{
int8 adcResult;
adcResult = ADC_SAR_GetResult8();
Filter_Write8(Filter_CHANNEL_A, adcResult);
Filter_Write8(Filter_CHANNEL_B, adcResult);
}
Regards,
Kishore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content