I select the Atmel 87F51RC with 24.0M clock. How can I get the the running time of my programme by using the keil IDE? If i can get the running time of the programme by keil, is it equal to the the real running time on the Atmel 87F51RC I selected? thanks for help
It seems to me that there is a states value in the register windows of the keil debugger. This states value gives the number of your 8051 cycles. The next value is sec, that give you the calculating time depending of your crystal value
How can I get the the running time of my programme by using the keil IDE? Use the Performance Analyser But most embedded applications don't just run & then stop when they've finished; they just keep going for as long as the equipment in which they're embedded keeps running! But you can still use the Performance Analyser to time a particular part of your application. is it equal to the the real running time on the Atmel 87F51RC I selected? If you just had simple program which runs "straight through" - without interrupts or anything - then, yes! But if you have interrupts (as most embedded systems do) or any other external factors which would affect the run time (eg, slow memory; unknown wait times for peripherals; execution paths dependent on external states/events) then you'd need to do some sort of statistical model to get realistic results from the Performance Analyser. (Some) emulators can do timing analysis in your target - but you'd still have to ensure that you measured during a "realistic" scenario.
is it equal to the the real running time on the Atmel 87F51RC I selected? If you just had simple program which runs "straight through" - without interrupts or anything - then, yes! But if you have interrupts (as most embedded systems do) or any other external factors which would affect the run time (eg, slow memory; unknown wait times for peripherals; execution paths dependent on external states/events) then you'd need to do some sort of statistical model to get realistic results from the Performance Analyser. Or, you can just look at the Secs displayed in the Registers window and see how long the whole thing took. That's much easier and you don't have to do ANY math at all! :-) Jon