2004-12-24 11:22 PM
2003-10-09 06:06 AM
Dear all,
I use the ST72F521R9 microprocessor. I need to calculate the trigonometrical formula x=sin(y) using the assembly code of the ST7. Is there anyone who has such routine either in souce code or as object file? Thank you for the help.2003-10-12 08:28 PM
Can you use a tabel to calculate it?
2003-10-12 09:47 PM
Dear Moppie,
which kind of table you mean?2003-10-13 12:02 AM
You want to calculate X=sin(Y).
If the Y = 0 to 255 (or higher) you can made a table. Y is the pointer of the table In the table are the calculated values of sin(Y), thus X You spend a lot of time in the programming.2003-10-13 01:10 AM
I cannot use a table because I need to calculare the sin formula for sine wave generation and to calculare a cripto code. So the value of Y could be any.
2003-10-13 01:34 AM
If you want to made a sine wave generator, you could be use a table!
You made a table like my last message. The frequency of the sinewave can be varieted by the sample time of reading the table. The amplitude can be varieted by the multiply factor by reading the value of the table.2003-10-13 03:03 AM
you're full right about. The problem come up when I need the calculation of the sin to create a cripto code. Actually in this case I need to calculate the sin and cosin. Do you have any suggestion?
2003-10-13 03:12 AM
I don't understand the words cripto code?
For sin and cosin you can use 2 pointers for the same table with 90 degrees phaseshift [ This message was edited by: Moppie on 13-10-2003 15:44 ][ This message was edited by: Moppie on 13-10-2003 15:45 ]2003-10-13 04:51 AM
The crypto code means generating stream of data encoded with a certain kind of calculation so then the real data coming out from a microprocessor are unreadable. This kind of encoding is done with a public key and private key criteria to generate protected trasmission. To do that the two main formula used are sin and cosin. It is true that the cosin is the 90° phaseshift respect the sin but in this case I need a precise calculation otherwise the data decoder will re-generate a wrong message.