BigDumbDinosaur wrote:
Take a look at CSRA[3:0], CSRA[7:4], etc., described on page 18 of the 26C92 data sheet, to see how to run at 921.6 Kbps.
I've read the datasheet too, and I see a different picture.
Page 2, "DESCRIPTION":
Quote:
[Each] receiver and transmitter can select its operating speed as one of 27 fixed baud rates, a 16X clock derived from a programmable counter/timer, or an external 1X or 16X clock
Page 8, "BRG"
Quote:
The clock outputs from the BRG are at 16X the actual baud rate. The counter/timer can be used as a timer to produce a 16X clock for any other baud rate by counting down the crystal clock or an external clock.
Page 8, "Baud Rate Generation with the C/T"
Quote:
When the timer is selected as baud rates for receiver or transmitter via the Clock Select register their output will be configured as a 16x clock. Therefore one needs to program the timer to generate a clock 16 times faster than the data rate.
And when we take a look at the CSRA/CSRB registers on page 18:
Quote:
CSRA7:4 - Channel A Receiver Clock Select
The receiver clock is always a 16X clock except for CSRA[7:4]=1111. (meaning an external 1X clock is used)
CSRA3:0 - Channel A Transmitter Clock Select
The transmitter clock is always a 16X clock except for CSRA[3:0]=1111.
So what is this 16X clock that keeps being mentioned?
RS-232 is an asynchronous signalling standard. This means that there is no clock common to transmitter and receiver, and when someone sends you a sequence of bits you have to figure out where the transitions are yourself. The way this is done is by sampling the incoming signal many times per nominal bit time and using several data points to decide whether you are seeing a one or a zero. Sampling only once per bit time *
can not work* when running asynchronously - you could never be sure if you were safely sampling in the middle of bits, or sampling near the edges, and since transmitter and receiver clocks might skew, the edges could move in such a way that you sample the same bit twice or miss some bits entirely.
So that's why we have an internal clock that is a multiple of the baud rate. Why 16? I'm not an expert, but sampling the signal levels 16 times per bit seems to be a theme common to all UARTs I have seen; so without going on another research binge I'd say there is a standard (RS-232?) that specifies sampling at 16 times the nominal baud rate, and that this is baked in deep into the silicon. (but see below)
If you read datasheets for UARTs this factor of sixteen shows up again and again; maximum baud rates tend to be the externally provided clock divided by 16, with possibly a pre-divider in front. All the standard baud rates are a "baud rate crystal frequency" divided by small integer values, divided by 16. The stop bit length for the C92 is specified in increments of 1/16 of a bit time. And so on.
There's also the what-if argument. The maximum "regular" baud rate mentioned in the datasheet is 230400 baud. This is the nominal clock frequency of 3.6864 MHz divided by 16. If it were possible to go higher using the timer, don't you think that functionality would be included in the regular baud rate generator and the resulting higher data rate bragged about on page one? (Other manufacturers, like Maxim, do exactly this with their 8X and 4X modes.)
So for the 'C92 and clones/descendants, it seems that the only way to reach 921600 bps is by bypassing most of the internal clocking circuitry and feeding the transmitters/receivers directly with a faster 16X clock signal - which the silicon does let you do. This clock can go up to 16 MHz, which gives the 16MHz/16 = 1Mbit maximum data rate that is listed in the data sheet.
The other way to go faster is by using a crystal with a different frequency. The highest data rate that is possible without clocking transmitters/receivers directly would then be 500kbit/sec, since the X1 main clock input is limited to 8 MHz.
What about those 1X modes then? I don't know. 1X sampling won't work in asynchronous communication. The only explanation that makes sense is that they are there for
synchronous operation, when transmitter and receiver are fed by the same clock. It also makes sense for a synchronous communication option to be tied to the external clocking option. (I believe some of the later NXP UARTs can output a 16X or 1X clock on their GPIO pins - presumably so that one end could generate the clocks that the other end uses.)
This post took over two hours to write. Should have left it at "no, you're wrong".