Using CORDIC To Calculate Sine & Cosine On 8bit AVR (ATMega88)
Автор: DigitalPhage
Загружено: 2012-08-01
Просмотров: 5605
Описание:
Here's a quick demo showing the performance of using CORDIC to calculate Sin & Cos trigonometric functions on an 8bit micro.
The brain is an Atmel ATMega88 running at 1Mhz, all calculations in 32bit fixed-point, code written in assembly language.
CORDIC is a successive approximation type algorithm where a trade-off between speed and precision may need to be made, the code running here needs 29 cycles (loops) to reach maximum precision but is accurate enough for most applications using 21 cycles or 16 if speed is the thing.
Also this type of CORDIC generates both Sine & Cosine simultaneously (2 for the price of one).
Some stats:
ATMega88 @ 1Mhz ~8% Code Space
Resolution......29(Full,Slow)......21(Good)......16(Low,Fast)
Quadrant 1........3041uS.............2034uS..........1545uS
Q2....+34uS
Q3....+44uS
Q4....+45uS
Sample of Accuracy:
SIN(28.125) = 0.473319667184843 from calculator.
Cycles
29 = 0.47331966
21 = 0.473319
20 = 0.47331
19 = 0.4733
18 = 0.4733
17 = 0.4733
16 = 0.4733
15 = 0.473
Source Code:
http://bit.ly/O8N5ui
Bitcoin: 1LqDCrj8QAUjACnjRNEw8vq3T9p2R5k5RW
IXIBA (Craig Webster)
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: