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

PROGRAMMING THE NONVOLATILE MEMORY

16.7.2.1Power-up Sequence

1.Hold the RESET# pin low while VCC stabilizes. Allow VPP and EA# to float during this time.

2.After VCC and the oscillator stabilize, continue to hold the device in reset and apply VPP voltage to EA#.

3.After EA# stabilizes, apply VPP voltage (+12.5V) to the VPP pin.

4.Set the PMODE value to select a programming algorithm.

5.Bring the RESET# pin high.

6.Complete the selected programming algorithm.

16.7.2.2Power-down Sequence

1.Assert the RESET# signal and hold it low throughout the powerdown sequence.

2.Remove the VPP voltage from the VPP pin and allow the pin to float.

3.Remove the VPP voltage from the EA# pin and allow the pin to float.

4.Turn off the VCC supply and allow time for it to reach 0 volts.

16.8 SLAVE PROGRAMMING MODE

Slave programming mode allows you to program and verify the entire OTPROM array, including the PCCBs and UPROM bits, by using an EPROM programmer.

In this mode, ports 3 and 4 serve as the PBUS, transferring commands, addresses, and data. The least-significant bit of the PBUS (P3.0) controls the command (1 = program word; 0 = dump word) and the remaining 15 bits contain the address of the word to be programmed or dumped. Some port 2 pins provide handshaking signals. The AINC# signal controls whether the address is automatically incremented, enabling programming or dumping sequential OTPROM locations. This speeds up the programming process, since it eliminates the need to generate and decode each sequential address.

NOTE

If a glitch or reset occurs during programming of the security key, an unknown security key might accidentally be written, rendering the device inaccessible for further programming. To prevent this possibility during slave programming, program the rest of the OTPROM array before you program the CCB security-lock bits (CCB0.6 and CCB0.7).

16-15

8XC196Kx, Jx, CA USER’S MANUAL

16.8.1 Reading the Signature Word and Programming Voltages

The signature word identifies the device; the programming voltages specify the VPP and VCC voltages required for programming. This information resides in the test ROM at locations 2070H, 2072H, and 2073H; however, these locations are remapped to 007xH. You can use the dump word command in slave programming mode to read the signature word and programming voltages at the locations shown in Table 16-8. The external programmer can use this information to determine the device type and operating conditions. You should never write to these locations. The voltages are calculated by using the following equation (after converting the test ROM value to decimal).

Voltage

VCC (40H)

=

20

× test ROM value

 

 

 

-----------------------------------------------------

 

 

 

 

 

256

 

 

 

=

20---------

×----64----- = 5 volts

VPP (0A0H) =

20---------×----160---------

= 12.5 volts

 

256

 

256

 

Table 16-8. Device Signature Word and Programming Voltages

Device

Signature Word

Programming VCC

Programming VPP

 

 

 

 

 

 

Location

Value

Location

Value

Location

Value

 

 

 

 

 

 

 

 

8XC196CA

0070H

87ACH

0072H

40H

0073H

0A0H

 

 

 

 

 

 

 

8XC196KR, JR, KQ, JQ – C step

0070H

8797H

0073H

40H

0072H

0A0H

 

 

 

 

 

 

 

8XC196JR, JQ – D step

0070H

8797H

0073H

40H

0072H

0A0H

 

 

 

 

 

 

 

8XC196JT

0070H

87AFH

0073H

40H

0072H

0A0H

 

 

 

 

 

 

 

8XC196KT, KS

0070H

87AFH

0072H

40H

0073H

0A0H

 

 

 

 

 

 

 

8XC196JV

0070H

87BEH

0073H

40H

0072H

0A0H

 

 

 

 

 

 

 

16.8.2 Slave Programming Circuit and Memory Map

Figure 16-5 shows the circuit diagram and Table 16-9 shows the memory map for slave programming mode. The external clock signal can be supplied by either a clock or a crystal. Refer to the device datasheet for acceptable clock frequencies.

16-16

PROGRAMMING THE NONVOLATILE MEMORY

 

 

 

CLOCK

 

VCC

XTAL1

 

 

VCC

RESET#

VCC

 

RESET#

0.1 µF

 

NMI

10kΩ

 

VSS

 

 

 

P4.7:0

PBUS

 

 

P3.7:0

 

 

Pullups Required

 

 

 

EA#

 

 

P4.7 - P3.0

EA#

P2.6

CPVER

VPP

VPP

P2.4

AINC#

 

 

P2.2

PROG#

 

 

P2.1

PALE#

VCC

VREF

P2.0

PVER

 

 

 

 

P0.7/PMODE.3

 

 

P0.6/PMODE.2

 

 

P0.5/PMODE.1

 

 

