[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Global variables and ISRs ???

From: Vincent Trouilliez
Subject: Re: [avr-gcc-list] Global variables and ISRs ???
Date: Wed, 07 Sep 2005 14:38:27 +0200

> For such things it is interessting to use fixed point math.
> If you want to divide 200 data Bytes by 13 you can do
> fac = 256 / 13;   (* Only one div needed *)
> for i := 0 to 199 do
>    data[i] = data[i] shl 8 * fac;
> and you need only 1 div and man muls.
> For data-filters you normaly can avoid doing massiv divs.
> -Alex Wenger

Thanks Alex, looks like there is a way to do numerical filtering then,
great ! :o)  I have one big advantage on my side, too : since I am
interested in control applications, and the time constant of mechanical
systems is at the very least 10ms, this gives the AVR (at 16MHz) in the
order of a million cycles to process each sample, so I guess this allows
time for plenty of byte crunching and some more ! :o)
Might even be able to drive two different motors at the same time, and
still handle a complex user interface, graphics LCD, UART.... wow... I
love AVR's :o)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]