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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/20/03 02:38
Read: times


 
#61099 - help:external uart st16c550
anyone know how to interface 8052 to st16c550?

following is my 8052 assembly code:
_RHR EQU 0E00H
_THR EQU 0E00H
_IER EQU 0E01H
_FCR EQU 0E02H
_ISR EQU 0E02H
_LCR EQU 0E03H
_MCR EQU 0E04H
_LSR EQU 0E05H
_MSR EQU 0E06H
_DLL EQU 0E00H
_DLM EQU 0E01H

after initialize LCR,FCR,and IER

;this is the routin 8052 write to st16c550
;and check THR flag in LSR
MOV A,#55H
PUT_XCHR:MOV DPTR,#_THR
MOVX @DPTR,A
MOV DPTR,#_LSR
PUSH ACC
HERE2: MOVX A,@DPTR
JNB ACC.5,HERE2 ;(problem here bcos d value of THR flag is zero all d time although char has been transmit)
POP ACC

RET




List of 5 messages in thread
TopicAuthorDate
help:external uart st16c550            01/01/70 00:00      
   RE: help:external uart st16c550            01/01/70 00:00      
      RE: help:external uart st16c550            01/01/70 00:00      
         RE: help:external uart st16c550            01/01/70 00:00      
   RE: help:external uart st16c550            01/01/70 00:00      

Back to Subject List