Navigation bar
  Start Previous page
 20 of 283 
Next page End 15 16 17 18 19 20 21 22 23 24 25  

11
I/O Timer Pre-scaler Values
Some of the System Library routines that use a timer allow you to modify the frequency used to clock the
timer while others use a fixed frequency determined by the requirements of the routine.  The routines that
do allow frequency modification are divided into two groups, one controlled by the value of
Register.TimerSpeed1 and the other controlled by the value of Register.TimerSpeed2.  The
table below shows the System Library routines that use a timer and, where applicable, the timer speed
variable that controls the timer frequency.
System Library Routines Using TimerSpeed Values 
Routine
TimerSpeed Value
TimerSpeed1¹
I2CCmd()²
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed2¹
TimerSpeed2¹
TimerSpeed2¹
PWM()
TimerSpeed1
TimerSpeed1
TimerSpeed1
TimerSpeed1
  Notes: 
1)
The timer frequency is scaled. See below.
2)
The timer is used only for channels 1-4.
The default value of Register.TimerSpeed1 is 1 and the default value for Register.TimerSpeed2
is 2.  The table below shows the correspondence between the allowable values for the TimerSpeed
registers and the resulting clock frequency applied to the I/O Timer.  The divisor specified is applied to the
CPU clock frequency to yield the I/O Timer clock frequency.  For compatibility with BasicX (but only for ZX
processors running at 14.7456MHz), some of the routines effectively divide the timer frequency by 2 so
that the time units associated with parameters or return values is preserved.  If you change the timer
speed setting, the scale factor is still applied.
Previous page Top Next page