[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)
--
Vince
- Re: [avr-gcc-list] Global variables and ISRs ???, (continued)
- Re: [avr-gcc-list] Global variables and ISRs ???, Johnathan Corgan, 2005/09/06
- Re: [avr-gcc-list] Global variables and ISRs ???, Parthasaradhi Nayani, 2005/09/06
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Lars Noschinski, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/07
- Re: [avr-gcc-list] DIV instruction (WAS: Global variables and ISRs ???), Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Alex Wenger, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???,
Vincent Trouilliez <=
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, E. Weddington, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, Galen Seitz, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, ericw, 2005/09/07