Start Back Next End
  
ZBasic System Library
39
ZBasic Microcontrollers
Section 3 - Processor Speed and Device Configuration Issues
For ZX devices, the processor speed and configuration are fixed and specific to each device.  The clock
speed for most ATmega-based ZX devices is 14.7456MHz but special versions are available that run
slower and faster.  ZX devices based on the ATxmega run at 29.4912MHz.  The first table below
summarizes the differences that arise due to the difference in operating speeds.  The second table
summarizes the differences at reduced operating speeds obtained by using the clock prescaler directive.
ZX Device Processor Speed Variations
Parameter
7.3728 MHz
14.7456 MHz
18.432 MHz
29.4912 MHz
RTC Tick Frequency
512 Hz
512 Hz
500 Hz
512 Hz
RTC Fast Tick Frequency
512 Hz
1024 Hz
1000 Hz
512 Hz
RTC Scale Factor
1
2
2
1
RTC Timer Frequency
115.2 KHz
230.4 KHz
72 KHz
115.2 KHz
Multi-tasking Time Slice
1.95 mS
1.95 mS
2.0 mS
1.95 mS
Default TimerSpeed1 Units
135.6 nS
67.8 nS
54.4 nS
67.8 nS
Default TimerSpeed2 Units
1.085 µS
1.085 µS*
434 nS
271 nS
CountTransitions() Sample Rate
204.8 KHz
409.6 KHz
512 KHz
737.3 KHz
Maximum SW serial baud rate
9600
19200
19200
19200
Parameter
460.8 KHz
921.6 KHz
1.8432 MHz
3.6864 MHz
RTC Tick Frequency
400 Hz
512 Hz
400 Hz
400 Hz
RTC Fast Tick Frequency
400 Hz
512 Hz
400 Hz
400 Hz
RTC Scale Factor
1
1
1
1
RTC Timer Frequency
7.2 KHz
115.2 KHz
7.2 KHz
3.6 KHz
Multi-tasking Time Slice
2.5 mS
1.95 mS
2.5 mS
2.5 mS
Default TimerSpeed1 Units
2.17 µS
1.085 µS
542.5 nS
271.3 nS
Default TimerSpeed2 Units
17.36 µS
8.68 µS
4.34 µS
2.17 µS
CountTransitions() Sample Rate
12.8 KHz
25.6 KHz
51.2 KHz
102.4 KHz
Maximum SW serial baud rate
600
1200
2400
4800
Note, particularly, that the “units” value for TimerSpeed2 on ZX devices running at 14.7456MHz is
scaled to match the value corresponding to operating at 7.3728MHz.  This is done for compatibility with
BasicX devices that all operate at the lower speed.  Consult the section I/O Timer Prescaler Values for
information on which routines use the TimerSpeed1 and TimerSpeed2 values.  The scaling effect
described above can be disabled by setting the value of Register.IOScaling to False.
For generic target devices, the processor speed can be any reasonable value and the RTC frequency can
be any value attainable using the available prescaler and compare value settings for the RTC timer. 
Further, the initial I/O Timer prescaler settings Register.TimerSpeed1 and Register.TimerSpeed2 can be
any useful values.  Consquently, the meaning of results returned by some ZBasic System Library routines
can only be described in terms of the value of these configurable items (all of which are specified at
compile time).
The table below gives several important values that are dependent on device configuration parameter
values both in the case of ZX devices (with fixed values) or generic target devices (with user-specified
values).   The symbols given in the table entries is used in the descriptions of various ZBasic System
Library routines thus allowing you to infer the meaning of the results based on device configuration
values.
Previous page Top Next page