Re: Setting baud rate for PC16550D
From: Leon. (noemail_at_noemail.noemail.com)
Date: 12/18/03
- Next message: Leon.: "Re: USB storage crashes and hickups -a current FAQ"
- Previous message: Craig McCluskey: "Re: How do I report my disk grometry and partition layout ?"
- In reply to: Manoj: "Setting baud rate for PC16550D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 18 Dec 2003 15:32:37 +1100
"Manoj" <sewaonegai@rediffmail.com> wrote in message
news:325d00dd.0312110042.2c498c02@posting.google.com...
> Hi
> I have a custom ISA card with PC16550D chip.It clock is 4.9152Mhz.
>
> For configuring this card i call,register_serial().
> I am passing baud base = 307200(4.9152Mhz/16) in the input structure
> to register serial.
>
> My problem is while change the baudrate using minicom/stty ,if i set
> the baud rate above 38400, the cat /proc/tty/driver/serial output
> shows a different value.
>
> ie for 57600 ,it shows 61440
> for 115200, it shows 153600
> for 230400, it shows 307200
>
> why it is so?
because 'speeds' are actually programmed as "dividers" and dividers have to
be integer, starting from 1.
when the divider is an integer, 1, 2, 3, 4,5
The highest speed is dividor =1. You have already agreed that is 307200
The 2nd highest speed is divider =2, 153600
divider=3, 76800
divider=4, 61440
There is an algorithm is choose the best divider for the speed you want.
but the terminal program tells you the actual speed, to tell you how bad it
is at getting that speed.
You can change the clock chip to get speeds.
The clock for speed S has to be S * 16 * N, N being integer.
- Next message: Leon.: "Re: USB storage crashes and hickups -a current FAQ"
- Previous message: Craig McCluskey: "Re: How do I report my disk grometry and partition layout ?"
- In reply to: Manoj: "Setting baud rate for PC16550D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]