ZBasic Language Reference
70
ZBasic Microcontrollers
Register.RTCTickFrequency
This read-only UnsignedInteger value indicates the number of RTC ticks that will occur per second.
For most ZX devices currently available, the RTC tick frequency is 512Hz. For generic target devices
RTCTickFrequency is a configurable device parameter.
Register.RTCTimerFrequency
This read-only UnsignedLong value indicates the frequency at which the TCNT register of the RTC
timer changes value. For most ZX devices currently available, the RTC timer frequency is 230,400Hz.
For generic target devices RTCTimerFrequency is dependent on the configurable parameters
CPUFrequency, RTCScale and RTCTickFrequency. This value is useful, for example, to convert the
value returned by GetElapsedMicroTime() to seconds.
Register.CPUFrequency
This read-only UnsignedLong value indicates the frequency of the CPU clock, in Hertz. For most ZX
devices currently available, the CPU frequency is 14,745,600Hz. For generic target devices
CPUFrequency is a configurable device parameter.
Register.SeedPRNG
This register, having type Long, represents the seed value used by the built-in pseudo-random number
generator. With a given seed value, the random number generator will always return the same sequence
of values. Usually, you wouldnt want this type of repeatability but for some purposes it is useful. See the
descriptions for the System Library routines Rnd() and Randomize() for more details.
Register.Timer0Busy
Register.Timer1Busy
Register.Timer2Busy
Register.Timer3Busy
Register.Timer4Busy
Register.Timer5Busy
Register.Timer6Busy
Register.Timer7Busy
Register.TimerIOBusy
Register.TimerRTCBusy
Register.TimerUARTBusy
These Boolean values indicate when the processors built-in timers are being used. Your code can pass
one of these register values as the parameter to the Semaphore() function in order to get exclusive
access to the corresponding timer. The last two entries are synonyms for one of the earlier entries. This
is useful because the actual timer used, for example, for timing I/O functions varies amongst ZBasic
devices. See the Resource Usage subsection entitled Timers in the ZBasic System Library manual for
more information on Timer use.
Register.TimerSpeed1
Register.TimerSpeed2
These two registers, both Byte values, represent the timer pre-scaler value used by several System
Library routines for the I/O Timer. Setting the value of these registers other than by direct assignment will
produce undefined results. See the Resource Usage subsection entitled Timers in the ZBasic System
Library manual for more information on Timer use.
|