General instructions for usage

Important information

This programmer is only suitable for the devices mentioned in the device list. Other types of devices will be rejected by the software, although unsuitable devices may already be damaged by the initialization.

Devices must be correctly inserted according to the markings next to the test socket. Small devices must be placed as near as possible to the locking lever on the ZIF DIP40 test socket.

The programmer can only be used with machine that are 100% IBM PC compatible.

hed.chip and the manual are designed for users with a basic knowledge of electronics, and it is assumed that the user has experience in handling electrical equipment and electronic devices. All electronics safety precautions must be followed.

The user’s hard- and software is not known and no responsibility can be taken for damage to customers’ equipment and materials.

Introduction

hed.chip is a universal device programmer. The selection of programmable devices is oriented towards the needs of the developer, and is continuously being updated. The programming algorithms are contained in the PC software and can be updated for specification changes and new devices. hed.chip can be operated from the DOS command line, or by using a graphical windows user interface with a powerful device database.

By using simple, cheap adapters SMD devices in PLCC and SOIC packages can be used, and special adapters enable the programming of more devices.

This users guide consists of several parts. The programmer and its basic operation are described in this chapter. Chapter 2 describes the special properties of the various devices. A readme file gives information on the current version of the software. Since the graphical interface is self-explanatory, this guide concentrates on the usage of the DOS command line program HEDCHIP.EXE. This guide is also available as a Windows help file. Any required information can be viewed via a contents directory, an index or by searching for key words in the text.

Hardware and software requirements

Command line operation

IBM compatible PC, 80386 or higher recommended, DOS 5.0 or DOS-task in Windows 95/98 or Windows NT 4.0 (P166MMX required) , fully IBM compatible printer port.

Graphical user interface HC95

IBM compatible PC, Pentium P100 with 32 MB RAM, Windows 95/98 or Windows NT 4.0 (P166MMX required), fully IBM compatible printer port.

Connection and software installation

hed.chip is connected to a parallel (printer) port. The port must be recognized by the machine’s BIOS at boot-up stage. Ports LPT1 to 4 are supported. Modern, bi-directional ports need to be set to standard mode by jumper or BIOS setup. A 25 pin 1:1 data cable with male/female plugs is required.

A 12V / 800mA unregulated AC adapter that gives 12 to 15V output voltage at currents between 50mA and 500mA is required as the power supply.

hed.chip has a low-voltage coaxial connector with an internal diameter of 1.95 and 2.1 mm for connecting the AC adapter. Most AC adapters have this kind of connector in the form of a cross-shaped unit. See picture on the left.

The polarity of the power supply must be set correctly. hed.chip can not be damaged by using an incorrect setting, however it will only work if the correct polarity has been set. See picture on the left for the correct setting.

The voltage setting must be 12V.

A suitable AC adapter and data cable can be obtained from us.

The DOS software can simply be copied to a suitable directory on the hard disk.

The Windows software is installed by starting the setup program. For Windows NT, administrator’s rights are necessary.

International Power Supply

Usually, we deliver hed.chip with a power supply suitable for Germany, Switzerland, and Austria. This power supply has a wall socket connector compatible with these countries and it requires 220 to 240VAC, 50Hz.

For countries that have different requirements, we supply optionally an International Power Sup-ply. This power supply has wall socket connectors for the US, UK and Germany. It requires 100 to 240VAC, 50 or 60Hz.

Plug and Prog

hed.chip supports the user when setting up the power supply connection. Simply start the HEDCHIP.EXE program without any parameters. HEDCHIP.EXE can detect which port the programmer is connected to, and can also detect whether the power supply is correctly connected.

hedchip<CR> ; ß user input

hed.chip - universal device programmer, Version 2.57

Test LPT1 - hed.chip found – not ready

Connect the power supply now.

Set the polarity switch of the power supply.

Set the voltage selector to 12V.

The program will continue automatically if the power supply is connected.

Cancel: press Escape

The power supply can now be connected. The Software keeps testing whether the power supply is connected. The following message will appear once all the connections and adjustments are correct:

Test LPT1 - hed.chip found - ready

Repeat test (Y/N)

When using Windows NT, hed.chip is mostly found on LPT2, even if the machine only has one LPT port. This is normal and there is no reason for concern.

Operation

The DOS program HEDCHIP.EXE does the actual programming. It converts the input from the user and the source data file into commands for the programmer. Nevertheless, nobody is forced to concern themselves with the fine details of the DOS command line.

hed.chip can be operated in three different ways:

  1. Using the Windows program HC95. A graphical user interface with a database allows you to select devices, files, and parameters. HC95 builds up a DOS command line from the user’s input. This command line can then be executed automatically. Messages and help files are available both in German and English and the appropriate language is displayed according to the computer setting.
  2. The DOS command line created by HC95 can also be saved in a batch file. Batch files can be executed on the same machine or on another machine. The HC95 program settings can be read back by loading a batch file produced by HC95. This is used to repeat device programming precisely.
  3. Using HEDCHIP.EXE at the DOS or Windows 95/98/NT command prompt.

Windows: HC95

