PICAXETM Internal Clock Speed Vs Temperature

An experiment to determine the relationship

 

I've been investigating the way the PICAXE internal clock frequency varies with temperature for a PICAXE18X. If the relationship can be established then it might be possible to apply a correction to PICAXE BASIC calculations, if necessary (e.g in timing applications).

... PICAXEClock1.rtf

This code measures the pulse-width from the Real Time Clock chip on the Data-Logger Module and records temperature at the same time. (I connected the square-wave output of the RTC to one input of the PICAXE).

The graph so far is:

 

There is obviously a lot of scatter of the data points. I don't know the explanation, however I think one reason may be due to the fact that the DataLogger module doesn't have a regulated supply. I've had to turn on the flashing LED that is driven from the square wave output of the RTC and this LED when it turns on will create a surge of current that may well affect the performance of the Pulsin command.

Another reason may be that my measuring conditions were far from ideal. I measured in the house (with central heating going on and off throughout measurement sessions), and also outside.

I intend to rerun the tests with a regulated supply and better conditions when I get time.

However there is an unmistakable trend in the data, picked out by the automatic trend-line. The equation of the trend-line is shown on the graph.

The conclusion I would like to reach is that even though the internal clock frequency of a PICAXE18X varies with temperature, it does so in a predictable way. Understanding the relationship would allow lookup tables or equations to be incorporated into PICAXE code to apply corrections to timing calculations according to the prevailing temperature. Whether it's worth the effort is still to be seen!

 Back to Home Page

.

 

 

 

 

.