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 PeterS - 28.02.2013 14:46)
Als Antwort auf FFT routines von PepeV - 26.02.2013 21:50

> 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!)
> - 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?

Hello Pepe,

you are right. I just had forgotten that the Y-Register should better not be changed,
because it is normally used as Data Stackpointer. The interrupt routines are using it
to save the contents of registers.

Regards,

Peter

>
> Regards,
> Pepe


    Antwort schreiben


Antworten:

Re: FFT routines (von PepeV - 28.02.2013 15:41)
    Re: FFT routines (von PeterS - 28.02.2013 17:28)
        Re: FFT routines (von PepeV - 28.02.2013 21:26)