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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/04/07 13:03
Read: times


 
#146573 - Something like this
Responding to: ???'s previous message


 3618                          	;----------------------------------------------------------------------------
 3619                          	;
 3620                          	;
 3621                          	;  print messages
 3622                          	;  Dptr-> message in rom terminated by 00h
 3623                          	;
 3624                          	;
 3625                          	;----------------------------------------------------------------------------
 3626   0E0C                   	pstring
 3627   0E0C   E4              	        clr     a
 3628   0E0D   93              	        movc    a,@a+dptr
 3629   0E0E   60 06           	        jz      lcdp_2
 3630   0E10   12 0E FA        	        lcall   pchar
 3631   0E13   A3              	        inc     dptr
 3632   0E14   80 F6           	        sjmp    pstring
 3633   0E16                   	lcdp_2
 3634   0E16   22              	        ret


 4509   12D7                   	pwrlo_str
 4510   12D7   50 4F 57 45 52  	        db      'POWER SUPPLY LOW',0
        12DC   20 53 55 50 50 
        12E1   4C 59 20 4C 4F 
        12E6   57 00 



This above is the listing from the assembler I use (AD2500)- you may need to read you assmebler documentation to see how it does it (they're all different!). You can see for the db 'POWER SUPPLY LOW' that the assembler does the work of ascii translation for you. Also, for the pstring routine, it calls pchar - write code to send A out the serial port. So, to send the power low string , I would write:

mov dptr,#pwrlo_str
acall pstring

As Joseph mentions, the uart takes care of stop bits and start bits.


List of 16 messages in thread
TopicAuthorDate
DB-9 Connector to 8052 protocol            01/01/70 00:00      
   HEX Values?            01/01/70 00:00      
      grunt work            01/01/70 00:00      
         Nope            01/01/70 00:00      
            and how about the asterick?            01/01/70 00:00      
               Asterix the Gaul            01/01/70 00:00      
         Stop Bit            01/01/70 00:00      
         Something like this            01/01/70 00:00      
         C format string            01/01/70 00:00      
            CR LF hex values            01/01/70 00:00      
         Experience?            01/01/70 00:00      
            old hermit            01/01/70 00:00      
               These days...            01/01/70 00:00      
                  LP programming            01/01/70 00:00      
               maybe            01/01/70 00:00      
                  Needhams            01/01/70 00:00      

Back to Subject List