Last active
August 29, 2015 14:13
-
-
Save mixinmax/6d50f98cc1e525dd9484 to your computer and use it in GitHub Desktop.
ATMega2560 Architecture Overview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| General | |
| ------- | |
| - 32 general purpose registers | |
| - Address bus is 17 bits | |
| - Address is 16 bits | |
| - Instructions are 2 or 4 bytes | |
| - Flash address space 0x0 to 0x1FFFF | |
| - Program counter is 17 bits | |
| Ports & Pins | |
| ------------ | |
| The AVR 2560 chip has 11 ports (A-L) which each contain 8 bits | |
| Each bit (for the most part) is mapped to a pin on the Arduino board | |
| Each port has a #define name, a register name and an address | |
| Register Addressing | |
| ------------------- | |
| We can address the registers $00 - $1F directly by using the SBI and CBI instructions. | |
| Similarily, the SBIS and SBIC instructions will read from these registers | |
| SBI and CBI operate on ALL bits in the register | |
| When using the IN and OUT commands, you can only access addresses $00 - $3F | |
| When accessing them as data space using LD and ST, add $20 to the addresses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment