|
ZBasic System Library
38
ZBasic Microcontrollers
This value, limited to being 1 or 2, represents a scale factor for mapping RTC timer compare interrupts to
Register.RTCFastTick and Register.RTCTick updates. If RTC_SCALE is 1, Register.RTCFastTick and
Register.RTCTick change at the same rate. If RTC_SCALE is 2, Register.RTCFastTick changes at twice
the rate as Register.RTCTick.
This value represents the rate of change of Register.RTCFastTick which is updated on every RTC timer
interrupt. The rate of change is equal to RTC_SCALE times the rate of change of Register.RTCTick.
This value represents the rate of change of Register.RTCTick which is equal to the rate of change of
Register.RTCFastTick divided by RTC_SCALE.
This value represents the rate of change of the counting register of the RTC timer and its value is a
fraction of F_CPU determined by the RTC timer prescaler setting. For example, if the RTC timer
prescaler setting indicates a divide-by-64 prescaler, F_RTC_TIMER will be F_CPU / 64. For generic
target devices, the compiler computes the prescaler divisor based on the specified ClockFrequency,
RTCFrequency and RTCScale configuration parameters using the smallest available prescaler setting
given the maximum compare register value for the particular device.
This value represents the rate of change of the counting register of the I/O timer and its value is
computed by dividing F_CPU by the prescaler value selected by the value of Register.TimerSpeed1. For
generic target devices, the initial value of Register.TimerSpeed1 is implied by the configuration parameter
TimerSpeed1Divisor. See the section I/O Timer Prescaler Values for information on the relationship of
prescaler selector values to divisor values.
This value represents the rate of change of the counting register of the I/O timer and its value is
computed by dividing F_CPU by the prescaler value selected by the value of Register.TimerSpeed2. For
generic target devices, the initial value of Register.TimerSpeed2 is implied by the configuration parameter
TimerSpeed2Divisor. See the section I/O Timer Prescaler Values for information on the relationship of
prescaler selector values to divisor values.
It is highly recommended to use the built-in values Register.CPUFrequency,
Register.RTCTickFrequency, and Register.RTCTimerFrequency in your application code
instead of using hard-coded values. Doing so also simplifies code that must run on multiple devices that
operate at different speeds. See the descriptions of these values in the ZBasic Language Reference
Manual for more details.
|