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 03:23
Read: times


 
#61106 - RE: help:external uart st16c550
Responding to: ???'s previous message
Ivan,

If you aren't using Transmit Interrupts you should first check to see if the UART is available to transmit a character by checking the LSR. The example below also doesn't check Clear to Send;


uart_rdy_loop:
    mov   dptr,#LSR
    movx  a,@dptr
    jb    acc.5,uart_rdy_loop
uart_is_rdy:
    mov   dptr,#THR
    movx  @dptr,a



Since you are not using Receive Interrupts a polling routine that waits for available data (and also doesn't check modem signaling) could look like;

uart_rx_loop:
    mov   dptr,#LSR
    movx  a,@dptr
    jnb   acc.1,uart_rx_loop   
uart_rx_avail:
    mov   dptr,#RHR
    movx  a,@dptr


regards,
p







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