> 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) -- Vince _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
