Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I'm using a XE167 at 80Mhz. With Tasking EDE C compiler
And I 'm having the following problem:
This piece of code takes 4.5uS of time to execute and that is too slow.
rotationangle+=360000l;
rotationangle%=360000l;
angle=(rotationangle / 10);
state=angle / 6000l;

Is there a way to speedup this code with the MAC functions of the processor.

hope you can help.
0 Likes
1 Reply
Not applicable
you should try to avoid 32bit variables in a 16bit architecture if you are concern about speed.
0 Likes