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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/23/08 11:14
Read: times


 
#161114 - Overhead
Responding to: ???'s previous message
Ahmed Lazreg said:
If we access them directly with Rxx, it's quicker than access to ram location directly only if we are in the good bank. If we need bank switching, it will be slower (one more operation).

If you did only one access to one register, that may well be true.

But, in general, you switch the bank and then do many accesses in that bank - so the overhead of the bank switch is greatly offset by the savings in all the subsequent Rn accesses.

This is precisely why there are multiple addressing modes - because no single mode is ideal for every different situation.

As always in Enigneering, it's a tradeoff: everything has its costs and benefits - it's up to the Engineer to work out which gives the best compromise in each particular situation...

Are there any instructions that does work only with the Rxx notation and not with direct addressing ?

Yes, there are - you can check them out in the Instruction Set document - which is Chapter 2 of the so-called "bible" for the 8051:

Chapter 1 - 80C51 Family Architecture:
http://www.nxp.com/acrobat_d...ARCH_1.pdf

Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set:
http://www.nxp.com/acrobat_d...UIDE_1.pdf

Chapter 3 - 80C51 Family Hardware Description:
http://www.nxp.com/acrobat_d...WARE_1.pdf





List of 6 messages in thread
TopicAuthorDate
What is banked access needed for ?            01/01/70 00:00      
   Register Banks?            01/01/70 00:00      
      3 bits in single instruction byte            01/01/70 00:00      
      and bank switching ?            01/01/70 00:00      
         Overhead            01/01/70 00:00      
            Got it now            01/01/70 00:00      

Back to Subject List