Section 2.4 Registers
Registers are used to store (and possibly shift) binary values. The size of a register is dictated by the number of flip-flops used in their design. Each flip-flop can store a single bit of binary. Therefore, an 8-bit register can store 8 bits of binary. (Refer to [16.20] for more information on registers, including their design.) Registers are ubiquitous in microcontroller design.
The instruction register was previously described in Section 2.2.
General purpose registers contain data that can be accessed by the ALU to act as operands or the result of a machine instruction. Their contents can then be stored to data memory (introduced in Section 2.6).
The memory address register (or pointer register) stores the address of the location in program memory (introduced in Section 2.6) that contains the next instruction to execute.
A status register stores information related to the most recent operation that has been executed on the microcontroller. The ATmega328P’s status register,
SREG, is described in Section 4.3.
I/O registers and extended I/O registers (sometimes called peripheral registers) store information regarding the operation of each peripheral available on the microcontroller.
A stack pointer register is used to store the memory address corresponding to the stack, used for short term storage (described in Section 13.5).
