Newsgroups: comp.robotics
Path: brunix!news.Brown.EDU!agate!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!spool.mu.edu!umn.edu!msc.edu!cdsmail!timbuk.cray.com!hemlock.cray.com!kilian
From: kilian@cray.com (Alan Kilian)
Subject: Re: 6811 SCI (Why do I get the wrong baud rate?)
Message-ID: <1993Nov16.135158.20947@hemlock.cray.com>
Lines: 38
Nntp-Posting-Host: palm
Organization: Cray Research, Inc.
Date: 16 Nov 93 13:51:58 CST

The problem is that you forgot the SCI baud rate prescaler bits.

You have:

BAUD_9600       equ     $30
BAUD_4800       equ     $31
BAUD_2400       equ     $32
BAUD_1200       equ     $33
BAUD_600        equ     $34
BAUD_300        equ     $35
BAUD_150        equ     $36
BAUD_75         equ     $37


And they should have bits 5 and 4 == 1 to divide the SCI baudrate by 13

So use:
BAUD_9600       equ     $B0
BAUD_4800       equ     $B1
BAUD_2400       equ     $B2
BAUD_1200       equ     $B3
BAUD_600        equ     $B4
BAUD_300        equ     $B5
BAUD_150        equ     $B6
BAUD_75         equ     $B7


Note that the $3x turned into a $Bx

So you were actually running at 125,000 baud.
(You said that 16uSec == 62500 BAUD but maybe you doubled something)

             -Alan Kilian


-- 
 -Alan Kilian           kilian@cray.com 612.683.5499 (Work) 612.721.3990 (Home)
  US Patent #5,245,319 is mine. All mine. Mine, Mine, Mine. Ah Hahahahahaha.
