Special function register
A special function register is a register within a microcontroller that controls or monitors various aspects of the microcontroller's function. Depending on the processor architecture, this can include, but is not limited to:
- I/O and peripheral control
- timers
- stack pointer
- stack limit
- program counter
- subroutine return address
- processor status
- condition [code register|condition codes]
Intel microcontrollers
Special function registers are in the upper area of addressable memory, from address 0x80 to 0xFF. This area of memory cannot be used for data or program storage, but is instead a series of memory-mapped ports and registers. All port input and output can therefore be performed by memory move operations on specified addresses in the SFR region. Also, different status registers are mapped into the SFR, for use in checking the status of the 8051, and changing some operational parameters of the 8051.Some SFR bits may be set directly using SETB/LDB instructions on the SFR's address, whereas others may require usage of specific instructions. The Intel 80196 class microcontroller has 24 SFRs, each 1 byte in size; standard Intel 8051 chips have 21 SFRs.