Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/20/06 03:57
Read: times


 
#118569 - Thats the magic of 8051!
Responding to: ???'s previous message

The original 8051 only had 128 bytes of internal ram - from 0 -7fh. The SFRs were from 80h to ffh. Then with the 8052, they added an extra 128 bytes of ram - but it could only be accessed indirectly as in Mov @r0,a etc. Then we come to XRAM - this used to be external to the chip but with the new devices this has been moved on board but they manufacturers give you the option of turning it on or off - old apps might have external ram or i/o devices in the same locations. You can only access XRAM indirectly using MOVX instructions. The fun begins when you use 'c' - as 'c' itself really only knows about one memory space, however the compiler writers add extra features to the 8051 compilers so you can put your variables wherever you want. This means you have to think carefully about what you store and where. Accessing XRAM is slower as you need to load up the dptr rather than just accessing internal ram directly. Another limitation is the stack needs to be in internal memory that limits what you can easily achieve using this architecture. The 8051 was designed by Intel to be a microcontroller which usually doesn't need lots of ram. With these limitations in mind, the 8051 does quite well.

List of 14 messages in thread
TopicAuthorDate
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      

Back to Subject List