參數(shù)資料
型號(hào): HMS77C2001
英文描述: [General Purpose(2) : ADC/ LED/ SCI/ PWM]
中文描述: [通用(2):藝術(shù)發(fā)展局/發(fā)光/工商/脈寬調(diào)制]
文件頁(yè)數(shù): 28/59頁(yè)
文件大?。?/td> 660K
代理商: HMS77C2001
HMS77C2000/2001
Nov. 2002 Ver 1.1
25
9.8 INDIRECT DATA ADDRESSING; INDF
AND FSR REGISTERS
The INDF register is not a physical register.
Addressing INDF actually addresses the register whose ad-
dress is contained in the FSR register (FSR is a pointer).
This is indirect addressing.
EXAMPLE 4-1: INDIRECT ADDRESSING
- Register file 07 contains the value 10
H
- Register file 08 contains the value 0A
H
- Load the value 07 into the FSR register
A read of the INDF register will return the value
of 10
H
- Increment the value of the FSR register by one
(FSR = 08)
- A read of the INDR register now will return the
value of 0A
H
Reading INDF itself indirectly (FSR = 0) will produce
00
H
. Writing to the INDF register indirectly results in a no-
operation (although STATUS bits may be affected).
A simple program to clear RAM locations 10
H
~1F
H
using
indirect addressing is shown in Example 4-2.
EXAMPLE 4-2: HOW TO CLEAR RAM
USING INDIRECT ADDRESSING
movlw 0x10
;initialize
pointer
; to RAM
;clear INDF
register
;inc pointer
;all done
;NO, clear next
movwf FSR
clrf INDF
NEXT
incf FSR,F
btfsc FSR,4
goto NEXT
CONTINUE
:
;YES, continue
The FSR is a 5-bit wide register. It is used in conjunction
with the INDF register to indirectly address the data mem-
ory area.
The FSR<4:0> bits are used to select data memory ad-
dresses 00
H
to 1F
H
.
HMS77C2000: Does not use banking. FSR<7:5> are un-
implemented and read as '1's.
HMS77C2001: Uses FSR<5>. Selects between bank 0 and
bank 1. FSR<7:6> is unimplemented, read as ‘1’
.
FIGURE 9-10 DIRECT/INDIRECT ADDRESSING
6
0
4
0
(opcode)
(FSR)
location
select
location
select
Data
Memory
1
00
H
0F
H
10
H
1F
H
Direct Addressing
Indirect Addressing
5
4
Addresses
address
in Bank 0.
01
00
Bank 1
2
Bank 0
1. For register map detail see Section 4.2.
2. HMS77C2001
6
5
(FSR)
bank
bank
select
相關(guān)PDF資料
PDF描述
HMS81004 REMOTE CONTROLLER
HMS81008 siHYNIX SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS
HMS81016 REMOTE CONTROLLER
HMS81020ET REMOTE CONTROLLER
HMS81024 REMOTE CONTROLLER
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
HMS81004 制造商:未知廠家 制造商全稱(chēng):未知廠家 功能描述:REMOTE CONTROLLER
HMS81004E 制造商:HYNIX 制造商全稱(chēng):Hynix Semiconductor 功能描述:HYNIX SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS
HMS81008 制造商:未知廠家 制造商全稱(chēng):未知廠家 功能描述:REMOTE CONTROLLER
HMS81008E 制造商:HYNIX 制造商全稱(chēng):Hynix Semiconductor 功能描述:HYNIX SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS
HMS81016 制造商:未知廠家 制造商全稱(chēng):未知廠家 功能描述:REMOTE CONTROLLER