<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 31 Dec 1985 15:22:32 GMT
From   : jp@LANL.ARPA
Subject: Re: 8251 Usart

It's been a while, but I recall that the 8251 had a problem with reset. 
The solutions I've seen are 1: send reset several (3?) times, 2: go through 
the reset-program sequence twice.  Don't know exactly what the problem with 
the 8251 is but that seems to fix it. 
AH, I found some code from my HAL MCEM-8080 (ca 1976).


       UARTI   EQU     8EH     ;INITIAL UART MODE WORD
       URTMO   EQU     0EAH    ;7 BITS, EVEN PARITY, 2 STOP
       URTCT   EQU     0BH     ;UART CONTROL PORT
       URTDA   EQU     0AH     ;UART DATA PORT
       UARTR   EQU     55H     ;RESET COMMAND
       TXRXE   EQU     27H     ;UART RX AND TX ENABLE 


INIT:  MVI     A,UARTI         ;UART MODE OUT  
       OUT     URTCT 
       MVI     A,UARTR         ;RESET 
       OUT     URTCT 
       MVI     A,URTMO         ;FINAL UART MODE
       OUT     URTCT
       MVI     A,TXRXE         ;ENABLE UART
       OUT     URTCT
       RET


The above code works.  I have seen a slightly different way, but can't
lay my hands on it this morning.

I remember now that the 8251 comes on with its brains slightly scrambled.
There are two control bytes that are sent to the same address sequentially
and it doesn't know where it is in that sequence when first initialized.

Hope this is some help.

Jim Potter  jp@lanl.arpa
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>