Rism Command Examples; Example 1 - Programming The Ppw - Intel 8XC196NT User Manual

Table of Contents

Advertisement

Table 15-14. RISM Command Descriptions (Continued)
Value
Command
0BH
INDIRECT
12H
GO
13H
HALT
14H
REPORT

15.10.6 RISM Command Examples

This section provides examples of ways in which you might use the RISM commands.
15.10.6.1
Example 1 — Programming the PPW
You should specify the programming pulse width before you do any programming or write to any
memory locations. This example loads the SP_PPW register (221CH/221DH) with 8010H, the
minimum value for 16-MHz operation. (See "Programming Pulse Width" on page 15-8 to deter-
mine the correct PPW for other frequencies.)
Before this programming step takes place, the SP_PPW register contains its default value,
80FFH. The PPW is equal to 2.30 ms, so this program step will take 11.52 ms per word to com-
plete (5 pulses of 2.30 ms each). After the PPW value is changed, subsequent programming op-
erations will take only 500 µs per word (5 pulses of 100 µs each).
PROGRAMMING THE NONVOLATILE MEMORY
Puts the word from the memory address pointed to by the ADDR register into the
ADDR register.
ADDR
Before command
22
After command
80
PUSHes the user PC, PSW, and WSR onto the stack and starts your program
from the location contained in the user PC. The RISM PC, PSW, and WSR will
also be in the stack, so allow enough room on the stack for all six words. Your
program must not directly alter memory locations 56H–5CH; the RISM uses these
locations if your program reads from or writes to any memory.
You can interrogate memory locations while your program is running. The RISM
interrupts your program to process the command, then returns execution to your
program.
Stops executing your program, POPs the user PC, PSW, and WSR from the
stack, and PUSHes the RISM PC, PSW, and WSR back onto the stack. The RISM
PC contains the location of the Monitor_Pause routine, so the RISM returns to
Monitor_Pause.
Loads a value into the DATA register. This value indicates the status of your
program:
Value
Status
00
halted
01
running
02
trapped
Description
16
09
Memory Addr.
2217
2216
80
09
80
09
15-37

Advertisement

Table of Contents
loading

Table of Contents