Run-Time Programming - Intel 8XC196NT User Manual

Table of Contents

Advertisement

15.11 RUN-TIME PROGRAMMING

You can program an OTPROM location during normal code execution. To make the OTPROM
array accessible, apply V
V
pin during the entire programming process. Then simply write to the location to be pro-
PP
grammed.
Programming either security-lock bit in CCB0 disables run-time
programming. (For details, see "Controlling Access to the OTPROM During
Normal Operation" on page 15-4.)
Immediately after writing to the OTPROM, the device must either enter idle mode or execute code
from external memory. An access to OTPROM would abort the current programming cycle. Each
programming cycle begins when a word is written to the OTPROM and ends when the next
OTPROM access occurs. Each word requires a total of five programming cycles, each of which
must be approximately 100 µs in duration.
Figure 15-15 is a run-time programming example. It performs five programming cycles for each
word. After each programming cycle, the code causes the device to enter idle mode. EPA0 causes
the device to exit idle mode at the appropriate time. To ensure that the device does not exit idle
mode prematurely, all other interrupts are disabled.
The routine assumes that the following conditions are true:
the EPA is dedicated to run-time programming
timer 1 is configured to use an internal clock
EPA0_ISR is assigned as the EPA0 interrupt vector.
It also assumes that the following constants and registers are assigned:
CLEAR_EPA0
ENABLE_EPA0
EPA0_TIMER
PGM_PULSE
ADDR_TEMP
COUNT
DATA_TEMP
TEMP0
PROGRAMMING THE NONVOLATILE MEMORY
voltage to EA# while you reset the device. Apply V
CC
NOTE
constant (0EFH) that clears the EPA0 interrupt pending bit
constant (10H) that enables only the EPA0 interrupt
constant (40H) that sets up EPA0 as a software timer using timer 1
constant that determines programming pulse width
register that contains the address to be programmed
count register
register that contains the data to be programmed
temporary register
voltage to the
PP
15-43

Advertisement

Table of Contents
loading

Table of Contents