Date: Mon, 28 Apr 2008 13:22:08 -0800
From: hilpert at cs.ubc.ca
To: General at
priv-edtnaa03.telusplanet.net
CC:
Subject: Re: 8251 troubles
dwight elvey wrote:
---snip---
DI
CALL SETUP
; .DB $01F ; 9600
; .DB $01D ; 4800
.DB $01B ; 2400
; .DB $019 ; 1200
.DB $0AA ; SYNC
.DB $0AA ; SYNC
.DB $040 ; RESET
.DB $0CE ; 2STOP, NO PARITY, 8BIT , X16
.DB $010 ; CLEAR ERRORS
.DB 0
---snip---
I have the datasheet for the 8251A but not the 8251 here, so just some guesses:
- perhaps the 8251 (as opposed to the A) requires the receiver to be re-enabled
(not a full reset) after receipt of each character (an 'explicit ack') (?).
- .. check the error flags to see if a framing error is occurring?
- .. try sending a stream of (best random) characters at full rate,
as opposed to just 2 manually? This might get around some framing
inconsistency or such to at least see if a subsequent character can be received.
- (may be inconsequential, but in the init sequence the two sync characters
are not preceded by a mode byte (perhaps SETUP does this internally?))
This is the perscribed way to get around another feature. If the 8251 was in
the middle of a read sync sequence, one should first send 2 dummy
command/sync. It will then be sure to be waiting for a command.
Sending a reset command enables it to look for the mode. The
$0CE is the mode to select async and dividers and such. Anything that
then follows is a command.
I'll try resending the recieve enable to see if that makes a difference.
Dwight
_________________________________________________________________
Back to work after baby?how do you know when you?re ready?
http://lifestyle.msn.com/familyandparenting/articleNW.aspx?cp-documentid=57…