P0.4/PMODE.0

 

 

ANGND

 

 

87C196 Device

 

A0256-03

Figure 16-5. Slave Programming Circuit

16-17

8XC196Kx, Jx, CA USER’S MANUAL

Table 16-9. Slave Programming Mode Memory Map

Description

Address

Comments

 

 

 

OTPROM

(JV) 2000–DFFFH

OTPROM Cells

 

(CA, JT, KT) 2000–9FFFH

 

 

(KS) 2000–7FFFH

 

 

(JR, KR) 2000–5FFFH

 

 

(JQ, KQ) 2000–4FFFH

 

 

 

 

OFD

0778H

OTPROM Cell

 

 

 

DED

0758H

UPROM Cell

DEI

0718H

UPROM Cell

PCCB

0218H

Test EPROM

 

 

 

Programming voltages (see Table 16-8 on page 16-16)

0072H, 0073H

Read Only

 

 

 

Signature word

0070H

Read Only

 

 

 

These bits program the UPROM cells. Once these bits are programmed, they cannot be erased and dynamic failure analysis of the device is impossible.

NOTE (8XC196JV Only)

The 8XC196JV, which has 48Kbytes of OTPROM, requires an additional step for programming or verifying the entire array. The OTPROM array is treated as two 24-Kbyte pages, page 0 and page 1. Bit 7 of the byte register at test ROM location 1FF9H selects the active page (initially page 0). After programming and verifying page 0, set the bit to select page 1. The following instruction selects the upper 24-Kbyte page (page 1) of OTPROM.

orb tmr,#80h

16.8.3 Operating Environment

The chip configuration registers (CCRs) define the system environment. Since the programming environment is not necessarily the same as the application environment, the device provides a means for specifying different configurations. Specify your application environment in the chip configuration bytes (CCBs) located in the OTPROM. Specify your programming environment in the programming chip configuration bytes (PCCBs) located in the test ROM.

Figure 16-6 shows an abbreviated description of the CCRs with the default PCCB environment settings. The reset sequence loads the CCRs from the CCBs for normal operation and from the PCCBs when entering programming modes. You can program the CCBs using any of the programming methods, but only slave mode allows you to program the PCCBs. Chapter 15, “Interfacing with External Memory,” describes the system configuration options, and “Controlling Access to Internal Memory” on page 16-4 describes the me mory protection options.

16-18

PROGRAMMING THE NONVOLATILE MEMORY

CCR1, CCR0

Address:

201AH, 2018H

 

Reset State:

from CCBs XXH, XXH

 

Reset State:

see bit descriptions

The chip configuration registers (CCRs) control bus-control signals, bus width, wait states, powerdown mode, and internal memory protection. These registers are loaded from the PCCBs during programming modes and from the CCBs for normal operation.

7

MSEL1

MSEL0

7

 

 

 

 

 

 

 

LOC1

LOC0

IRC1

IRC0

 

 

 

 

0

WDE

BW1

IRC2

 

 

 

0

 

 

 

 

ALE

WR

BW0

PD

 

 

 

 

Bit Mnemonic

Function

 

 

MSEL1:0

External Access Timing Mode Select

 

PCCB default is standard mode.

 

 

WDE

Watchdog Timer Enable

 

PCCB default is initially disabled (enabled the first time WDT is cleared).

 

 

BW1

Buswidth Control

 

For the Kx, PCCB default selects BUSWIDTH pin control.

 

For the CA, Jx, the PCCB default selects a16-bit bus.

 

 

IRC2

Internal Ready Control.

 

For the Kx, PCCB default selects READY pin control.

 

For the CA, Jx, the PCCB default selects zero wait states.

 

 

LOC1:0

Security Bits

 

PCCB default selects no protection.

 

 

IRC1:0

Internal Ready Control

 

For the Kx, PCCB default selects READY pin control.

 

For the CA, Jx, the PCCB default selects zero wait states.

 

 

ALE

Select Address Valid Strobe Mode.

 

PCCB default selects ALE.

 

 

WR

Select Write Strobe Mode.

 

For the Kx, PCCB default selects WR# and BHE#.

 

For the CA, Jx, the PCCB default selects WR# (BHE# is not imple-

 

mented).

 

 

BW0

Buswidth Control

 

For the Kx, PCCB default selects BUSWIDTH pin control.

 

For the CA, Jx, the PCCB default selects a16-bit bus.

 

 

PD

Powerdown Enable.

 

PCCB default enables powerdown.

 

 

These bits are reserved on the 8XC196CA, Jx, KQ, KR. They are unique to the 8XC196KS and KT.

Figure 16-6. Chip Configuration Registers (CCRs)

16-19

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