English
Language : 

PIC17C7XX Datasheet, PDF (56/328 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
7.8 Bank Select Register (BSR)
The BSR is used to switch between banks in the data
memory area (Figure 7-12). In the PIC17C7XX
devices, the entire byte is implemented. The lower nib-
ble is used to select the peripheral register bank. The
upper nibble is used to select the general purpose
memory bank.
All the Special Function Registers (SFRs) are mapped
into the data memory space. In order to accommodate
the large number of registers, a banking scheme has
been used. A segment of the SFRs, from address 10h
to address 17h, is banked. The lower nibble of the bank
select register (BSR) selects the currently active
“peripheral bank.” Effort has been made to group the
peripheral registers of related functionality in one bank.
However, it will still be necessary to switch from bank to
bank in order to address all peripherals related to a sin-
gle task. To assist this, a MOVLB bank instruction has
been included in the instruction set.
The need for a large general purpose memory space
dictated a general purpose RAM banking scheme. The
upper nibble of the BSR selects the currently active
general purpose RAM bank. To assist this, a MOVLR
bank instruction has been provided in the instruction
set.
If the currently selected bank is not implemented (such
as Bank 13), any read will read all '0's. Any write is
completed to the bit bucket and the ALU status bits will
be set/cleared as appropriate.
Note:
Registers in Bank 15 in the Special Func-
tion Register area, are reserved for
Microchip use. Reading of registers in this
bank may cause random values to be read.
FIGURE 7-12: BSR OPERATION
BSR
7 43 0
(2)
(1)
Address
Range
10h
17h
0
1
2
3
4
5
6
7
8
15
SFR (Peripheral)
•••
Banks
Bank 0 Bank 1 Bank 2 Bank 3 Bank 4 Bank 5 Bank 6 Bank 7 Bank 8 Bank 15
0
1
2
3
4
20h
FFh
Bank 0 Bank 1 Bank 2 Bank 3 Bank 4
15
GPR (RAM)
•••
Banks
Bank 15
Note 1: For the SFRs only Banks 0 through 8 are implemented. Selection of an unimplemented bank is not recom-
mended. Bank 15 is reserved for Microchip use, reading of registers in this bank may cause random
values to be read.
2: For the GPRs, bank 3 is unimplemented on the PIC17C752 and the PIC17C762. Selection of an unimple-
mented bank is not recommended.
3: SFR Bank 8 is only implemented on the PIC17C76X.
DS30289A-page 56
© 1998 Microchip Technology Inc.