This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I Count clock cycle consumption for a Piece of C Code

Hello
I am using C51 Compiler for AT89C51.
How can I Count clock cycle consumption for a Piece of C Code e.g
P1=(int)(((sin((2*PI)*(((double) (k++))/MAX))+1)/2)*BYTE);

?????????
How many clks it will take ???
????????

Parents Reply Children
  • "Keil has a web page where you can get the minimum, average, and maximum times..."

    and if you look at that page, you will see that there can be a 2:1 (or more!) ratio between the minimum and maximum!

    Like I said earlier: there is not a single, constant answer to this question!