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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/09/08 19:45
Read: times


 
#156560 - Poor choice of terms!
Responding to: ???'s previous message
Alan Dorman said:
instead of loading the SBUF with each ASCII character is there a way to make a string of ASCII characters and have them loaded and sent.

No, there is no shortcut - the 8051 architecture requires that each character is loaded individually into SBUF in turn, and that you wait until the previous character has been sent before loading the next.

There is no way around this - it is the way that the 8051 Architecture works. If there were a special instruction to do this, you would find it in Chapter 2 of the so-called "bible" for the 8051:

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

However, there ia a Programming technique that allows you to avoid having to write the code out long-hand every single time - it is called a subroutine, and has been described by various contributors to this thread!




List of 32 messages in thread
TopicAuthorDate
loading the SBUF shortcut?            01/01/70 00:00      
   Printing a string            01/01/70 00:00      
   Shortcut...NOT            01/01/70 00:00      
   You have to enrich your library of Assembly Code            01/01/70 00:00      
      that is not a shortcut            01/01/70 00:00      
         Library of Assembly Code            01/01/70 00:00      
            the key word            01/01/70 00:00      
               polled serial            01/01/70 00:00      
                  "living with interrupts "            01/01/70 00:00      
                     what I got out of all of this            01/01/70 00:00      
                        DPTR .... Yes!!            01/01/70 00:00      
                        Check out DPTR            01/01/70 00:00      
                     I AGREE            01/01/70 00:00      
                        agree with WHAT?            01/01/70 00:00      
                            I AGREE with ...            01/01/70 00:00      
   C shortcut            01/01/70 00:00      
      'C' confusion            01/01/70 00:00      
         Confused            01/01/70 00:00      
            Maybe, maybe not            01/01/70 00:00      
               printf baggage            01/01/70 00:00      
                  This should come as no surprise            01/01/70 00:00      
               27K lots of memory            01/01/70 00:00      
                  "C baggage"            01/01/70 00:00      
                     Getting off-topic            01/01/70 00:00      
                        I wholehardely agree            01/01/70 00:00      
         Shortcuts are for wimps!            01/01/70 00:00      
            Disagree            01/01/70 00:00      
            Half a million Lines?            01/01/70 00:00      
               I didn't use 'C' or other HLL's on the old PC            01/01/70 00:00      
   Poor choice of terms!            01/01/70 00:00      
      A subroutine?            01/01/70 00:00      
         more code-efficient that macros            01/01/70 00:00      

Back to Subject List