[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IIGS 115,200 Baud Serial Port - How?
On Dec 30, 3:15 pm, Hugh Hood <hughh...@earthlink.net> wrote:
> For those who have yet to glaze over, the Time Constant calculates as:
>
> Clock Frequency [3.6864 MHz]
> ------------------------------- - 2
> 2 x (Clock multiplier) x (Baud)
>
> So, can ProTERM be patched to communicate at 115,200 baud through the SCC,
> or not?
>
> Surely some young (or old), fresh, sharp minds will solve this and will lead
> me from the wilderness before I lose what's left of my sanity.
As far as I can see, changing from 16x to 32x clock HALVES the baud
rate if all other settings are the same.
Baud Rate = CLK / (2 x ClkMode x (TC + 2)) /* page 3-3 of SCC
datasheet */
If we try:
CLK = 3686400
ClkMode = 16
TC = 0
we get 3686400 / (2 x 16 x 2) = 3686400 / 64 = 57600 bps
The problem is the two 2's in the denominator. The first is caused by
a flip flop converting the output of the 16-bit down counter into a
square wave. The second appears to be caused by a delay reloading the
BRG counter when it reaches 0.
Eureka!
Using register WR11, the transmit clock my be chosen from one of 4
sources:
WR11 Bits
65 Receive Clock
43 Transmit Clock
-------------------
00 = /RTxC pin
01 = /TRxC pin
10 = BRG output
11 = DPLL output
By using the /RTxC clock source directly (bypassing the BRG) you
remove one (or both?) of 2s in the denominator.