132 of 172
ZBasic Language Reference 125 ZX Microcontroller Family 24-pin ZX Device Connections for Emergency Update Mode The emergency update procedure for a ZX-40, ZX-40a, ZX-44, ZX-44a or ZX-1281 is similar to that described above. To prepare for the emergency firmware update, consult the table below for the specific device and ground the indicated pin or pins. Device Pins to Ground ZX-40, ZX-40a, ZX-40p 5, 7 (B.4, B.6) ZX-44, ZX-44a, ZX-44p 2, 44 (B.4, B.6) ZX-1281 25 (D.0) ZX-1280 43 (D.0) When the ZX powers up and detects that these pins are grounded, it will enter the emergency update mode and await an emergency firmware download on the serial port. After the firmware update is downloaded using the zload command with the –e option the device should be powered off and the grounding jumpers should be removed. When it is powered up again it will begin running the newly installed control program normally. 8.2 Device Configuration The device configuration option, -z, can be used to set configuration parameters of the device. Currently, the only parameter that can be configured is the external EEPROM type. This only useful for devices where you can choose which EEPROM to use, e.g. the ZX-40 or ZX-44. -z0:<EEPROM type> The <EEPROM type> element is a 16-bit composite value that specifies characteristics of the attached EEPROM. The least significant byte specifies the “page size” of the EEPROM in terms of 16-byte blocks. For example, a page size of 64 bytes would be specified using the value 4 while a page size of 128 bytes would be specified using the value 8. The least significant bit of the most significant byte specifies whether the EEPROM requires full-page writes. If the EEPROM supports writing less than a full page, this bit should be off. The <EEPROM type> element can be specified as either a decimal value or as a hexadecimal value. In the latter case, a prefix of 0x or 0X must be present to indicate that hexadecimal form is being used. The example configuration specifications below all use the hexadecimal form. Note that the values specified in the examples are shown with 4 hexadecimal digits for clarity but leading zero digits may be omitted. -z0:0x0004 This specifies an EEPROM with a 64-byte page that supports partial page writes. This is the configuration to use for the Atmel AT25256A. This is the default configuration, ZX devices come pre- configured for this EEPROM.