Example 3 - Loading A Program Into Internal Code Ram - Intel 8XC196NT User Manual

Table of Contents

Advertisement

Send
Comments (Example 2)
A0
Data. High byte of address to DATA register.
80
Data. Low byte of address to DATA register.
0A
DATA_TO_ADDR. Move address to DATA register.
05
READ_WORD. Put word at A080H into DATA.
02
TRANSMIT. Transmit low byte of DATA across the
serial port, increment ADDR by one, and shift
DATA right long by eight bits.
02
TRANSMIT. Transmit low byte of DATA across the
serial port, increment ADDR by one, and shift
DATA right long by eight bits.
Any address can be read in this manner, including register RAM, internal code RAM, and SFRs.
15.10.6.3
Example 3 — Loading a Program into Internal Code RAM
This example loads a program into internal code RAM. No OTPROM locations are changed, so
V
can be either +12.5 volts or +5 volts. The following program is to be loaded:
PP
400
A1221180
LD 80H, #1122H ;Puts 1122H into register RAM location 80H
404
27FE
SJMP 0404H
The hex file must be loaded one byte at a time using the RISM commands.
PROGRAMMING THE NONVOLATILE MEMORY
;Jumps to itself to keep program running
;indefinitely
DATA
A0
A0
80
A0
80
A0
80
80
67
00
A0
80
80
00
00
A0
80
ADDR
A0
80
A0
80
A0
81
A0
82
15-39

Advertisement

Table of Contents
loading

Table of Contents