screenshot HC95 main window

The HC95 main window

The picture above shows the HC95 graphical user interface. The controls are grouped together in a logical sequence.

  1. Device selection: a click on the ‘select’-button will open the device selection window. More information below. Advanced users who are familiar with the command line can input the device mnemonic into the edit field, although this disables any input validation checks by HC95.
  2. Function selection: here you can select whether the device is to be programmed, verified, read, erased, or blank checked.
  3. Source or target file selection: here you can select a source file for programming or verification, as well as a target file for saving the contents of a device.
  4. Programmer options:
  1. Erase before programming: HEDCHIP.EXE always carries out a blank check before programming. If this option is activated, a non-blank device is automatically erased.
  2. Verify after programming: this option makes the programmer carry out verification automatically after programming (comparison with the source file).
  3. Use LPT1, use LPT2: checking one of these options disables the automatic detection of the programmer on one of the printer ports (Plug and Prog). This can be useful to avoid conflicts with other hardware and software.
  1. Device options: some devices have additional features such as write or read protection. The available options can be selected from the listbox.

Device selection:

HC95 has a database with all programmable devices and their properties. The device to be programmed must be selected from the list in the middle of the window. The properties of the selected device are displayed in the boxes under the list. The list is very long and it would be rather tedious to scroll from A (as in AMD) to X (as in Xicor). Therefore, the list can be reduced by entering selection criteria in one or more of the four fields above the list. Manufacturer, device name and type can be used as a criteria. Any combination, including the unrestricted use of wild cards ‘?’ and ‘*’, is possible. For example: "*28F*" in the device field leads to the display of all FLASH devices whose name includes the letters "28F". The ‘?’ replaces exactly one character and the ‘*’ replaces any number of characters in the string.

Favorites: frequently used devices

As an alternative to searching through the database, frequently used devices can be marked as favorites.

 

The button can be used to add a device to the list of favorites or remove it. The button offers the appropriate choice depending on whether the device is already a favorite.
  Checking the option ‘favorites only’ will display a personal selection of devices.
   

Programming with HC95

After making all the necessary selections, HC95 displays the created command line in the box ‘DOS command lines(s)’. For devices that require special handling there may be more than one line.

The command line can be executed by pressing the ‘Execute’-button. This opens a DOS window in which the command is executed. The window closes automatically and a message regarding the success or failure of the operation is displayed.

The command line can be saved as a batch file by pressing ‘save batch’.

Windows: working with HC95 batch files

The created batch file can, for example, be used on another machine. This makes sense if the other machine does not have Windows. The HC95 program settings can be read back by loading a batch file produced by HC95. This is used to repeat device programming precisely.

Windows: HC95 default settings

Default settings help to make the work easier. If you have hed.chip connected to LPT2, you might want to automatically load this parallel port setting as a default setting when you start HC95.

When starting HC95, the name of a batch file produced by HC95 can be supplied. If no file name is given, the settings stored in DEFAULT.BAT are loaded.

Save default settings

If you want the current settings to be restored when next starting HC95, use the ‘save batch’ function to save the settings under the name DEFAULT.BAT in the HC95 directory.

Removing unsuitable or incorrect default settings

Delete the DEFAULT.BAT file in the HC95 directory. The next time HC95 is started a new DEFAULT.BAT file will be automatically created.

Using different settings

If you have to carry out certain programming tasks repeatedly, you can store the necessary settings in several files. You can create links to HC95 and supply the name of such a batch file on the desktop or in the start menu.

You should: set up a link to HC95.EXE on the desktop. Then edit the link properties. Insert a space behind "<path>\HC95.EXE" and then the name of your batch file.

DOS: HEDCHIP.EXE

If you are working with DOS, or want to integrate the programmer into your development system, you can work directly with HEDCHIP.EXE. The DOS return codes needed for including HEDCHIP.EXE in your own development system are listed in Chapter 3.

The operation of HEDCHIP.EXE is carried out by using parameters in the command line. No further user interaction is necessary. All parameters start with a forward slash ‘/’ (=Shift-7). Only the file name of the source file is entered without the forward slash as the final parameter in the command line. All other parameters can be entered in whatever order you prefer. HEDCHIP.EXE interprets the first parameter without a forward slash ‘/’ as a file name, and stops processing of the command line.

The command line must always contain the following elements:

Device mnemonic /gMNEMONIC; eg. /ga16v8, /gi87c5x, etc.
Command parameter /? Display command overview
  /b Display device list
  /e Erase device
  /l Blank check
  /p Program device
  /r Save device content in file
  /v Compare device with file

For the command parameters /p (program), /r (read), and /v (verify), a file name of the source or target file is required.

HEDCHIP.EXE processes JEDEC files, files in Intel HEX format, and binary files as source files. Suitable JEDEC files can be created using CUPL, GAL Development System GDS3.5 or easyABEL. Check sums contained in these files are not evaluated. The complete file name, including the extension eg .JED, .HEX, or .BIN, must supplied. Files with the extension .JED or .HEX are automatically converted to binary data format. All the other extensions are interpreted as binary data and directly programmed into the device without being converted.

