Example 2 - Reading Otprom Contents; Example 3 - Loading A Program Into Internal Ram - Intel 8XC196K Series User Manual

Table of Contents

Advertisement

8XC196K x , J x , CA USER'S MANUAL
16.10.6.2
Example 2 — Reading OTPROM Contents
This example reads the contents of OTPROM address A080H. Because the OTPROM is
remapped from 2000H to A000H, the location read is actually 2080H of the program in
OTPROM. This example assumes that the word at location 2080H is 8067H, the assembled hex
value of the code. No OTPROM locations are changed, so V
volts.
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 RAM, and SFRs.
16.10.6.3
Example 3 — Loading a Program into Internal RAM
This example loads a program into internal RAM. No OTPROM locations are changed, so V
can be either +12.5 volts or +5 volts. The following program is to be loaded:
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.
16-40
;Jumps to itself to keep program running
;indefinitely
can be either +12.5 volts or +5
PP
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
PP

Advertisement

Table of Contents
loading

Table of Contents