Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8XC196Kx,8XC196Jx,87C196CA microcontroller family user's manual.1995.pdf
Скачиваний:
70
Добавлен:
23.08.2013
Размер:
3.97 Mб
Скачать

CHAPTER 16 PROGRAMMING THE NONVOLATILE MEMORY

The 87C196Kx devices contain from 12 Kbytes to 48 Kbytes of one-time-programmable readonly memory (OTPROM). Table 16-1 lists the devices and OTPROM sizes. OTPROM is similar to EPROM, but it comes in an unwindowed package and cannot be erased. You can either program the OTPROM yourself or have the factory program it as a quick-turn ROM product (this option may not be available for all devices). This chapter provides procedures and guidelines to help you program the device. The information is organized as follows.

overview of programming methods (page 16-2)

OTPROM memory map (page 16-2)

security features (page 16-3)

programming pulse width (page 16-8)

modified quick-pulse algorithm (page 16-10)

programming mode pins (page 16-11)

entering programming modes (page 16-14)

slave programming (page 16-15)

auto programming (page 16-26)

serial port programming (page 16-32)

run-time programming (page 16-44)

NOTE

Some devices may also be available in windowed EPROM packages. In this manual, OTPROM refers to the device’s internal read-only me mory, whether it is EPROM or OTPROM, and EPROM refers specifically to EPROM devices.

Table 16-1. OTPROM Sizes for 87C196Kx, Jx, CA Devices

87C196JQ, KQ

87C196JR, KR

87C196KS

87C196CA, JT, KT

87C196JV

12 Kbytes

16 Kbytes

24 Kbytes

32 Kbytes

48 Kbytes

(2000–4FFFH)

(2000–5FFFH)

(2000–7FFFH)

(2000–9FFFH)

(2000–DFFFH)

The 8XC196JT, JV, and KS are offered in automotive temperature ranges only. The 8XC196CA, JQ, JR, KQ, KR, and KT are offered in both automotive and commercial temperature ranges.

16-1

8XC196Kx, Jx, CA USER’S MANUAL

16.1 PROGRAMMING METHODS

You can program the OTPROM by configuring a circuit that allows the device to enter a programming mode. In programming modes, the device executes an algorithm that resides in the internal test ROM.

Slave programming mode allows you to use an EPROM programmer as a master to program 8XC196 devices (the slaves). The code and data to be programmed into the nonvolatile memory typically resides on a diskette. The EPROM programmer transfers the code and data from the diskette to its memory, then manipulates the slave’s pins to define the addresses to be programmed and the contents to be written to those addresses. Using this mode, you can program and verify single or multiple words in the OTPROM. This is the only mode that allows you to read the signature word and programming voltages and to program the PCCBs and unerasable PROM (UPROM) bits. Programming vendors and Intel distributors typically use this mode to program a large number of microcontrollers with a customer’s code and data.

Auto programming mode enables the 8XC196 device to act as a master to program itself with code and data that reside in an external memory device. Using this mode, you can program the entire OTPROM array except the UPROM bits and PCCBs. After programming, you can use the ROM-dump mode to write the entire OTPROM array to an external memory device to verify its contents. Customers typically use this low-cost method to program a small number of microcontrollers after development and testing are complete.

Serial port programming mode enables you to download code and data (usually from a personal computer or workstation) to an 8XC196 device (the slave) through the serial I/O port. You can write data to the OTPROM asynchronously via the TXD (P2.0) pin and read the data via the RXD (P2.1) pin. Customers typically use this mode to download large sections of code to the microcontroller during software development and testing.

You can also program individual OTPROM locations without entering a programming mode. With this method, called run-time programming, your software controls the number and duration of programming pulses. Customers typically use this mode to download small sections of code to the microcontroller during software development and testing.

16.2 OTPROM MEMORY MAP

The OTPROM contains customer-specified special-purpose and program memory (Table 16-2). The 128-byte special-purpose memory partition is used for interrupt vectors, the chip configuration bytes (CCBs), and the security key. Several locations are reserved for testing or for use in future products. Write the value (20H or FFH) indicated in Table 16-2 to each reserved location. The remainder of the OTPROM is available for code storage.

16-2

Соседние файлы в предмете Электротехника