Re: [AVR-Chat] ATtiny2313 audio
2009-12-27 by Leon Heller
----- Original Message -----
Show quoted textHide quoted text
From: "Marc R.J. Brevoort" <mrjb@dnd.utwente.nl> To: <AVR-Chat@yahoogroups.com> Sent: Sunday, December 27, 2009 2:56 PM Subject: [AVR-Chat] ATtiny2313 audio > Hello all, > > I've been programming the ATtiny2313 to generate > monophonic, square wave beeps (you could call it > 'music' with a bit of imagination). The code was > based mostly around the delay function. > > I'd like to try polyphonic audio now- still using > simple square waves. As the time needed per > calculation is now variable and/or the wave forms > more complex, I can no longer count on the delay > function. So instead, I wanted to make the code > interrupt-driven. > > However, I don't seem to manage to get even nearly > enough interrupts per second to generate audio. > I would need about 16000 interrupts per second. > The ATtiny2313 is running at 8 MHz. Is the 2313 > simply too slow for the task? Surely if a lowly > 286 could feed audio to a DAC, the ATtiny2313 > should be able to handle the load as well? I've generated sine waves using a software DDS up to 200 kHz or so, with a 12 MHz Tiny2313. Leon