
29
42073A-MCU Wireless-02/13
ATmega2564/1284/644RFR2
must be used. When addressing I/O Registers as data space using LD and ST
instructions,
0x20
must
be
added
to
these
addresses.
The
ATmega2564/1284/644RFR2 is a complex microcontroller with more peripheral units
than can be supported within the 64 location reserved in Opcode for the IN and OUT
instructions. For the Extended I/O space from 0x60 – 0x1FF in SRAM, only the
ST/STS/STD and LD/LDS/LDD instructions can be used.
For compatibility with future devices, reserved bits may not be modified. Reserved
registers and I/O memory addresses should never be written.
Some of the Status Flags are cleared by writing a logical one to them. Note that, unlike
most other AVRs, the CBI and SBI instructions will only operate on the specified bit,
and can therefore be used on registers containing such Status Flags. The CBI and SBI
instructions work with registers 0x00 to 0x1F only.
The control registers of I/O and peripherals are explained in later sections.
8.6 General Purpose I/O Registers
The ATmega2564/1284/644RFR2 contains three General Purpose I/O Registers.
These registers can be used for storing any information, and they are particularly useful
for storing global variables and Status Flags. General Purpose I/O Registers within the
address range 0x00 – 0x1F are directly bit-accessible using the SBI, CBI, SBIS, and
SBIC instructions.
8.6.1 GPIOR0 – General Purpose IO Register 0
Bit
7
6
5
4
3
2
1
0
$1E ($3E)
GPIOR07:00
GPIOR0
Read/Write
RW
Initial Value
0
The three General Purpose I/O Registers can be used for storing any information.
Bit 7:0 – GPIOR07:00 - General Purpose I/O Register 0 Value
8.6.2 GPIOR1 – General Purpose IO Register 1
Bit
7
6
5
4
3
2
1
0
$2A ($4A)
GPIOR17:10
GPIOR1
Read/Write
RW
Initial Value
0
The three General Purpose I/O Registers can be used for storing any information.
Bit 7:0 – GPIOR17:10 - General Purpose I/O Register 1 Value
8.6.3 GPIOR2 – General Purpose I/O Register 2
Bit
7
6
5
4
3
2
1
0
$2B ($4B)
GPIOR27:20
GPIOR2
Read/Write
RW
Initial Value
0