ZBasic Language Reference
4
ZBasic Microcontrollers
The ZX-40, ZX-40a, ZX-40p, ZX-40n, ZX-40r, ZX-40s and ZX-40t are 40-pin DIP format integrated circuits
that are pre-programmed with the ZX control program. However, in order to use them you must add a
few external components such as a regulated supply, a crystal, a memory chip and serial interface
circuitry. The compensating advantages of the 40-pin parts are reduced cost, more design flexibility and
the availability of more I/O pins. These attributes make the 40-pin ZX well-suited for advanced projects
and commercial applications. See Appendix E for more detailed information on the 40-pin ZX devices
including several suggested connection diagrams.
The ZX-44, ZX-44a, ZX-44p, ZX-44n, ZX-44r, ZX-44s and ZX-44t are 44-pin TQFP format integrated
circuits that are pre-programmed with the ZX control program. Similarly, the ZX-1280 and ZX-1281 are
100-pin and 64-pin, respectively, TQFP format integrated circuits that are pre-programmed with the ZX
control program. All of these devices are bare CPUs that require some additional support components.
Because of their smaller size, they are well suited for larger volume applications or those that require
compact size. See Appendix F for more detailed information on the 44-pin ZX devices including several
suggested connection diagrams. See Appendix G for more detailed information on the suggested ZX-
1281 circuitry and Appendix H for the ZX-1280.
The ZX-328n and ZX-328l are a 28-pin DIP format integrated circuit that is programmed with the ZX
native mode control program. In order to use the ZX-328n or ZX-328l you must add a few external
components such as a regulated supply, a crystal and serial interface circuitry. See Appendix I for more
detailed information on the ZX-328n and ZX-328l including several suggested connection diagrams.
The ZX-32n and ZX-32l are a 32-pin TQFP format integrated circuit that is programmed with the ZX
native mode control program. In order to use the ZX-32n or ZX-32l you must add a few external
components such as a regulated supply, a crystal and serial interface circuitry. See Appendix J for more
detailed information on the ZX-32n and ZX-32l including several suggested connection diagrams.
The ZX-32a4, ZX-128a4u and ZX-128a1 are 44-pin TQFP and 100-pin TQFP format ATxmega integrated
circuits that are programmed with the ZX native mode control program. In order to use the ZX-32a4, ZX-
128a4u or ZX-128a1 you must add a few external components such as a regulated supply, a crystal and
serial interface circuitry. See Appendix K and Appendix L and for more detailed information on the ZX-
32a4, ZX-128a4u and ZX-128a1, respectively, including several suggested connection diagrams. Note,
particularly that the ATxmega-based ZX devices run at twice the speed of most other ZX devices and
operate at a maximum of 3.6 volts.
It should be noted that ZBasic is a superset of NetMedias BasicX language, incorporating many
improvements and advanced features. Many, perhaps even most, BasicX programs can be recompiled
using the ZBasic compiler and the resulting code should run exactly as it would on the BX-24
microcontroller except for differences due to the fact that the ZX is twice as fast as the BX-24. See
Chapter 7 for more information on compatibility issues.
Some ZX devices run in native mode meaning that the ZBasic application is compiled to native object
code for the processor. In contrast, other ZX devices contain a virtual machine (commonly referred to
as a VM) and ZBasic applications are compiled to instruction codes that are executed by the VM. The
primary advantage of the native mode devices is that the application executes faster but the disadvantage
is that the resulting program is generally larger than the corresponding VM mode program.
Some ZX devices mentioned in this manual have an "e" or u suffix, e.g. ZX-24pe, ZX-24nu. These
extended devices are produced by Oak Micros under license from Elba Corp. and are available in both
VM and native mode versions.
1.3 Support for Generic Microcontrollers
In addition to the ZX microcontroller family, the ZBasic compiler can produce code for generic
microcontrollers including more than 100 of the Atmel AVR line comprising members of the ATtiny,
ATmega, ATxmega lines as well as some Atmel CAN and USB devices. See Appendix B for a complete
list of supported generic microcontrollers. Also, see Chapter 5 for information about creating applications
for generic target devices.
|