ZBasic Language Reference
122
ZBasic Microcontrollers
Package <package-name>
Default: see discussion
This parameter specifies the physical packaging of the target device. Many of the supported generic
target devices are available in more than one package type and often the pin assignments as well as the
available functionality varies based on the package. The set of recognized package identifiers is given
below but only a few of the package types apply to any specific target device. Note, too, that some
devices are available in multiple package types that have the same pin assignments, e.g. QFN-44 and
MLF-44. In such cases it does not matter which package type is specified as long as the pin assignments
match those of the actual package that you are using. Consequently, if the compiler complains that the
package type youve specified is invalid for the target device, try specifying a different package type with
the same pin assignments. Note that although not shown in the table below, it is permitted to specify a
package name omitting the dash preceding the pin count, e.g. PDIP40 is equivalent to PDIP-40.
Recognized Package Types
PDIP-8
PDIP-14
PDIP-20
PDIP-28
PDIP-40
TQFP-28
TQFP-32
TQFP-44
TQFP-64
TQFP-100
SOIC-14
SOIC-20
TSSOP-20
VQFN-20
PLC-44
MLF-28
MLF-32
MLF-44
MLF-64
MLF-100
QFN-28
QFN-32
QFN-44
QFN-64
QFN-100
The default package type varies by target device and is selected from entries in the table above in left to
right and top to bottom order.
Examples
--device-parameter=Package,TQFP-44
--device-parameter=Package,PDIP40
Option DeviceParameter Package "TQFP-44"
Option DeviceParameter Package PDIP40
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 <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
|