EmbeddedRelated.com
Forums

Are 4000 interrupts per second a problem for AVR?

Started by George Orwell March 14, 2006
"David Brown" <david@westcontrol.removethisbit.com> skrev i meddelandet 
news:4417c7b5$1@news.wineasy.se...
> Ulf Samuelsson wrote: >>> I've done a 2kHz piezo using a 4MHz '05 (1MHz bus rate) (interrupt >>> every 250usec), with enough time left over to do 32-bit PID control, >>> 15-bit slope ADC and scan displays/keyboard, so I don't think you'll >>> have any problems with an 8Mhz AVR 'less'n you do something silly like >>> write the ISR in C. >>> >> >> My record for real time response is 250,000 context switches per seconds >> on an HPC16083 >> 32 tasks, each running 4 us (including the context switch) >> >> Not too bad for a CPU with just a few MIPS. > > The HPC has more than just a few MIPs - can't they run at up to 40 MHz?
Only the HPC46100, the others were limited to 16-20 Mhz, and it was an accumulator based architecture with a few address register.
> (Our HPC apps never used more than 10 MHz.) About 15 years ago, they > were one of the fastest microcontrollers available. Still, at 250,000 > context switches a second, there can't have been much left cpu time left > after the context switch overhead?
Nope, the memory to memory address mode helped a lot.
> >> When there is a will, there is a way.
-- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may bot be shared by my employer Atmel Nordic AB