Lesson plan
Special function register
A special function register (SFR) 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 (such as serial ports or general-purpose IOs) * timers * stack pointer * stack limit (to prevent overflows) * program counter * subroutine return address * processor status (servicing an interrupt, running in protected mode, etc.) * condition codes (result of previous comparisons) Because special registers are closely tied to some special function or status of the microcontroller, they might not be directly writeable by normal instructions (such as adds, moves, etc.). Instead, some special registers in some microcontroller architectures require special instructions to modify them. For example, the program counter is not directly writeable in many microcontroller architectures. Instead, the programmer uses instructions such as return from subroutine, jump, or branch to modify the program counter. For another example, the condition code register might not be directly writable, instead being updated only by compare instructions.
Article summary
A special function register (SFR) 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 (such as serial ports or general-purpose IOs) * timers * stack pointer * stack limit (to prevent overflows) * program counter * subroutine return address * processor status (servicing an interrupt, running in protected mode, etc.) * condition codes (result of previous comparisons) Because special registers are closely tied to some special function or status of the microcontroller, they might not be directly writeable by normal instructions (such as adds, moves, etc.). Instead, some special registers in some microcontroller architectures require special instructions to modify them. For example, the program counter is not directly writeable in many microcontroller architectures. Instead, the programmer uses instructions such as return from subroutine, jump, or branch to modify the program counter. For another example, the condition code register might not be directly writable, instead being updated only by compare instructions.
Key claims
No claims recorded.
Discussion questions
- Summarise the article in your own words. Which single claim would you verify first, and why?
- Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
- If two sources disagreed about one of these facts, what would you need in order to trust one over the other?
Bibliography
No sources recorded.
Key claims and bibliography are generated from the same tracked claims and sources as the article page.