In addition to the command parameter /p (program), the following optional parameters can be supplied:

  /e Erase device if not blank
  /sn Program security bits. For ‘n’, the number of the bit to be programmed must be inserted, eg: /s1, /s2, /s3
  /v Verify programming or erasure
  /d Direct mode (suppresses keyboard queries)

HEDCHIP.EXE automatically finds the port that the programmer is connected to. Automatic detection can be disabled by using one of the following parameters:

/lpt1 hed.chip on LPT1

/lpt2 hed.chip on LPT2

With the command parameter /r the device content is saved in a target file. Simple PLDs, 16V8, 20V8, 18V10, 22V10 and 20RA10 are saved in JEDEC files. A file name with the extension .JED must be supplied so that this file can be programmed into another device. Data from all other devices, complex PLD, microcontrollers, and memory devices is saved in binary files. In this case, a file name with the extensions .JED or .HEX must not be given.

Existing files are overwritten without warning.

If the source file is too large for the device used, there is no error message. hed.chip always uses the minimum of device memory and file size for the program and verify operations.

The direct mode is activated by using the /d parameter. This parameter is intended for use in batch files. It suppresses any user interaction. The software bypasses any ‘press any key’ situation and any ‘yes/no/cancel’ queries are automatically answered with ‘no’. When setting up batch files, you should first test the batch without the /d parameter. If all possibilities have been tested (with and without inserted device, blank and programmed device), you can eliminate annoying keyboard queries by using /d parameter.

Information regarding Windows NT4.0

As with Windows 95, programming can be done using the Windows graphical user interface or the command line. HEDCHIP.EXE automatically recognizes the operating system. For functions which require direct hardware access, drivers are automatically loaded and unloaded.

These drivers have been specially designed for Windows NT. hed.chip is completely compatible with the Windows NT operating system. Details about where to find files and what registry keys are written during installation can be found in the Windows help for HC95.

Selecting the parallel port

When using Windows NT, you should not supply the port number for the programmer. You will find that on most machines the software locates the programmer on LPT2, even if your machine has only one LPT port. The Windows NT virtual DOS environment always has support for three or four LPT ports.

Programming of read and/or write protection

Read protection provides protection against non-authorized copies of the software for microcontrollers and PLD devices. With MCS51 microcontrollers, this multi-level protection is called ‘lock bits’; PLD devices have a ‘security fuse’ for this purpose.

Many electrically erasable memory devices (FLASH, EEPROM) have a write protection, thus preventing a crashed processor accidentally altering the content of the memory device. Depending on the type, parts of the device or the complete device can be protected. Some forms of the write protection are irreversible, whereas others can be deactivated.

The protection features of the various devices differ widely. Explanations are available with descriptions of the respective devices.

The /s parameter is used for programming write-protection and read-protection. The parameter is given optionally for programming, and, in doing so, the desired protection level is given as a number. Some examples:

hedchip /gl22v10 /p /v /e /s1 myapp.jed ; Lattice GAL22V10 erase, program, verify and read protect.

hedchip /ga89c5x /p /v /e /s7 myapp.hex ; Atmel controller erase, program, verify, and program all 3 lock bits.

Of course, read-protected devices can neither be read nor copied by hed.chip. Depending on the device, the following occurs:

  • the device is recognized and also the activated protection is detected. hed.chip outputs the corresponding messages.
  • the device is recognized and appears to be blank. Before programming, such devices must be erased by using HEDCHIP.EXE only with the /e command parameter.
  • the device cannot be identified. With such devices, HEDCHIP.EXE asks the user if he wants to continue anyway. Until now, this has only applied to Atmel AT89C5x series controllers.

Some memory devices have several write-protection features. Some protection features can only be activated in sequence, whereas others are available independently. You can find out what protection features are available and how they are activated by reading the description of the respective device.

Write-protected memory devices can be read and copied by hed.chip. To reprogram a write-protected device, it must be erased beforehand. This applies even if only a part of the device is protected.

The /s parameter is also used to program other special features of certain devices. It is used to set the ‘polarity option’ with Atmel series AT17C FPGA configuration memories.

Insertion of devices

The device to be programmed can be inserted at any time. Please refer to the picture on the right for orientation and positioning of the device.


Pin 1

Photo:

Test socket of programmer with
Atmel AT89C1051-24PC
inserted.

Locking lever

Adapters

Adapters are necessary for devices in SMD packages, eg. PLCC or SOIC. Adapters for microcontrollers in PLCC44 packages or memory devices in PLCC32 packages are available on the market. Adapters that connect the signals from the DIP40 test socket to the corresponding pins in the PLCC package should be selected. In the case of parallel memory devices (EPROM, EEPROM, FLASH) the software was designed so that all these devices can be programmed using a DIP32 to PLCC32 adapter. The device mnemonic appropriate for both the device and its package must be used. If desired, you can also build such general adapters yourself. These adapters are named according to the device package. A combination with two test sockets is available for the two most widely used PLCC types: memory devices in PLCC32 and MCS51 microcontrollers in PLCC44. As the same circuit board is used in each case, you can also add the second test socket yourself.

