The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Ken Smith
Subject: Re: fft in hc11
Date: Thu, 10 Oct 2002 02:37:33 +0000 (UTC)
Organization: a2i network
NNTP-Posting-Date: Thu, 10 Oct 2002 02:37:33 +0000 (UTC)
In article ,
Albert Leng wrote:
>After studying through the code "fft routine" from motorola, i really
>have no idea what the code is about. Can you please give me some ideas on
>how the code relates to the above 4 steps and how i can set the A/D for
Since I'm not looking at the code I can only give a few guesses about what
may be the problem.
The reordering of the data can happen before or after the
butterflies. The difference in the math for this is quite small.
Does it look like the code is looking for the prime factors of N before it
does much else. If so it may be the version that works for non-power of
two lengths. Usually only 2, 3, 5 and 7 are allowed as factors in this
Is there a bunch of code to do with the padding? If so this may be
confusing you. If it pads to a power of two length with a constant plus
cosine function, it is trying to reduce the artifacts caused by padding.
Some versions of the FFT take two runs at the data. The simplest of these
just finds the average of all of the values and subtracts it away before
the main code starts to work. The FFT tends to lose log(N) bits in the
process. If you don't want all of the bits to be junk, you sometimes have
to do things to reduce the number of bits needed. Subtracting the average
is the simplest of these. More complex versions strip out known
Now for the bad news. Chances are the FFT is the worst way to do what you
are trying. If the signal generator is not run from the same crystal as
the sampling system, the frequency slipping spreads the harmonics out and
makes them hard to measure exactly.
If you know the input frequency exactly you know the harmonics. There is
no need to make the DFT produce anything but the amplitudes at the
frequencies you care about. Doing a 1 million point FFT is a lot harder
than making 10 or 20 channels of DFT for 1 million points.
email@example.com forging knowledge
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup