Configure the internal timer3 on X2 parts.

techElder

Well-known member
I'm trying to figure out how timer3 works.

Is the accuracy of this quote from Picaxe Manual 2 "BASIC COMMANDS", page 204, common knowledge?

The internal timer counts, when enabled, at a rate of (1/resonator speed) / 4. This means, for instance, at 8MHz the internal timer increment occurs every 0.5us. This value can be optionally scaled by the prescale value (set via bits 5:4) , so with a 1: 8 prescale the increment will occur every 4us (8 x 0.5us).
Confusing at best ...
 
Last edited:

tjetson

Senior Member
A quick calculation leads me to believe it should be (1/speed)/0.25

Example:
8 MHz = 8,000,000 Hz

1/8,000,000 = 0.000000125
0.000000125 / 0.25 = 0.0000005 seconds,
or 0.0005 milliseconds, or 0.5 microseconds.


A typo perhaps, or are my calculations wrong?
 
Top