DVDAC DMA write

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MoPr_4537651
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi,

I had a question regarding the DVDAC.

I have set my resolution to 12 bits and I want to generate a sine wave with that resolution. I am using the DMA to write using a lookuptable stored in the memory. I am currently writing to the DVDAC_VDAC8_Data_Ptr. Here I can only write data with 8 bit resolution. Does this mean I will be getting a sine wave with 8-bit resolution at the output? Or will the DVDAC take this 8-bit value and convert it to 12 bit resolution.

This doubt arised because with the in-built SetValue function I am able to give 12-bit resolution data directly.

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

MoPr,

I belive that "12-bit" DVDAC does't support RAM-DMA transfer. This is due to the nature of generating of those extra 4 bits using RAM-DMA transfer from another circular buffer. On the other side, DVDAC does not provide true 12-bits (it is rather 10-bits), so you may consider some external DAC for 12+ bits output, and then you use RAM-DMA via SPI, I2C or parallel bus.

/odissey1

View solution in original post

0 Likes
8 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

MoPr,

I belive that "12-bit" DVDAC does't support RAM-DMA transfer. This is due to the nature of generating of those extra 4 bits using RAM-DMA transfer from another circular buffer. On the other side, DVDAC does not provide true 12-bits (it is rather 10-bits), so you may consider some external DAC for 12+ bits output, and then you use RAM-DMA via SPI, I2C or parallel bus.

/odissey1

0 Likes

BoTa,

I see, so the only to write "12 bit" values is through the core then. The datasheet says when the resolution is set to 12 bit there are only 16 invalid codes, which would still put the ENOB between 11 and 12 right? Currently, I am using a 10-bit external DAC which seems to be enough. Thought I could give the internal DAC a shot . Thank you for the quick reply, I will figure out if it is feasible to write the values through the core, else will proceed with the external DAC itself

0 Likes
lock attach
Attachments are accessible only for community members.

MoPr,

Attached is AN covering DVDAC operation. Judging from INL and DNL provided, I would call it 9-bit DAC (at best). Note that those data collected in static conditions, it will get much worse at 10+ kHz update rates. Note that in 12-bit mode actual update rate is 65kHz, which should be further smoothed by RC filter. So it is not good for sine generator.

What sine output frequency you are looking for?

/odissey1

DVDAC_DNL_INL_01a.png

0 Likes

Thanks for explaining . I was looking at the DNL of 12-bit DVDAC and since the DNL was less than 1 I assumed it would be a 11-bit DAC. But, what you said makes sense. Since the INL is high, the shape will get distorted and I wouldn't get a pure sine wave out. I was looking at 40kHz frequency. Distortion in the shape is undesirable for me as it will cause harmonics. So, I guess I'm better off using an external 10-bit DAC.

0 Likes

MoPr,

Can you give more info on sine specs, like needed THD, tuning range, amplitude variation? If 50 dB THD at 40kHz is acceptable, it can be achieved using VDAC8.

/odissey1

0 Likes

I would like the range to be 40-80kHz and ideally I want the harmonics to be about 80-90dB down of the carrier. With the DAC I'm currently using that's what I'm able to get. As long as the amplitude is between 500mV - 5V it is fine.

0 Likes

MoPr,

The best THD for sine that I could get from PSoC5 VDAC8 in  50-100kHz range is -50dB. This is using DDS sampling frequency of 1 MHz and second-order Multiple Feedback LPF with Fc=150kHz. This is close to theoretical limit: (−6.02 x Nbits −1.76) dB = -50 dB for Nbits=8.

For 10-bit is predicts about -62dB. It is quite remarkable that you can see 80-90dB, which is essentially a 16-bit DAC performance. I would say that since you are using external parts anyway, you may consider a DDS module from AD, some low-end modules with 14-bit DAC can be purchased on Ali as low as $3-4, which is cheaper than 14-bit DAC.

/odissey1

0 Likes

BoTa,

I am doing something similar. I am using a multiple feedback BPF with bandwidth 30-50kHz. And the 10-bit DAC i'm using now is from ADI and it seems to be working really well! I will look into the higher resolution DACs. Thank you

0 Likes