Comment #6 on issue 83 by jsuijs: delay.jal accuracy varies
http://code.google.com/p/jallib/issues/detail?id=83
And after some minor ajustments in 10us-loop:
CPU
setpoint 1MHz 4MHz 8MHz 20MHz
1 300.00% 0.00% 0.00% 0.00% 75.00%
2 100.00% 0.00% 0.00% 0.00% 25.00%
5 60.00% 0.00% 0.00% 0.00% 15.00%
9 33.33% 0.00% 0.00% 0.00% 8.33%
10 420.00% 30.00% 10.00% 2.00% 115.50%
20 500.00% 65.00% 12.50% 1.00% 144.63%
50 308.00% 26.00% 5.00% 0.80% 84.95%
100 244.00% 13.00% 2.50% 1.40% 65.23%
200 212.00% 6.50% 1.25% 1.70% 55.36%
500 192.80% 2.60% 0.50% 1.88% 49.45%
1000 186.40% 1.30% 0.25% 1.94% 47.47%
2000 183.20% 0.65% 0.13% 1.97% 46.49%
1000 8.80% 1.60% 1.20% 0.32% 2.98%
2000 2.40% 0.80% 0.40% 0.24% 0.96%
5000 1.12% 0.16% 0.08% 0.13% 0.37%
10000 0.16% 0.00% 0.00% 0.08% 0.06%
20000 0.32% 0.08% 0.06% 0.06% 0.13%
161.91% 8.69% 1.99% 0.80% 43.35%
These result show:
- perfect accuracy below 10us (thanks to the compiler)
- accuracy of delay_10us() is largly improved. Further improvement is only
possible
with larger, more complex code.
- accuracy of delay_1ms() is pretty good (but could be improved)
- use of delay_10us() with clock below 4 MHz is not recommended, since the
loop just
takes too long. Concider use of _usec_delay(n) if you need better accuracy.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---