You cannot build adapters which adapt the programmer to special requirements of certain devices yourself. The names of these adapters are taken from the package and the devices they are used for. An Atmel ATV750 in the DIP24 package is programmed using the DIP750 adapter, and the PLCC750 adapter is used for the corresponding PLCC package.

Insertion of the adapter into the programmer

Most adapters have markings which show how the adapter should be inserted into the test socket of the programmer. The DIPMEM adapter does not have such a marking. The following rules apply for this adapter and other adapters with DIP test sockets. The locking levers of the adapter test socket and the programmer test socket must point in the same direction.

Homemade adapters

Adapters for the PLCC packages of devices, for which there are also corresponding DIP packages, can be homemade. A function guarantee for these adapters, or those purchased from other sources, is not available.

Device identification and selection of the correct device mnemonic

Definition of mnemonic: System designed to aid memory. Within the hed.chip software, devices are identified by numbers. The device mnemonics are identifiers which stand for specific devices.

hed.chip attempts to identify the device in the test socket of the programmer. It will reject any device that does not correspond to the device mnemonic given in the command line. This serves to protect the valuable devices. Protection is not absolute, as the supply voltage, and, in some cases, also the programming voltage must be applied for the identification check. It is therefore very important to use the correct mnemonic. If a device cannot be identified or programmed, this could be due to an activated protection feature of the device, despite use of the correct mnemonic. Most protected devices are either no longer identifiable or appear to be blank. Details concerning specific devices can be found in chapter 2.

hed.chip displays a list of available mnemonics if the program is just used with the /b parameter. eg:

hedchip /b ; displays list of mnemonics

Device details

Programmable logic - about PLDs and GALs

The term PLD (= Programmable Logic Device) can be applied to a wide range of devices. It applies to devices ranging from simple TTL-PROMs up to gate arrays, into which complete processors can be programmed.

The term GAL is a protected copyright of the Lattice company. These are simple PLDs, sometimes also called SPLD. Devices with more functionality are called complex PLDs, or CPLD.

hed.chip programs a selection of popular and versatile devices. Here is a list of programmable devices that were available when this manual was printed:

ATF16V8 ATF20V8 ATF22V10  
GAL16V8 GAL20V8 GAL18V10 GAL22V10
GAL6001 GAL6001B GAL6002B GAL20RA10
PALCE16V8 PALCE20V8 PALCE22V10  

The complex PLDs from Atmel (ATV750, ATV2500, ATF1500) make particular demands on the programmer hardware. Adapters DIP750, PLCC750, DIP2500, PLCC2500, PLCC1500 respectively are used for these devices.

To develop an application for a PLD, a JEDEC file must be created. The PLD development system, eg CUPL, Gal Development System GDS 3.5 or easyABLE Version 4.3, converts the logic equations into such a JEDEC file. It can also simulate the expected behaviour of the PLD.

Check sums and test vectors in the JEDEC file are ignored. You can edit the JEDEC file with a normal text editor, if desired.

If the logic equations are contained in a file named MYAPP.PLD, CUPL creates file MYAPP.JED out of this. This can then be programmed into the device using hed.chip. In the case of an application for ATF22V10, the following command line must be used.

hedchip /ga22v10 /p myapp.jed

By using the additional /v parameter, the programmer will verify the programming operation. By using /e, the device is erased if the blank check fails.

hedchip /ga22v10 /p /v /e myapp.jed

Security fuse

If the device is to be protected against reading and copying, the security fuse can be programmed. With the CUPL development system, the instruction to do that can be given when the JEDEC file is created.

CUPL then inserts an instruction *G1 into the JEDEC file, causing hed.chip to program the security fuse of the device. If this is not desired, you can either remove this instruction from the JEDEC file, or use the additional /s0 in the command line. The /s1 parameter in the command line programs the security fuse, even if the JEDEC file contains the instruction *G0.

Command line parameters take precedence over instructions in the JEDEC file, whether or not the security fuse is to be programmed.

With some PLDs, hed.chip can test the security fuse, and will produce an error message if an attempt is made to read a protected device.

Other protected PLDs appear to be blank. Such devices can also not be erased by using /e additionally when programming. In this case, the device must be erased in a separate operation:

hedchip /gl22v10 /e ; example for GAL22V10

Copy devices

With hed.chip, PLDs can also be read and copied. For simple PLDs (16V8, 20V8, 18V10, 22V10, and 20RA10), hed.chip creates a JEDEC file similar to the one created by CUPL. When reading these devices, a file name must be used with the .JED extension. Complex PLDs (GAL6001/2, Atmel ATV-Serie, ATF1500) are read using a binary data format. For these devices, a .JED extension must not be used in the file name. hed.chip can program these binary files in other devices of the same type. eg:

hedchip /gatv750 /r myapp.bin ;Atmel ATV750 into file MAYAPP.BIN

hedchip /gatv750 /p/v myapp.bin ; program other device of the same type

ATF16V8, ATF20V8, ATF22V10, ATF1500

