Start Back Next End
  
ZBasic Language Reference
116
ZBasic Microcontrollers
directive.  In both instances the specification of a device parameter comprises a parameter name and a
parameter value.  The next section describes the available device parameters.
The following list enumerates the available device parameters, describes the parameter values, indicates
which are required, and, when applicable, when they cannot be used.  Note that neither the names nor
the values are case sensitive.  The procedure for determining appropriate values for some of the device
parameters is fairly complicated (e.g. the SW UART parameters).  The IDE provides a special dialog that
performs the computations given some basic operating parameters.  See Section 9.6 for more details.
The target device parameters may be specified in the project file using the command line option form (--
device-parameter=name,value) or in the source code itself using the Option form (Option
DeviceParameter name value).  In the latter case, the value must be specified either as a decimal
number, as an identifier (begins with a alphabetic character followed by zero or more alphanumeric
characters), or as a quoted string.  Examples of both forms are given with each description below.  See
the section of the ZBasic System Library manual entitled "Processor Speed and Device Configuration
Issues" for information on the effect of generic target configuration values for various ZBasic System
Library routines.
ClockFrequency
ClockFrequency <value>
Default: none
This required parameter specifies the operating frequency of the target device (specified in Hertz).  The
value of this parameter influences all of the time-dependent aspects of ZBasic routines such as serial
communication, I/O timing, delays, etc. as well as the operation of the real time clock (RTC) if it is
enabled.
Examples
--device-parameter=ClockFrequency,16000000
Option DeviceParameter ClockFrequency 16000000
Package
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 you’ve 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.
Previous page Top Next page