HI i am debuging a program written in C if i select 12MHz clock for the program There is a timer in the project window showing the time passed and the no of states(machine cycles). Can i rely on the timer for my time calculations???????
above you wrote: I don't use the ide myself so how come you know so much about it?
have you decided yet whether you use an ide or not? we are waiting impatiently for your next trolling statement!
I am unsure about the simulator timer's accuracy. I suspect that it would be "close" but would not expect it to be exact. When you have interrupts, the simulator might not be handling the real conditions used by the specific controller hardware. I personally haven't explored it... yet.
Your answer is: MAYBE. You should refine your question a bit more.
A test you can do is to set up a simple timer interrupt service routine that toggles a port-pin, place a break-point in the routine. Simulate the program and Run until it breaks. Reset the timer (left-click on the value shown), and repeat until you get a value that seem consistent over several iterations. THEN using real hardware, toggle a port pin and with an oscilloscope measure how accurate your timer is and how well it matches your simulation values. Make sure your Target Option "Xtal (MHz)" parameter matches your hardware configuration.
If your numbers are close, you might be able to use the simulator's value in your calculations (you were not clear on how accurate you need the timing values for your calculations).
Roger,
I need to hire a consultant who is capable of saving at least $0.003 per unit on our kidney dialysis machines. There are going to be about 1.8 Billion units sold this year alone, and this should save the company about eight and a half dollars. You cannot spend more than a couple days reworking the product because more than that amount of time will offset our $8.50 savings. (We plan on spending not more than $6 on your consulting fees). Don't use a compiler because that would tie the code into that Cross Compiler Conspiracy we all keep hearing about. I'll need the source code written in Intellec-8 please.
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
When I say I use the simulator I am, of course, referring to the simulation I do 'in my head'!
Just like my 'in my head' compilation - I carry out there, but always check the result with the Keil tools to make sure there is something they have done for me to complain about.
As you might be aware, compiling in the head is not too bad. It does get a bit trickier when it comes to linking and creating a hex file :(
Using the IDE is obviously for amateurs and is full of male cow manure!
"Well, there's an blatantly obvious statement worthy of forgetting"
On the contrary - I think that it is a much too common belief that almost all ARM cores behaves the same and that almost all C51 are 1-cycle, 4-cycle, 12-cycle, ... and that no instruction ever deviates from the norm.
I guess his highness can also compile with different optimization settings, unroll loops, do register optimization etc. ? FYI, it is much faster, safer and easier to learn how to write good code for your platform rather than to do what you presumably do.
please refer to the subject of this post.
FYI, it is much faster, safer and easier to learn how to write good code for your platform rather than to do what you presumably do.
Because I do it my way, I have enough time available to do my programming tasks, run my department, save my company a fortune AND still have sufficient time to post messages on forums purporting to be an expert on all things '51 related with a light sprinkling of pomposity, superiority and (some might say) authority.
Roger Mallund.
I'll need the source code written in Intellec-8
Might I suggest you specify pseudo-code instead? 100% portable, algorithmic and syntactic errors an irrelevance. It just does what you meant, whatever that might have been.
"Pseudo-code - does exactly what wasn't written on the tin".