Atmel specifies that these PLD devices with FLASH memory technology have to be conditioned prior to initial programming (ATF1500: prior to every programming). This means that the whole device is completely programmed twice with 0, and erased again afterwards. Verifying errors can be ignored during conditioning. A JEDEC file suitable for conditioning is part of the software supplied with hed.chip. Example for ATF20V8:

hedchip /ga20v8 /p/e conditio.jed ; program once

hedchip /ga20v8 /p/e conditio.jed ; program twice

hedchip /ga20v8 /e/v ; erase, blank check

The command for conditioning can be included in a batch file, which is recommended anyway.

ATF1500

For currently available samples, Atmel specifies that neither the user ID nor the security fuse may be programmed. Therefore, this part of the software could not yet be tested. The PLCC1500 adapter is required.

ATV750(B) and ATV2500(B):

Special adapters, DIP750, DIP2500, PLCC750, PLCC2500 respectively, are required for the devices ATV750(B) and ATV2500(B). There are two jumpers on these adapters. For programming ATV750 and ATV2500, both jumpers must be set and removed for programming ATV750B and ATV2500B.

The DIP750 adapter is also used for AT22V10/L and AT22V10B/L devices. This is an older version of the type 22V10 based on EPROM memory technology.

AMD PALCE-series

hed.chip supports PALCE16V8H/Q and PALCE20V8H/Q. PALCE22V10H/Q in revisions 4 and 5 is supported. These appear in catalogues as PALCE22V10H-25PC4. You have to erase all PALCE devices before programming, even if they are new or blank.

AMD PALCE16V8 and PALCE20V8 are mostly compatible with the corresponding devices from Atmel and Lattice. There is a small difference in the way the register outputs are fed back into the AND-matrix. In most cases, source files created for GAL16V8 and GAL20V8 can be programmed into a PALCE device without making any changes.

To avoid any incompatibilities, the correct target device (GAL16V8, GAL20V8, or PALCE16V8, PALCE20V8) should be used when creating the JEDEC source file. The differences between these devices were described in the 1/94 German issue of Elektor magazine on page 52.

PALCE22V10 can be substituted for GAL22V10 without restriction, and the same JEDEC files can be used in development and programming.

MCS51 microcontroller

hed.chip can program almost all CMOS MCS51 versions from Atmel, Dallas, Intel, Philips, Siemens, SST, and Temic. Adapters are available for controllers in the PLCC44 and SOIC20 packages.

The correct device mnemonic must be used in the command line. hed.chip validates the manufacturer and device ID of the controller, and then automatically selects the correct programming algorithm.

If an application, eg for a Philips 87C52, is to be developed, an Intel Hex file or a binary file must be created using a cross assembler or cross compiler respectively. hed.chip can then program this into the controller.

hedchip /gp87c5x /p/v myapp.hex

In the above example, it is necessary to use the /gp87c5x mnemonic, and not /gi87c5x for Intel controllers. If the manufacturer ID does not match the mnemonic, hed.chip will reject the device. The same applies if the device ID is not known to hed.chip. We will create software updates for new devices as quickly as possible.

Please note: there is no error message or warning if the source file is too large for the controller’s memory.

Lock bits

MCS51 controllers have two or more so-called lock bits for protection:

Parameter Lock bits Function
S1 1 Protects against further programming
S3 1 + 2 Protects against reading of the program memory. As it is still possible to run programs in external memory, the protection is not 100% secure. S1 is contained in S3.
S7 1 + 2 + 3 Prevents programs being run from external memory. With lock bit 3 set, the state of the EA# pin is without significance. S1 and S3 are contained in S7. Not all devices have this lock bit.

When S2 or higher protection is used, the programmer will no longer recognize the device because the manufacturer ID can no longer be read, or the device will appear blank. An attempt to program such a device which seems to be blank leads to an error message ‘device not programmable’.

If a device is not accepted by hed.chip, or cannot be programmed, it should be erased. For the lock bits, the /s1, /s3, or /s7 parameters must be used in addition to /p in the command line. The higher lock bits automatically include the lesser lock bits; /s7 therefore programs all lock bits for all types of MCS51 controllers.

hedchip /gp87c5x /p /v /s7 myapp.hex

Some MCS51 devices have an encryption array. Programming of this protection measure is not supported by hed.chip, since, as far as we know, there is no meaningful application for this.

Atmel AT89C** series controllers

can be erased electrically using hed.chip. Also the smaller versions in the DIP20 package can be directly inserted into the test socket of hed.chip. These devices can be erased and reprogrammed in one operation:

hedchip /ga89c5x /p /v /e myapp.hex ; for AT89C51/2, LV51/2

hedchip /ga89cx051 /p /v /e myapp.hex ; for AT89C1051/2051

If any lock bits are set, the erase operation must be done separately.

The /ga89c5x-5 mnemonic is used for AT89C5x version with 5V programming voltage. AT89LV** may be programmed using the same settings.

Atmel AT89S** series controllers

can be erased and programmed using hed.chip. hed.chip can also activate the SPI security fuse and program the EEPROM data memory of the AT89S8252. Two separate mnemonics are used to program the FLASH program memory and the EEPROM data memory. The protection can only be used in connection with the /gs89sxxxx mnemonic. The erase operation always affects both memories(FLASH program memory, EEPROM data memory), and deactivates the protection features.

