Auto Programming the 87C196MC

Jennie Abella
Applications Engineer
Intel Corporation


The Auto Programming mode is a low-cost programming alternative. Using this mode, the contents of an external EPROM are copied to the internal OTPROM of the 87C196MC. This article explains how to construct an inexpensive programmer for the 87C196MC. A programmer for the 27128 is still necessary, but these are readily available.

Auto Programming Algorithm

The 87C196MC enters a programming mode when Vpp (typically 12.5V) is applied to EA# during the rising edge of RESET#. The combination of this rising edge of EA# and the value on the PMODE pins causes the 87C196MC to enter a particular programming mode. Then the following sequence is initiated:

Auto Programming Circuit

Figure 1 is the recommended circuit for auto programming the 87C196MC. Since BUSWIDTH is low, an 8-bit external bus is used. Code to be programmed in the 87C196MC at 2000H must be located in the external EPROM starting at location 4000H. The memory remapping is shown in Table 1. The PPW must be located in the external EPROM at location 4014H and 4015H. (See "Calculating the Programming Pulse Width" in this article.)

Table 1. Auto Programming Memory Map
External EPROM Address Internal OTPROM Address Description
4014H N/A PPW Least-Significant Bit
4015H N/A PPW Most-Significant Bit
4000H-7FFFH 2000H-5FFFH Reserved locations for code and data.
4020H-402FH 2020H-202FH Security key, during verification.

P0.4-P0.7 are hardwired to Vss and Vcc and determine the programming mode. The status outputs PACT# and PVER are buffered by a 74HC14 and drive LEDs to indicate Programming ACTive (PACT#) and Programming VERification (PVER). All unused inputs are connected to ground (Vss) and unused outputs are left floating. READY, NMI, and BUSWIDTH are active and should be connected as indicated.

Auto programming is specified for a crystal frequency of 6 to 10 MHz. A 27(C)128 EPROM with tACC = 250 ns and tOE = 100 ns or faster specifications should be used.

Power-Up and Power-Down Sequencing

Important: To avoid damaging the 87C196MC during auto programming, follow these rules:

Power-Up Sequence

Power-Down Sequence

Calculating the Programming Pulse Width

The programming pulse width needs to be 250 ms for the device to program correctly. Use the following formula to calculate the PPW_VALUE. Round the PPW_VALUE to the next higher integer value and load this value in the PPW location in the external EPROM.

Where PPW_VALUE is a 16-bit word, Fosc is the operating frequency in MHz, and PPW is the programming pulse width.

For example, with an oscillator of 6MHz,

For this example, location 4014H/4015H = 177H.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 00000101110111

Figure 1. PPW (4014H/4015H) example

Legal Stuff © 1997 Intel Corporation

Free Web Hosting