Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - Zum C-Control-I-Forum - Zum C-Control-II-Forum

Re: FFT routines Kategorie: Programmierung Assembler (von Torsten - 28.02.2013 19:51)
Als Antwort auf FFT routines von PepeV - 26.02.2013 21:50
Ich nutze:
C-Control Pro Mega128
> Hi all,
>
> Attached are some FFT routines in assembler, adapted from the work of ChaN.
> Any suggestions for improvement are welcome.
>
> The routines:
> 1. perform a wave capturing (a series of AD conversions in Free Running Mode)
> 2. execute 'butterfly operations'
> 3. calculate the frequency spectrum
>
> I have tested them on my Pro-Bot128 and plan to use them for sound control,
> in stead of the much slower routines in cc I used until now.
> Some figures with results are included in the attached zip file too.
>
> Torsten, you were right twice:
> - I needed access to flash in assembler for the sin/cos and other tables. Since
>   this is not possible directly, I now copy these to ram before use. (For this
>   reason I cannot process more than 256 samples, helas!)

Hello Pepe,

to prevent that valuable RAM-memory is consumed,
I can suggest two solutions to you.

 -writing asm-code that functioned as a array

 -using the EEPROM

We can not write such code by ourselves,
but we can make, however, like ChanN did.
Let's make perl for us write the code.
See below.

 GruÃ? Torsten

> - I need to disable the global interrupt. But to my great surprise, not only in the
>   ADC capture but in all routines. If I do not do that, I end up with garbage results.
>  
> Peter: can you explain why interrupts mess up my routines? Is it that interrupts
> trigger actions that change registers while my routines are running? Is it the Y-
> register?
>
> Regards,
> Pepe
TableGenerator-0.01.zip




    Antwort schreiben


Antworten:

Re: FFT routines (von PepeV - 19.03.2013 13:47)