1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

UART 5/6bits char format

Discussion in 'Embedded' started by HT-Lab, Aug 27, 2009.

  1. HT-Lab

    HT-Lab Guest

    Hi all,

    I just wrote a simple driver for a 16750 UART and wondered if there are still
    (embedded) systems that use the 5 and 6 bits character length format?

    A quick google search showed that 5 bits/1.5 stopbits were used for old
    mechanical teletypes, not sure what 6 bits are used for.

    I assume these formats are no longer used but I might be wrong,

    HT-Lab, Aug 27, 2009
    1. Advertisements

  2. HT-Lab

    David Brown Guest

    I don't think 5 or 6 bits were ever used for "embedded" systems. 7-bit
    was common for ASCII-only communication, and it's legacy is still with
    us in email attachment codings, ftp transfers, and certain serial
    protocols (such as some used by programmable logic controllers).
    Embedded systems are typically 8-bit, but are far more likely to use
    9-bit than 7-bit or less, with an extra bit indicating addresses, start
    of telegram, control v.s. data, etc.

    Having more than 1 stop bit is sometimes useful to give systems a little
    more time - it's especially helpful if you have a UART without double
    buffering, or software uarts, or need to turn drivers on and off at the
    end of characters or telegrams.
    David Brown, Aug 27, 2009
    1. Advertisements

  3. HT-Lab

    Jim Stewart Guest

    Agreed. By the minicomputer era of the late 60's
    7-bit was pretty much standard with ASR-33's doing
    the brunt of the work.

    I remember a minor upset between the deaf community
    and the nascent home computer crowd of the mid
    seventies. The deaf community were using cheap surplus
    5-bit Baudot teletypes for communications and were
    unhappy that the home computer people were considering
    the use of the same machines as terminals for their
    computers. The machines were available essentially
    free to the deaf community and the concern was that
    another market would reduce the supply and/or increase
    the price of the machines.
    Jim Stewart, Aug 27, 2009
  4. HT-Lab

    Jon Kirwan Guest

    None I'm aware of. But a single lifetime must still be considered
    very limited in scope.
    There was a lot of excitement with the early teletypes. They went
    over very well for businesses large enough to afford them. The one I
    remember used either 5 or 6 bits (I was young then but can't recall
    any lower case on it or much punctuation but it was small and fit in
    my dad's office at home.)

    Through experimentation years later I found that teletypes, such as
    the KSR35 and ASR33, consistently operated (unless they were broken)
    with 2 stop bits. But enough would have trouble with certain streams
    if 1.5 stop bits were used that I went back to consistently using 2.

    One of the devices I modified to turn into a printer was an IBM model
    85 electric typewriter. On that one, I carefully calibrated each
    printer action and inserted appropriate delays in the software, using
    software buffer controls to allow the host computer to know when to
    sent more text in order to make the whole thing work well.

    The basic thing here is that if the serial stream is used with non-
    mechanical display systems (glass screens, for example) or host
    computers, you probably are just fine. If there is some likelihood of
    a mechanical device there, then 1.5 or 2 may be better. It may also
    help a little if you want to communicate with another embedded device
    that uses a software uart that doesn't use finely timed sampling
    divisions or where it's sampling may be inaccurate.
    Depends on the circumstances. You need to weigh the likelihoods
    against the extra effort, documentation, or after sale phone calls
    asking "what does this mean?" and so on. Complexity in your device
    costs money after the sale, even if it is easy to code up, because it
    has to be supported and educating customers on something this arcane
    may cost way more than the feature is worth to a few. But if you can
    mitigate that part well, then why not keep the capability around?

    Now, only glancing for a moment at your website, I gather this may be
    about VHDL functionality. That complicates questions about end use,
    as you are supplying suppliers and pretty much cannot say what some
    will care about. But you also can supply a version that supports 1,
    1.5, and 2 stop bits as well as a version that only supports 1 stop
    bit and just see where your customers take you.

    Jon Kirwan, Aug 27, 2009
  5. 5 data bits + 1.5 stop bits might still be used in some radio amateur
    radio Teletype (RTTY) communication systems.

    6 data bits was common with 36 bit computers (Univac etc.), with (6
    bits/char), but I have not seen 6 bit chars in serial communication
    for more than three decades.

    Paul Keinanen, Aug 27, 2009
  6. HT-Lab

    Jon Kirwan Guest

    Cripes. I'd forgotten about 36-bit. PDP-10 comes to mind, now. But
    they packed them as 7-bit by then, as I recall, so a 36-bit word gave
    you 5 characters (plus a little.)

    Jon Kirwan, Aug 27, 2009
  7. HT-Lab

    HT-Lab Guest

    HT-Lab, Aug 28, 2009
  8. Putting on my "Dilbert dinosaur suit", I did an embedded 5 bit interface in
    the mid 80's. The task was to make a baudot (5-bit) converter for an early
    HP inkjet printer that had ASCII (7/8-bit) serial and parallel interfaces.
    Done with a TI TMS7000 processor.

    Look up radioteletype on Wikipedia and you will see that 5-bit is still in

    Not Really Me, Sep 1, 2009
  9. HT-Lab

    Guest Guest

    You could almost do that with a UART, a ROM, and a little glue logic?
    Guest, Sep 1, 2009
  10. While some radio amateurs might still use RTTY with 170 Hz frequency
    shift for historical reasons, most radio amateurs prefer PSK31 or
    similar more spectrally efficient modes for real time keyboard to
    keyboard communication.

    Paul OH3LWR
    Paul Keinanen, Sep 1, 2009
  11. Or an FPGA, or... Certainly lot's of solutions. At the time this was in a
    $500 printer that was "modified" and resold for about $7000. The chosen
    path was speed of implementation, although I can't remember why we chose
    that processor. Was not in the main stream of what we typically used.

    Not Really Me, Sep 2, 2009
  12. Who said "amateurs"?
    Not Really Me, Sep 2, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.