131 of 158
125 Appendix B - ZX-24 Series Hardware Reference The heart of the ZX-24 is the Atmel AVR ATmega32 microcontroller while the ZX-24a is based on the ATmega644 microcontroller. The ZX-24p and ZX-24n devices are based on the ATmega644P microcontroller. In all cases, the microcontroller chip is accompanied by some support circuitry on a 24- pin module that is simple to connect for operation. The primary difference between the ZX-24 and the ZX-24a is the amount of RAM available for use by your programs. For the ZX-24 the User RAM comprises 1536 bytes (1.5K bytes) while it is 3.5K bytes for the ZX-24a and ZX-24p. The remainder of the microcontroller’s RAM is used by the ZX control program on the VM devices. For the ZX-24n native mode device, the entire 2K of RAM is available for use by your programs. The ZX-24 also provides 992 bytes of internal EEPROM (electrically erasable programmable read-only memory), referred to as Persistent Memory. The ZX-24a and ZX-24p provide 2016 bytes of Persistent Memory available to your program. Data written to Persistent Memory is retained when the ZX is powered down or reset. The 24-pin ZX models provide additional Flash memory external to the microcontroller chip in which, except for the ZX-24n, your program code is stored. The ZX-24n has the external Flash memory but it is not used because your program’s code is stored in internal Flash memory. For all 24-pin ZX models, the external Flash memory is 32K bytes in size. The ZX-24 series devices have other resources available to your program including a high-speed serial port, analog-to-digital converters, timers and other sub-systems that may be accessed using routines in the ZBasic System Library. Alternately, some of the resources may be accessed directly using built-in registers. See Section 3.8.1 for more information on this topic. B.1 External Connections The ZX-24 series devices can be hooked up in several different ways depending on your requirements. The simplest method is depicted below. The connector on the left is the serial connection to your PC for downloading code and transmitting/receiving data on serial channel 1. The connection to pin 3 of the ZX-24 series is only needed for downloading. You may wish to add a jumper in that line so that it may be disconnected for “normal” operation. Some operating systems, notably Windows XP, toggle the DTR line (pin 4 of the DB-9) on the serial ports during boot up. This will cause the ZX to reset on every positive- going transition of the DTR line.