| Os motores de busca de Datasheet de Componentes eletrônicos |
|
PIC16C712 Folha de dados(PDF) 20 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16C712 Folha de dados(HTML) 20 Page - Microchip Technology |
|
20 / 106 page ![]() PIC16C712/716 DS41106C-page 20 1999-2013 Microchip Technology Inc. 2.5 Indirect Addressing, INDF and FSR Registers The INDF register is not a physical register. Addressing INDF actually addresses the register whose address is contained in the FSR register (FSR is a pointer). This is indirect addressing. EXAMPLE 2-1: INDIRECT ADDRESSING • Register file 05 contains the value 10h • Register file 06 contains the value 0Ah • Load the value 05 into the FSR register • A read of the INDF register will return the value of 10h • Increment the value of the FSR register by one (FSR = 06) • A read of the INDR register now will return the value of 0Ah. Reading INDF itself indirectly (FSR = 0) will produce 00h. Writing to the INDF register indirectly results in a no-operation (although Status bits may be affected). A simple program to clear RAM locations 20h-2Fh using indirect addressing is shown in Example 2-2. EXAMPLE 2-2: HOW TO CLEAR RAM USING INDIRECT ADDRESSING An effective 9-bit address is obtained by concatenating the 8-bit FSR register and the IRP bit (STATUS<7>), as shown in Figure 2-10. However, IRP is not used in the PIC16C712/716. FIGURE 2-10: DIRECT/INDIRECT ADDRESSING MOVLW 0x20 ;initialize pointer MOVWF FSR ; to RAM NEXT CLRF INDF ;clear INDF register INCF FSR ;inc pointer BTFSS FSR,4 ;all done? GOTO NEXT ;NO, clear next CONTINUE : ;YES, continue Note 1: For register file map detail see Figure 2-3. 2: Maintain clear for upward compatibility with future products. 3: Not implemented. Data Memory(1) Indirect Addressing Direct Addressing bank select location select RP1:RP0 6 0 from opcode IRP FSR register 7 0 bank select location select 00 01 10 11 Bank 0 Bank 1 Bank 2 Bank 3 FFh 80h 7Fh 00h 17Fh 100h 1FFh 180h (3) (3) (2) (2) |
|
Ligação URL |
| ALLDATASHEET é útil para você? [ DONATE ] |
Sobre Alldatasheet | Publicidade | Contato conosco | Privacy Policy | Link para a ficha técnica | roca de Link | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |