PJRC.COM Offline Archive, February 07, 2004 Visit this page on the live site |
| ||
Shopping Cart Checkout Shipping Cost Download Website |
Home | MP3 Player | 8051 Tools | All Projects | PJRC Store | Site Map |
You are here: 8051 Tools Development Board Memory Map | Search PJRC |
Begin | End | Code | Data | Application |
---|---|---|---|---|
0000 | 1FFF | PAULMON2 | RAM | Program Variables Only |
2000 | 7FFF | RAM | Program Code (development) and Program Variables | |
8000 | F7FF | Flash ROM | Program Code and Data Logging | |
F800 | FEFF | Peripherals | LCD, I/O Pins, Bus Expansion Connector | |
FF00 | FFFF | Unused | Reduces Power (P2 defaults to 0xFF) |
With SDCC, memory usage is controlled by command line options given to SDCC when it links the code. These options are typically written in the project Makefile. For example, "--code-loc 0x2000" would cause the linker to place your code at the beginning of the RAM which can be used for downloading code, and "--xram-loc 0x6000" would instruct the linker to place all your "xdata" variables beginning at 0x6000.
With AS31, your program's location is controlled by the ".org" directive within the code. Typically a ".equ" directive defines a constant near the top of the code, and subsequent ".org" directives utilize this constant to allow the code to be "moved" more easily.
Flash ROM must be erased before it is written. When you download code built between 8000 to F7FF, PAULMON2 will automatically program your code into Flash ROM (Flash programming is a procedure different from simply writing to RAM). Flash programming can only turn 1's into 0's. To turn programmed 0's back into 1's, you must erase the flash chip ('Z' Command) or a 4k sector of the flash chip. The erasure causes all the bytes in the erased area to turn back into 0xFF. If you download a new version of your program "on top of" the original, the result is usually incorrect and PAULMON2 will print an "Unable to write" error message. If this happens, simply erase the flash rom and try again (or use the RAM for development until your code is debugged).
Begin | End | Peripheral | Address | Access | Function |
---|---|---|---|---|---|
F800 | F8FF | 82C55 (A, B, C) | F800 | RD / WR | Port A |
F801 | RD / WR | Port B | |||
F802 | RD / WR | Port C | |||
F803 | WR Only | Config A,B,C | |||
F900 | F9FF | 82C55 (D, E, F) | F900 | RD / WR | Port D |
F901 | RD / WR | Port E (LEDs) | |||
F902 | RD / WR | Port F | |||
F903 | WR Only | Config D,E,F | |||
FA00 | FAFF | User Expansion CS2 Signal Asserted Low |
User Defined | ||
FB00 | FBFF | User Expansion CS3 Signal Asserted Low |
User Defined | ||
FC00 | FCFF | User Expansion CS4 Signal Asserted Low |
User Defined | ||
FD00 | FDFF | User Expansion CS5 Signal Asserted Low |
User Defined | ||
FE00 | FEFF | LCD Port | FE00 | WR Only | Command Register |
FE01 | RD Only | Status Register | |||
FE02 | WR Only | Display or CGRAM Buffer | |||
FE03 | RD Only |