hedchip /ga89sxxxx /p/v/e/s7 myapp.hex ; erase, program, verify, write-/read-protect AT89S8252 or AT89S53 FLASH

hedchip /ga89sxxxx /p/v/e/s15 myapp.hex ; ditto, program SPI security fuse

hedchip /ga89sxxxx /p/v/e/s7/s8 myapp.hex ; ditto, /s7/s8 corresponds to /s15

hedchip /ga89seeprom /p/v myapp.hex ; program, verify AT89S8252 EEPROM

If program memory and data memory are to be programmed and protected, the following sequence has to be used: erase device, program EEPROM data memory, program and protect FALSH program memory. This also protects the data memory.

AT89LS** can be programmed using the same settings.

Philips 87C7** series controllers

The DIP752 adapter is required for the 87C749 and 87C752 Philips controller. Please note that the 87C748, ‘749, ‘751, and ‘752 controllers are programmed using /gp87c7xx mnemonic, however the 87C750 is programmed using the /gp87c750 mnemonic. Controllers made by Signetics are handled like Philips devices.

Dallas High Speed Controller DS87C520/530

The DS87C520 and ‘530 devices have a watchdog timer. This watchdog timer can generate a RESET. The watchdog timer runs continuously, but a RESET is generated only if the corresponding function is enabled. The device must be programmed using the /gd87c5x0-w mnemonic if the RESET by watchdog timer function is to be enabled automatically after a RESET.

Siemens SAB-C513A

hed.chip also supports the Siemens SAB-C513A-H device. This Siemens device is only intended for development. It has no lock bits. When using devices with the "ES-BA" marking, the Siemens Errata Sheet, Release 1.2 from 20th Sept. 1995 has to observed.

SST89F5*

The MCS51 microcontrollers made by SST have a unique feature. They have two separate blocks of FLASH program memory. Block 0 is the primary memory, and has 16 kbytes (SST89F54) or 32 kbytes (SST89F58). Block 1 has 4 kbytes and is located at address 0xF000. The unique feature is that the microcontroller can write to its own FLASH program memory. This is referred to as ‘In-Application Programming’ in the data sheet.

The /gsst89f5x_0 device mnemonic is used for programming block 0.

The /gsst89f5x_1 device mnemonic is used for programming block 1. When programming source files in Intel Hex format, care must be taken that the source file does not contain an offset. To do that, use the assembler instruction ‘.phase 0xf000’ instead of ‘.org 0xf000’.

The erase operation always erases both memory blocks.

These microcontrollers have no lock bits. Instead, the read-protection and write-protection is determined by the content of the byte at address 0xFFF of memory block 1. This byte is called ‘Security Byte’. Write-protection is advisable to protect against unintentional memory changes.

Parameter Sec. Byte Function
/S0 0xFF No protection
/S85 0x55 Both FLASH memory blocks are protected (hard lock)
/S245 0xF5 Only block 1 is protected (hard lock)
/S5 0x05 Both memory blocks are protected, but can be programmed using In-Application Programming (soft lock).

Protection can either be activated through the content of the source file for block 1, or through parameters in the command line. Parameters in the command line take precedence over values for the security byte in the source file. If both memory blocks are to be programmed, protection can only be activated when programming the second memory block.

Temic TSC87C51

This microcontroller has no lock bits. As hed.chip cannot program the encryption array, there is no protection against reading the controller memory. The encryption array does not offer effective protection anyway.

 

Atmel AVR-RISC microcontroller

This new microcontroller family is based on an upgraded version of the MCS51 family periphery, and a newly developed processor core. The processor was optimized to support the programming language ‘C’, but also offers a user-friendly assembly language.

The AVR-RISC controllers have FLASH program memory and EEPROM data memory. They can be programmed using parallel access with a programmer or using serial access IN-CIRCUIT. Both memory types and the device options can be programmed using hed.chip. The erase operation is common to both memory types. This means that erasing the FLASH program memory also automatically erases the EEPROM data memory, and vice versa.

The FLASH program memory must be blank prior to programming. The EEPROM data memory can be reprogrammed without previous erasure.

For programming the FLASH program memory, /gavr20 and /gavr40 mnemonics are used for the devices in DIP20 and DIP40 packages respectively. For programming the EEPROM data memory, /gavr20e and /gavr40e mnemonics are used for devices in the DIP20 and DIP40 packages respectively.

Lock bits and fuses

Using lock bits, the FLASH program memory can be protected against alteration and reading. Further options can be set using two fuses. These can only be programmed, using a device programmer and not in circuit using serial access via SPI. The /s parameter can be used to activate these options following programming of the FLASH program memory.

Parameter Lock bits Function
S1 1 Protects FLASH program memory against further programming
S3 1 + 2 Protects FLASH program memory against reading. S3 includes S1.
S4 RCEN AT90S1200/2313: activates using the internal oscillator of the watchdog timer as clock source for the processor. Without an external crystal, the controller works at a clock frequency of approximately 1 MHz.
S4 SPI disable AT90S4414/8515: disables serial in-circuit programming.
S8 SPI disable AT90S1200/2313: disables serial in-circuit programming
S8

