??? 09/24/11 20:57 Read: times |
#183862 - Here's something to try ... Responding to: ???'s previous message |
... and it might help you to learn what's going on ...
http://www.opcube.com/home.html#MIDE51 This is a freeIDE including a macro assembler that includes a pretty helpful instruction-set database, a small simulator, and, of course, an editor without which you get nowhere. You can enter (with the editor) your code, "build" (assemble) it, or, "build and simulate" the code, which will count the cycles for you, thereby letting you know how much time has gone by, and it cursorily illustrates the interaction between your ISR, if there is one, and the rest of the code, in simulated time. It allows you to step through your code, all the while letting the software keep track of some of the details in the MCU and your code that might not be so clear to you. It may help you to wrestle with the low-level details. However, IT WON'T READ THE DATASHEET for you, nor will it DO YOUR THINKING for you. It can be a big help. It's not the only tool of this type, but, while it supports a 'C' compiler, (SDCC) it doesn't require that you involve yourself with it in any way unless you specifically want to do that. You will, of course, have to do your own arithmetic in getting from the number of elapsed cycles to the amount of elapsed time, but guess what ... you can do that using the Windows Calculator. RE |