Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

ATMega8515 and 2 MHz interrupt rate ?

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

Re: ATMega8515 and 2 MHz interrupt rate ?

2003-11-16 by kanjjde

--- In AVR-Chat@yahoogroups.com, Michael Buchstaller <buchi@b...> 



For high frequency output controlled by a low frequency input use a 
PLL.  (Phase Locked Loop)

Look for a National Semiconductor LM565 data sheet for an application 
note that will multiple a frequency 10 times.  That will allow you to 
run the AVR at a slow speed and output high frequencies.  An easy way 
to get this data sheet is to go to www.digikey.com and type LM565 
into the search window.  

Good luck.

Re: [AVR-Chat] Re: ATMega8515 and 2 MHz interrupt rate ?

2003-11-16 by Michael Buchstaller

>For high frequency output controlled by a low frequency input use a 
>PLL.  (Phase Locked Loop)

The use of a PLL ist not possible here, because i get the 160-times freq.
at the input. That must be used to look up the wave table.

To be honest, when i designed the first board that generates the high frequency,
my first idea was to generate the audio frequency in software, and then multiply the
output frequency with a PLL. But i decided against that because i am not sure if the
PLL will really instantly follow the frequency changes with enough accurecy to be of
musical usw.


-Michael Buchstaller

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.