BobEdge
- 4th June 2009, 16:50
Hi all,
Can anyone tell me how to work out how long an instruction takes to execute when running at 20MHz?
I have some software for firing a 3 phase bridge rectifier using thyristors. It now needs modifying to work on 50 or 60Hz. working with 50Hz just required a simple pauseus. Now it needs an if then else.
if frequency = 50 then
pauseus 1533 'delay for 60 degrees on 50Hz
else
pauseus 977 'delay for 60Hz
endif
The way phase angle firing works means that you get 6 peaks of current every mains cycle but the peaks are uneven, by as much as 200A.
I think this is because of the extra time the if then takes to run.
This just got me thinking how can I work out the time it takes to run an instruction, for time sensitive applications.
Regards
Bob...
Can anyone tell me how to work out how long an instruction takes to execute when running at 20MHz?
I have some software for firing a 3 phase bridge rectifier using thyristors. It now needs modifying to work on 50 or 60Hz. working with 50Hz just required a simple pauseus. Now it needs an if then else.
if frequency = 50 then
pauseus 1533 'delay for 60 degrees on 50Hz
else
pauseus 977 'delay for 60Hz
endif
The way phase angle firing works means that you get 6 peaks of current every mains cycle but the peaks are uneven, by as much as 200A.
I think this is because of the extra time the if then takes to run.
This just got me thinking how can I work out the time it takes to run an instruction, for time sensitive applications.
Regards
Bob...