FSTRT AT90S4414/8515: selects the short RESET-delay time after a power-on. This is intended for fast-starting clock sources.

These options can be used in any desired combination. You can either add up the values yourselves or use several /s parameters in the command line.

hedchip /gavr20 /p/v/e /s15 yourapp.bin ; program lock bit, SPI disable and RCEN

hedchip /gavr20 /p/v/e /s3/s4/s8 yourapp.bin ; does the same as using /s15

If the FLASH program memory is read, hed.chip saves the state of the fuses (SPI disable, RCEN, ...) as the last byte in the target file. When programming a device with such a file, the fuses are also programmed accordingly.

Atmel AVR Assembler 1.30

This assembler for the AT90S series can be obtained free of charge from Atmel’s web site. Source files intended for programming should be generated using the following settings:

The "Intel Intellec 8/MDS" format corresponds to the standard Intel Hex format. If an ".eseg" sector is created, the assembler outputs data intended for the EEPROM data memory of the controller. This file is automatically assigned a name with the file extension ".EEP", with no possibility of assigning a different file name.

The data format corresponds to the format for the program. Using the settings on the left, the assembler produces a source file for the EEPROM that is in Intel Hex format, but does not have the file extension ".HEX".

This file has to be renamed, so that it can be correctly converted during programming. eg:

You assemble the file yourapp.asm. The following are created from this:

yourapp.hex ; source file for FLASH program memory

yourapp.eep ; source file for EEPROM data memory needs to be renamed for programming.

The FLASH program memory is programmed using YOURAPP.HEX. The file YOURAPP.EPP is renamed as EEPROM.HEX. It is necessary to change the name so that the file is recognized as an Intel Hex file. Then the file is programmed into the EEPROM data memory of the controller. The option ‘erase before programming’ should not be activated. Note: the erase operation always erases both memories (FLASH and EEPROM) in the controller.

 

Microchip PIC microcontrollers

With the help of the UNIPIC adapter, hed.chip also supports a large number of PIC microcontrollers. hed.chip meets all requirements specified by Microchip for a ‘production quality programmer’. The adapter has suitable test sockets for devices in the DIP18, DIP28, and DIP40 packages. A precision socket is used for devices in the DIP8 package. The adapter is available in two versions:

  1. UNIPIC18: equipped with a DIP18 test socket and a DIP8 precision socket. You can add the test DIP28 and DIP40 sockets yourselves if necessary.
  2. UNIPIC: fully equipped with the DIP18, DIP28, and DIP40 test sockets and a DIP8 precision socket.

PIC microcontrollers have either EPROM or FLASH program memory. Depending on the device type, a word consists of 12, 14, or 16 bits. In addition to the standard program memory, these devices have a configuration word and 16 bits memory for a user ID. The 16 bits of the user ID are contained in 4 memory words. When reading, the user ID and configuration word are also read. The target file is therefore always 10 bytes larger than the program memory of the device.

User ID

PIC microcontrollers have 16 bit user ID (Customer ID Code). This user ID is stored in a special address space in 4 locations. Each of them can be programmed with 4 bits of the user ID. hed.chip can take a user ID from the source file and program it into the intended location. In the source file, the user ID must be located after the program memory data. If the source file is at least 10 bytes larger than the program memory of the device, the last 10 bytes are programmed into the user ID and configuration word.

Example for PIC16C84: the device has 1024 words of program memory. This corresponds to a 2048 bytes source file. The following 4 words (= 8 bytes) are interpreted as user ID. The lower 4 bits of every word are programmed as user ID into the device. To avoid verification error messages, the upper 12 bits must be 0. A source file for PIC16C84 with user ID and configuration word has 2058 bytes.

Configuration Word

The configuration word is a memory location in a special address space used to configure the microcontroller. The bits of the configuration word set the clock generator to certain clock sources and influence the operation modes of the timers and the watchdog. Further bits are used to prevent the program memory being read. After erasing the device, all bits of the configuration word are set to 1. During programming device, options can be used to program one or more bits of the configuration word to 0. The following table gives an overview of the options and corresponding command line parameters that can be used for programming. When programming, the graphical user interface HC95 offers the available device options for the chosen device. You can select any combination of options.

Parameter Option Function
/S1
/S2
FOSC0
FOSC1
Oscillator Selection Bit. Options FOSC0 and FOSC1 can be used to select different modes for the clock generator of the microcontroller.

RC Oscillator: default, neither Option FOSC0 nor FOSC1 is programmed. Controller is used with combination of resistor/capacitor.

HS Oscillator: program FOSC0. Controller is used with high frequency crystal.

XT Oscillator: program FOSC1. Controller is used with medium frequency crystal.

LP Oscillator: program FOSC0 and FOSC1. Controller is used with low frequency crystal.

