Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

FFT Algorithm on Microcontroller

Status
Not open for further replies.

satria02

Junior Member level 2
Joined
Apr 22, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bandung
Activity points
1,467
Hi,

i want to convert time based analog signal to frequency based signal (spectrum signal) by using microcontroller and display it on graphical LCD...,

i think method that i can used is FFT....but i haven't knew yet how to applied FFT method on microcontroller...

can you tell me the algorithm for FFT on microcontroller?

thanks before...

Satria
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,181
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,330
satria

I already used a funcion FFT.C wich had download on web ( don´t remember form where ).
Due uC have few built-in RAM ( generally 2k Bytes ) the precision calculated will not goes much more than ~128 points ( I already performed a test w/ MSP430F149 from TI ).

That kind of application is better performed by a uC with external RAM.
( However LCD resolution is not so wide so 128 may be enought )

+++
 

satria02

Junior Member level 2
Joined
Apr 22, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bandung
Activity points
1,467
Thanks for the information..

can you tell me the algorithm (flow chat) of FFT that you used?
i also get the function of FFT.c, but i still didn't understand about the algorithm of that function...
get the function on C but didn't know yet the flow chat of that function is not so helpful...

i need the algorithm (flow chat) so i can modify the function...

thanks
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,181
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,330
...i need the algorithm (flow chat) so i can modify the function...
No changes shall be performed.
You need only input argument parameters ( resolution points / input data adress ).

+++
 

skarthikshines

Member level 5
Joined
Feb 21, 2011
Messages
84
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,073
hi..
want to convert time based analog signal to frequency based signal (spectrum signal) by using multitasking computer tinytiger2 and display it on graphical LCD...,

i think method have to use is FFT....but i am not having any idea about FFT

can you tell me the algorithm for FFT In the form of flowchart or procedure it will help for me to understand...
 
Last edited:

doraemon

Super Moderator
Staff member
Joined
Jun 21, 2009
Messages
1,068
Helped
273
Reputation
554
Reaction score
248
Trophy points
1,343
Location
Japan
Activity points
10,597
Hello!

Be aware that most of the FFT.c you find on the net are general purpose code,
written using float or double numbers. It also calls sin() and cos(). If you run
this on a microcontroller, you get the worst you can imagine in terms of
efficiency.
If you want it to run fast on a microcontroller:
1. Make sure it uses integers or fixed-point multiplications. If not, transform the
code to use integers;
2. Make sure it uses a predefined sin table. If not, make a sine table from
0 to 3π/2;
3. Use a fast multiplier if any. I have implemented it on MSP430 using the
32 bit hardware multiplier. Just for info: one float * float multiplication takes
about 300 clocks. One 16bit * 16bit multiplication takes 7 clocks (if I remember
correctly) on MSP430.

Here is an FFT implementation:
http://passworld.co.jp/ForumImages/2010/04/01/VibeAnalyzis.mp4
It shows the effect of the mechanical parameters on frequency distribution.
The spectrum is normalized, which explains why there is so much noise when
the signal is weak.
The width of the display is 128. I have used a 256 samples FFT, but the power
spectrum is symmetric, so I display only the first half of it.
As the sampling frequency is around 1000 Hz, there are only 4 FFTs every
second. This is why it does not look very responsive, but it is actually very fast.

Dora.
 

shahbaz.ele

Advanced Member level 1
Joined
Aug 12, 2008
Messages
448
Helped
72
Reputation
146
Reaction score
72
Trophy points
1,308
Location
Islamabad, Pakistan
Activity points
3,598
Dear Dora nice comments, really helpful.
One problem is that your link is not opening.
Other is that I want to impliment FFT on ATmega32, Can you help me please.
Thanks a lot in advance
 

satria02

Junior Member level 2
Joined
Apr 22, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bandung
Activity points
1,467
Finally i decide to implement FFT algorithm on microcontroller using my own script program on C

i transform from FFT equation into C....

you can see the FFT equation on this link
Fast Fourier Transform (FFT)
 

skarthikshines

Member level 5
Joined
Feb 21, 2011
Messages
84
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,073
Dear Dora nice comments, really helpful.

i need your help regarding doing FFt in msp 430.. kindly help me
Thanks a lot in advance
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top