Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site lanl.ARPA Path: utzoo!linus!philabs!cmcl2!lanl!jp From: jp@lanl.ARPA Newsgroups: net.micro.cpm Subject: Re: 8251 Usart Message-ID: <35676@lanl.ARPA> Date: Tue, 31-Dec-85 10:22:32 EST Article-I.D.: lanl.35676 Posted: Tue Dec 31 10:22:32 1985 Date-Received: Wed, 1-Jan-86 05:03:08 EST References: <1110@brl-tgr.ARPA> Reply-To: jp@a.UUCP (James Potter) Organization: Los Alamos National Laboratory Lines: 38 Summary: 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