SPI, Interrupts and DACs...oh dear

Hello, I'm trying to make a pulse generator that can output samples from an arbitrary pulse shape (stored in PROGMEM) at ~100kHz. I'm using a DAC and interfacing with it using SPI, however the output frequency is only 10kHz and unreliable. Can I improve this with interrupts? I have read about interrupts and frankly i'm rather confused as to whether I need to setup an interrupt on Timer2 or some how use an SPI interrupt. Any hinters would be awesome!

Cheers, Rob

I think your spec of 100KHz is a bit unrealistic for this level of platform. The 10KHz you are getting is about what I would expect.

Using interrupts is not going to make it any faster, it might however make it more reliable, that is the samples are output at a more constant rate.

There is no point on embarking on learning about interrupts if this is no good to you.

Can I improve this with interrupts?

Maybe, but probably not enough to get to 100kHz. As Mike pointed out, you're at least pushing, if not exceeding, the limits of the Arduino.

Putting the array in PROGMEM slows down access. So does going through SPI to the DAC.

If you switched to a Mega, so you had enough RAM to load your "wavetable" and more I/O pins to access a parallel-interfaced DAC, you'd have a chance. But even then you'd need to really tune the code, and might even need to do some assembler, to get the throughput you want.