[sdiy] dsPIC DMA RAM to DAC problem
Eric Brombaugh
ebrombaugh1 at cox.net
Sat Jan 23 16:12:50 CET 2010
Tom,
I haven't used DMA on the DAC yet, but a few things you might check:
* Are you using the proper little DMA address calculation macros when loading the pointer registers? This confused me for a while back when I first started using DMA for the ADC buffering.
* You say there's no output from the DAC - does changing the DACDFLT register change the output voltage? If so then the input FIFOs are underflowing - the DMA isn't loading them.
* Perhaps just as a sanity check disable DMA and use a little DAC ISR to drive data in - does this work?
That's about all I've got. Good luck and let us know what you discover.
Eric
On Jan 23, 2010, at 6:46 AM, Tom Wiltshire wrote:
> I came across that video whilst trying to find a solution to my current problem; getting the DMA working shifting audio data from the dual-port SRAM to the audio DAC on the dsPIC 33FJ128GP802.
>
> Has anyone got any experience doing this?
>
> The audio DAC is pretty striaghtforward, and I've got DMA interrupts occurring every 16 samples. The fact this happens at the right speed means the DMA is getting interrupts from the DAC correctly.
>
> I've stuck dummy data in the DPSRAM (The DMA RAM area) which is just a ramp going up and a ramp going down. If the DMA works correctly in ping-pong mode, I should see a triangle wave coming out at 1/32nd of the sample rate. But I'm not seeing any output from the DAC.
>
> It's one of those evil register set-up problems which give you very little feedback and thereby make debugging very difficult.
>
> Any help appreciated - I'm on my second day of this, and I'm just starting to get slightly annoyed. Assembly programmers need infinite patience!
> Thanks,
> T.
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list