[sdiy] Korg DSS1 DMA oscillators, the old beast!

Eric Brombaugh ebrombaugh1 at cox.net
Sat Jan 23 17:16:13 CET 2010


Probably wouldn't work: The dsPIC audio DAC runs at a constant rate controlled by the main clock oscillator and a set of dividers. If you don't keep its input FIFO full then it substitutes a default value specified by a register in the DAC control area. If you ran the DMA from a timer rather than from the DAC interrupt then the FIFO will be constantly out of sync and you'll get very glitchy data. Since it's a sigma-delta architecture, it oversamples by 256x so you don't get a lot of resolution on the output rate setting either.

If you want a DAC loaded at a variable rate controlled by a timer then you'd be better off using an external SPI DAC, driving the SPI TX from a DMA channel that's timer triggered.

Eric

On Jan 23, 2010, at 8:59 AM, karl dalen wrote:

> ->There seams to be a *interesting app* for the dspic
> ->DMA, a transfer can be trigged by a Timer event! :-)
> 
> Hint, hint, nudge, nudge?!:)
> 
> KD
> 
>>> 2010-01-23 skrev Tom Wiltshire <tom at electricdruid.net>:
> 
>> Från: Tom Wiltshire <tom at electricdruid.net>
>> Ämne: Re: [sdiy] Korg DSS1 DMA oscillators, the old beast!
>> Till: "karl dalen" <dalenkarl at yahoo.se>
>> Kopia: synth-diy at dropmix.xs4all.nl
>> Datum: lördag 23 januari 2010 20.23
>> 
>> On 23 Jan 2010, at 15:46, karl dalen wrote:
>>> 
>>> It seams your trying to implement such a DMA sample
>>> oscillator mechanism, the very same i was asking
>> about?
>>> 
>>> So by fiddling with the DMA transfer interrupt rate
>> one gets
>>> a DMA driven oscillator? (yes we already know DMA was
>> intended
>>> to be used for fast data transfer).
>>> 
>>> Ai'nt that a very inefficient implementation?
>>> 
>>> There seams to be a *interesting app* for the dspic
>> DMA, a transfer can
>>> be trigged by a Timer event! :-)
>> 
>> No, sorry. I'm being much more conventional than that.
>> I'm generating audio samples in blocks of sixteen. This is
>> more efficient because I only have to do one set up for
>> sixteen samples, and I can make better use of pointers and
>> DSP instructions.
>> I then need the DMA to move those samples from the DPSRAM
>> to the DAC in a timely manner (e.g. at the fixed sample
>> rate). The DMA is operating in "ping-pong" mode, which means
>> it uses two buffers. It reads one, generates an interrupt
>> when it's finished, then reads the other, generates an
>> interrupt, etc etc.
>> I use the DMA interrupts to set a flag telling the main
>> code that one of the buffers is empty. The main code then
>> runs its sample generation routine and refills it.
>> At least, that's the theory. I haven't got it working yet,
>> as I said.
>> 
>> T.
>> 
>> 
> 
> 
>      __________________________________________________________
> Ta semester! - sök efter resor hos Kelkoo.
> Jämför pris på flygbiljetter och hotellrum här:
> http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052
> 
> _______________________________________________
> 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