Start Back Next End
  
ZBasic Language Reference
117
ZBasic Microcontrollers
Examples
--device-parameter=Package,TQFP-44
--device-parameter=Package,PDIP40
Option DeviceParameter "TQFP-44"
Option DeviceParameter PDIP40
RTCFrequency
RTCFrequency <value>
Default: 0
If your application uses multiple tasks or utilizes any of the RTC-related routines, you must specify the
operating frequency of the real time clock (in Hertz).  It is important to note that the specified RTC
frequency may not be attainable with 100% accuracy given the main clock frequency, the available timer
divisors, the RTC scale factor (see below) and the resolution of the timer used for the RTC.  If the
realizable RTC frequency varies from the specified frequency by more than the specified or default error
threshold (see RTCError below) the compiler will issue a warning.
Examples
--device-parameter=RTCFrequency,500
Option DeviceParameter RTCFrequency 500
RTCScale
RTCScale <value>
Default:  see discussion
At some operating frequencies, given the available divisors and resolution of the RTC timer, a scale factor
is sometimes necessary to achieve a convenient RTC frequency.  The RTCScale device parameter
specifies the number of RTC timer interrupts that will occur for each RTC tick.  Acceptable values for
RTCScale are 1 and 2.  Note that the rate of change of the ZBasic value Register.RTCFastTick is
equal to the rate of change of Register.RTCTick times the RTCScale value.  If you do not specify a
value for this parameter, a value will be chosen by the compiler that results in an RTC frequency closest
to the requested value.
Examples
--device-parameter=RTCScale,2
Option DeviceParameter RTCScale 2
RTCError
RTCError <value>
Default: 10
This parameter gives the desired error threshold, expressed in parts-per-million, for the realizable RTC
frequency.  If the realizable RTC frequency deviates by more than the threshold value the compiler will
issue a warning.
Examples
--device-parameter=RTCError,100
Option DeviceParameter RTCError 100
Previous page Top Next page