??? 06/20/06 02:18 Read: times |
#118565 - After reading the datasheet.. Responding to: ???'s previous message |
Firstly, what the hell are you doing here?? mov A,#83h ;load register and set AUXR reg. (83h) to enable XRAM mov R0,A ;size of 1792 bytes (max), XRAM is indirect mov @R0,#10h ;AUXR = XRAM enabled, max size The AUXR reg is 8Eh according to the atmel datasheet, 83h is DPH! Also, you seem to be getting confused with indirection and accessing SFRs. Your code should be something like: AUXR .equ 8eh ;if your include file doesn't already have it mov AUXR,#10h ;enable the xram You should also make it easier on yourself if you write routines to dump the values out in hexadecimal through the serial port - makes reading the data a lot easier. Also, you can make your code more straightforward by: mov dptr,#abcd or mov DPH,#12h or mov DPH,#high ADDR mov DPL,#low ADDR Do a bit of reading on the instruction set - the 8051s are a little quirky when it comes to the different memory spaces. It takes a little time to get your head around it. |
Topic | Author | Date |
Ready to XRAM My Head Against the Wall! | 01/01/70 00:00 | |
Show us the code! | 01/01/70 00:00 | |
Post Your Code | 01/01/70 00:00 | |
Code Posted | 01/01/70 00:00 | |
OK | 01/01/70 00:00 | |
That's different on the Atmel | 01/01/70 00:00 | |
After reading the datasheet.. | 01/01/70 00:00 | |
Already Did All of That... | 01/01/70 00:00 | |
What your code is doing... | 01/01/70 00:00 | |
I'll Try That | 01/01/70 00:00 | |
Thats the magic of 8051! | 01/01/70 00:00 | |
But wait! There's more! | 01/01/70 00:00 | |
an obvious miss | 01/01/70 00:00 | |
Problem Solved![]() | 01/01/70 00:00 |