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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/09/01 01:16
Read: times


 
#7994 - RE: Serial Port Weird Problem
Hi Dixon,

I believe that if when the "db" is 00h, that means it is the end of the data byte string. Check out the example below from my Optrex 20x4 LCD test program.

; 8031 20x4 LCD Test code
; By: David J. Kaleta
; 12/20/00
; Use the Metalink assembler program to assemble

mov DPTR,#EgoMess ; Point at my ego message to send

SendMessage:
;Message sender loop section
;This code sends a string (text, numbers, etc.) out to the LCD
acall delay ; Wait for LCD acall delay
clr a
movc a,@a+dptr
jz $ ; End program loop
inc dptr
acall SendCharacter
sjmp SendMessage

SendCharacter:
push dph
push dpl
mov dptr,#0E001h ; LCD addr
movx @dptr,a
pop dpl
pop dph
ret

EgoMess:
db ' 8031 LCDTest '
db ' David J. Kaleta '
db ' written by: '
db ' 12/20/00 ',0

delay:
push dph
push dpl
mov dptr,#0ffffh
djnz dpl,$
djnz dph,$
pop dpl
pop dph
ret

Hope this helps.

TTYL,

Dave Kaleta


List of 17 messages in thread
TopicAuthorDate
Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      
RE: Serial Port Weird Problem            01/01/70 00:00      

Back to Subject List