??? 09/01/06 06:30 Read: times |
#123486 - 8052 Magic Responding to: ???'s previous message |
In the 8052 ,128 bytes of ram overlay the SFRs. This ram can only be indirectly addressed - as in via the stack or via something like mov @r0,a or mov@r1,a where the address is in R0 or 1. SFRs can only be addressed directly. So your stack is safe from $85..$ff q2. You are correct. Your 'free' ram starts at 20h. Anything less and you may corrupt the registers. You don't necessarily need to use register banks 1..3 so you can use this memory if you want to. q4. there's no problem putting the stack at 30h as long as you're not using that area of ram to store variables. The reset value for the SP is 08h. q5. You need to remember that code and data (ram) are different memory spaces. Such is the Havard architecture. The 8051 on reset executes from 0000h. Normally there is a jump instruction as there are interrupt vectors down the low end of code. q6. db and data. Refer to applicable assembler manual for guidance. Again, as data and code are different memory spaces one would normally use db to define constant memory values in the code area and ds to alocate space in the data (ram) area. |
Topic | Author | Date |
Newbie need help | 01/01/70 00:00 | |
8052 Magic | 01/01/70 00:00 | |
stack overlay on SFR | 01/01/70 00:00 | |
You are missing... | 01/01/70 00:00 | |
Same address, different circuits | 01/01/70 00:00 | |
Confused?! | 01/01/70 00:00 | |
peculiarities | 01/01/70 00:00 | |
link | 01/01/70 00:00 | |
Thanks. | 01/01/70 00:00 | |
8051 vs 8052 | 01/01/70 00:00 | |
understatement of the year![]() | 01/01/70 00:00 |