ATMega8515 and 2 MHz interrupt rate ?
2003-11-15 by Michael Buchstaller
Hallo Group, for a customer i designed a board that takes MIDI input and gives out a pulse stream for 160 times the frequency of the MIDI note that is to be played. I did this with a set of programmable counters, a 100 MHz oscillator, and an 90S8515 controlling the values for the counter reload when it hits 0. So far, it works well and my customer is satisfied. He has built some crude apparatus consisting of a Palm PDA, where he can draw the wave forms in the display, and then can transfer it into an 6116 RAM. A counter then cycles though the address lines of the RAM (counter driven by my MIDI oscillator), and the data lines of the RAM go to a DAC08. This works. But now he wants me to build a board that will replace this setup, so he can program the waveforms via MIDI. Now i could use the same technique of counter-->RAM-->DAC, but i am thinking if it would be possible to do this all with an Mega8515, without the external RAM (we use only 160 bytes of it). But for the highest note that coud occur the output frequency would be roughly 12.5 KHz, which translates to an input freq. of 160 times that, giving roughly 2 MHZ. It COULD be possible to write an ISR that simply inreases a register and reads the data from the SRAM and writes it to an out port, but i would have only 8 clock cycles here... (minus overhead for calling the ISR and returning from it.. So i think it will not be possible. Can i do something else? Limit the output freq to something the AVR could handle ? Overclock the CPU ? Use another microcontroller ? Dedicate a mcu for the oscillator and let it poll the input pin ? Any ideas would be helpful. Thank you all ! -Michael Buchstaller