Does this OSC trim model work on PICAXE chips?

inglewoodpete

Senior Member
It probably does. Are you trying to get clock frequencies outside the range offered by the PICAXE CalibFreq command? That has always been sufficient for me: if you go too far off frequency, async. logging won't synchronise.

I imagine that adding capacitance to the internal RC oscillator can only slow the clock down?
 

hippy

Ex-Staff (retired)
The PICAXE has CALIBFREQ as inglewoodpete mentions which probably works similarly to how the article describes.

The best way to calibrate the internal oscillator on a PICAXE is to choose a CALIBFREQ setting and use the on-chip hardware to output a pulse or pulse train train; PWMOUT, HSEROUT, or HSPIOUT.

That means the signal generated comes purely from the chip hardware, its timing affected only by the internal oscillator, not by the PICAXE firmware or program setting things up.

One can then look at the signal, see how close it is to desired and adjust as required.

If one has a crystal controlled PICAXE the signal output can be read by that. That can determine whether the internal oscillator needs to be adjusted up or down, can signal the PICAXE to do that and adjust itself until the setting is optimal.

Conversely a PICAXE can be fed a signal from a reliable source - PC serial out may often be good enough for that or a second crystal control PICAXE can be used - and it can adjust itself.

But whether calibration is worth doing is debatable. The internal oscillators have all generally been 'spot-on' in my experience, and at least close enough that it won't be having any significant effect.

The official specifications do indicate a wide variance is possible, and some have reported experiencing that, but I have never experienced that myself.

Most applications won't need incredibly accurate timing and, when they do, it's easier to use a 28X2 or 40X2 which supports an external crystal or resonator, side-steps needing any calibration.
 
Top