/S4 WDTE Watchdog Timer Enable. The watchdog timer is activated by default after a reset. Use option WDTE when programming to deactivate the watchdog timer.
/S8 PWRTE
PWRTE#
  • PWRTE: Power Up Timer Disable Bit. With some devices, the timer is activated by default after a reset, and can be deactivated using this option.
  • PWRTE#: Power Up Timer Enable Bit. With some devices, the timer is deactivated by default after a reset, and can be activated using this option.

HC95 offers the appropriate option for programming the respective device.

/S16 BODEN Brown Out Enable Bit. Devices with this option can detect slow decreases in the operating voltage.
/S16 FOSC2 PIC12C67x only: Oscillator Selection Bit. This option may only be used in combination with FOSC0 and/or FOSC1.
/S32 CP
CP0
Read-protection. Some devices have one option (CP) to read-protect the device. Other devices have two options for this; each of them protects half of the memory. CP0 protects the upper half.
/S64 CP1 Read-protection. Protects the lower half of the memory.
/S128 MCLRE PIC12C508/9 only: Master Clear pin Enable Bit. Programming this option disables the MCLR pin. It is internally connected to Vdd.

The configuration word can also be programmed from the source file. For that, the configuration word must be located directly behind the user ID in the source file. When reading these devices, the user ID and the configuration word are stored in the source file following the normal content of the device memory. Devices can be copied including the user ID and the configuration word. The exact layout for the bits of the configuration word depends on the specific device. There are differences, even if the devices have the same options.

Read-protection in UV-erasable PIC microcontrollers

Microchip recommends that microcontrollers in a windowed ceramic package should not be read-protected. This means that the /s32 and /s64 device options should not be used when programming these devices. In our experience, even high intensity UV light will not completely erase these devices when the read-protection has been enabled.

The read-protection can be activated by programming with a corresponding value for the configuration word in the source file. When doing this, an error message is generated stating that the device is not programmable. The read-protection can also be activated unintentionally when the device is programmed with a file not suitable for this type of device.

Overview of the supported PIC microcontrollers

The following table lists the supported microcontrollers and states the device mnemonics to be used for programming. Some device mnemonics are used for several devices that do not differ with regard to their physical programming: eg: PIC16C61 and PIC16C71 are both programmed using the /gpic16c61 mnemonic. All devices are contained in the database of HC95 and the correct mnemonic will be automatically used for programming. The UNIPIC adapter has the appropriate socket for every microcontroller. Devices must be inserted into the socket that fits them exactly: eg: a PIC16C84 in DIP18 may only be inserted into the DIP18 test socket. PIC microcontrollers can not be identified by the programmer. It is very important to select the correct device. This applies especially to devices with or without ‘A’ as the last letter in the device name: eg: PIC16C62 and PIC16C62A are not identical.

Baustein

Bauform

Mnemonic

Programmierbare Optionen

PIC12C508/A

DIP8

/gpic12c508

FOSC0, FOSC1, WDTE, CP, MCLRE

PIC12C509/A

DIP8

/gpic12c509

FOSC0, FOSC1, WDTE, CP, MCLRE

PIC12C671

DIP8

/gpic12c671

FOSC0, FOSC1, FOSC2, WDTE, PWRTE, CP0, CP1, MCLRE

PIC12C672

DIP8

/gpic12c672

FOSC0, FOSC1, FOSC2, WDTE, PWRTE, CP0, CP1, MCLRE

PIC12CE518

DIP8

/gpic12c508

FOSC0, FOSC1, WDTE, CP, MCLRE

PIC12CE519

DIP8

/gpic12c509

FOSC0, FOSC1, WDTE, CP, MCLRE

PIC12CE673

DIP8

/gpic12c671

FOSC0, FOSC1, FOSC2, WDTE, PWRTE, CP0, CP1, MCLRE

PIC12CE674

DIP8

/gpic12c672

FOSC0, FOSC1, FOSC2, WDTE, PWRTE, CP0, CP1, MCLRE

PIC16C61

DIP18

/gpic16c61

FOSC0, FOSC1, WDTE, PWRTE, CP

PIC16C62

DIP28

/gpic16c62

FOSC0, FOSC1, WDTE, PWRTE, CP0, CP1

PIC16C620

DIP18

/gpic16c620

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C621

DIP18

/gpic16c621

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C622

DIP18

/gpic16c62a

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C62A

DIP28

/gpic16c62a

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C63

DIP28

/gpic16c63

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C64

DIP40

/gpic16c62

FOSC0, FOSC1, WDTE, PWRTE, CP0, CP1

PIC16C64A

DIP40

/gpic16c62a

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C65

DIP40

/gpic16c65

FOSC0, FOSC1, WDTE, PWRTE, CP0, CP1

PIC16C65A

DIP40

/gpic16c63

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C66

DIP28

/gpic16c66

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C67

DIP40

/gpic16c66

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP0, CP1

PIC16C71

DIP18

/gpic16c61

FOSC0, FOSC1, WDTE, PWRTE, CP

PIC16C710

DIP18

/gpic16c710

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP

PIC16C711

DIP18

/gpic16c711

FOSC0, FOSC1, WDTE, PWRTE#, BODEN, CP