Simulator in Editor V 5.3.1

RexLan

Senior Member
While using the simulator is there a feature/way to get code timing information.

For example if I have a code module haw can I find out how long it takes to execute and it need to be pretty accurate.

Thanks
 

fernando_g

Senior Member
This has been discussed previously here.
There are many threads on the subject.

Essentially (and please forum Gurus, correct me if I'm wrong), the PICAXE executes approximately 2000 instructions per second @ 4Mhz. With a big emphasis on "APPROXIMATELY". The reason beign the BASIC interpreter.
 
Last edited:

RexLan

Senior Member
I did a search first and did not get anything.

Tried again and found some useful info this time.

Thanks
 
Last edited:

inglewoodpete

Senior Member
For determining critical timing, I use PulsOut to a spare pin and an oscilloscope. You need to determine the time taken to execute the Pulsout as well, so that it can be subtracted from the displayed time.

If using this method, you need to know that the tokenised code does not fit neatly into byte boundaries, so often 'wraps' from one byte to the next. This causes small variations in the execution speed, depending on where a command was stored.
 

fernando_g

Senior Member
As I-Pete mentions, I've also performed some similar experiments (with a Pulsout embedded within the code) to determine actual execution speed.
Not on the simulator, but on the actual PICAXE device.

Of course, if you are employing the PICAXE's internal oscillator, there will be some voltage/temperature related variations. Use a PICAXE variant that supports an external crystal.
 
Top