| Datenblatt-Suchmaschine für elektronische Bauteile |
|
PIC16F570 Datenblatt(PDF) 21 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F570 Datenblatt(HTML) 21 Page - Microchip Technology |
|
21 / 129 page ![]() 2013-2014 Microchip Technology Inc. DS40001684E-page 21 PIC16F570 4.8 Direct and Indirect Addressing 4.8.1 DIRECT DATA ADDRESSING: BSR REGISTER Traditional data memory addressing is performed in the Direct Addressing mode. In Direct Addressing, the Bank Select Register bits BSR<2:0>, in the new BSR register, are used to select the data memory bank. The address location within that bank comes directly from the opcode being executed. BSR<2:0> are the bank select bits and are used to select the bank to be addressed (000 = Bank 0, 001 = Bank 1, 010 = Bank 2, 011 = Bank 3, 100 = Bank 4, etc.). A new instruction supports the addition of the BSR register, called the MOVLB instruction. See Section 13.0 “Instruction Set Summary” for more information. 4.8.2 INDIRECT DATA 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. 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). The FSR is an 8-bit wide register. It is used in conjunction with the INDF register to indirectly address the data memory area. The FSR<7:0> bits are used to select data memory addresses 00h to 1Fh. A simple program to clear RAM locations 10h-1Fh using indirect addressing is shown in Example 4-1. EXAMPLE 4-1: HOW TO CLEAR RAM USING INDIRECT ADDRESSING MOVLW 0x10 ;initialize pointer MOVWF FSR ;to RAM NEXT CLRF INDF ;clear INDF ;register INCF FSR,F ;inc pointer BTFSC FSR,4 ;all done? GOTO NEXT ;NO, clear next CONTINUE : ;YES, continue : |
|
Link URL |
| War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Link zum Datenblatt | Linktausch | Hersteller 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 |