79 of 208
ZBasic Language Reference 71 ZX Microcontroller Family Register.RTCTickFrequency This read-only UnsignedInteger value indicates the number of RTC ticks that will occur per second. For most ZX models currently available, the RTC tick frequency is 512Hz. Register.RTCTimerFrequency This read-only UnsignedLong value indicates the frequency at which the TCNT register of the RTC timer changes value. For most ZX models currently available, the RTC timer frequency is 230,400Hz. This value will be useful for converting 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 models currently available, the CPU frequency is 14,745,600Hz. 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 wouldn’t 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.TimerIOBusy Register.TimerUARTBusy These Boolean values indicate when the processor’s 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 ZX devices. See Section 3.7 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 Section 3.7 for more information on Timer use. Register.TaskStackMain Register.TaskStackCurrent These UnsignedInteger values represent the address of the task stack for the Main() task and the current task, respectively. The value, which is read-only, can be passed to the various task management functions by using the System Library function CByteArray(). See Section 3.28 for more details on Task Management.