capacitor1
Member level 3
- Joined
- Jul 25, 2012
- Messages
- 66
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,744
Hi!
I have an angle in the microcontroller from 0 to 360 , and I want to calculate its Sin , and display this number as analog .
I use CCS compiler , and I think that the Math library exists.
the hard thing how to convert the number from 0 to 1 ( if we neglige the negatif numbers ) , and with 3 digits after the point . (0.000,0.001,....,0.999,1.000) to a voltage .
Ex: if the angle=60 : sin(60)=0.8660254≈0.866 ===> 0.866V
thanks
I have an angle in the microcontroller from 0 to 360 , and I want to calculate its Sin , and display this number as analog .
I use CCS compiler , and I think that the Math library exists.
the hard thing how to convert the number from 0 to 1 ( if we neglige the negatif numbers ) , and with 3 digits after the point . (0.000,0.001,....,0.999,1.000) to a voltage .
Ex: if the angle=60 : sin(60)=0.8660254≈0.866 ===> 0.866V
thanks