Transformada rapida de fourrier (FFT) en assembler para el hc11, dudas sobre el proceso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transformada rapida de fourrier (FFT) en assembler para el hc11, dudas sobre el proceso

197 Views
Leojunin
Contributor IV

Hello, I want to make an FFT by adapting a software that worked in 1979 on a 6800 controller, then it was adapted for the HC11 by Ron Williams and I don't have the year. The software in question is attached. My idea is to make a new modification for the HCS12XE. The thing is that running this software on the HC11, I see something that seems like errors and I would like to find someone who knows well about ASM and can follow the program.

I marked where I "supposedly" see the error with a comment highlighted with two bars "*****************"

I leave the software attached.

Thanks

 

Hola, quiero hacer una FFT adaptando un software que funcionó en el año 1979 sobre un controlador 6800, luego fue adaptado para el HC11 por Ron Willams y no tengo el año. el software en cuestion esta adjunto. Mi idea es hacer nueva modificacion para el HCS12XE. El tema es que corriendo este software sobre el HC11, veo algo que parecen errores y me gustaria encontrar alguien que sepa bien sobre ASM y pueda seguir el programa.

Yo marqué donde "supuestamente" veo el error con un comentario resaltado con dos barras de "*****************"

Les dejo el soft adjunto.

 

Gracias

 

0 Kudos
Reply
1 Reply

164 Views
Leojunin
Contributor IV

Thanks to those who took the time to read me. I found the problem.
It turns out that when doing an 8-bit signed multiplication of an integer with a fractional number, I made a mistake when dragging the signs and the fraction, since the processor does not perform 8-bit signed multiplication, and even less so if a number is fractional.
I was multiplying the sine/cosine of an angle X by a value in question, and the sine/cosine is a signed value between 0 and +/- 0.999 ($0 and $7F/$FF) so after obtaining its sign I must shift it to the left to convert it to decimals.

 

gracias a los que se tomaron el trabajo de leerme. he encontrado el problema.
Resulta ser que al hacer una multiplicacion en 8 bits con signo de un numero entero con uno fraccionario, cometi un error al arrastrar los signos y la fraccion, ya que el procesador no ejecuta multiplicacion de 8 bits con signo, y menos si un numero es fraccionario.
Estaba multiplicando el seno/coseno de un angulo X por un valor en cuestion, y el seno/coseno es un valor con signo entre 0 y +/- 0.999 ($0 y $7F/$FF) por lo cual luego de obtener su signo debo desplazarlo a la izquierda para convertirlo en decimales.

0 Kudos
Reply