The SPL and SPH register pair represents the 16-bit value, SP.The low byte [7:0] (suffix L) is accessible at the original offset. The high byte [15:8] (suffix H) can be accessed at offset + 0x01. For more details on reading and writing 16-bit registers, refer to Accessing 16-bit Registers.
When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O Registers as data space using LD and ST instructions, 0x20 must be added to these offset addresses.
Bit15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
SP[11:8] | |||||||
AccessR | R | R | R | RW | RW | RW | RW |
Reset0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Bit7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
SP[7:0] | |||||||
AccessRW | RW | RW | RW | RW | RW | RW | RW |
Reset1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Stack Pointer Register
SPL and SPH are combined into SP.