2
\$\begingroup\$

Our group are creating a UART IP Soft Core with Wishbone Wrapper and we are using 5,6,7 and 8 data bit. I just want to know what are the use of the 5, 6 and 7 data bit?

In addition to my question above, what are the possible applications of the customizable uart? any suggetion please?

\$\endgroup\$
3
\$\begingroup\$

In the past Baudot code was popular 5-bit code used with telegraph machines. The idea of being able to shift between letters and figures gave it coverage of uppercase letters, numeric and other common punctuation symbols above the usual total of 32 you'd expect from a 5-bit number.

ASCII is a 7-bit code (although often now transmitted as 8 bits regardless) so that explains why that was common. I'd never heard of six bits being used but presumably in the past if it was worthwhile to cover five, seven and eight bits handling six bits added no additional complexity, but more likely is Michael Karas' answer in that regard that six bit encoding was also popular as well.

\$\endgroup\$
  • \$\begingroup\$ sir can you suggest any possible application that we can use in our Customizable UART?n please help. \$\endgroup\$ – sol Feb 3 '15 at 6:15
  • \$\begingroup\$ @sol not sure I 100% follow but if you're after a class project idea maybe you could maybe do something to send a sensor reading over the UART, and then use a USB to serial adapter on a PC to receive the data for example. \$\endgroup\$ – PeterJ Feb 3 '15 at 6:20
2
\$\begingroup\$

The length of the data values in a UART are historical and relate back to the day when communications was slow (like 110 bits per second). If a particular application could encode all the symbols that wanted to be transmitted into a smaller number of bits then it was possible to send that information to another location in less time. For example if you used an alphabet of 26 upper case letter symbols plus 6 punctuation marks and control characters it would fit into a 5 bit code (32 combinations). The Baudot code was one example of a 5 bit code.

The original ASCII character encoding used 7 bit encoding. IBM's EBCDIC was another example of a 7 bit code.

There were a number of 6 bit character encoding systems in use. There was DEC's SIXBIT code and also there was uuencoding which used a 6 bit character set to represent arbitrary binary data as text. As a matter of fact common mag stripe cards that we still use today use a 6-bit character encoding on their track 1.

\$\endgroup\$
  • \$\begingroup\$ Sir can you suggest any possible application that we can use in our Customizable UART? Please help. \$\endgroup\$ – sol Feb 3 '15 at 6:18
1
\$\begingroup\$

The original UART (as a single chip) appeared in the early 1970's. It was designed so that it could be used with any of the serial communications systems in use at that time. The classic teleprinters (mostly sold under the Teletype brand) used a 5-bit code. There were also some 6-bit systems developed, but there were far less common. And although early ASCII-compatible equipment only made use of 7 bits, I never saw an implementation that didn't use the full 8 bits. The 8th bit could be used for parity (even or odd), or it might be permanently set to 0 or 1.

A completely compatible UART also allowed setting the number of stop bits to one-and-a-half, as this was the timing used with the 5-level Baudot machines.

Once the sending and receiving machines became all electronic, and especially microcontroller based, one could choose any setting they wanted and make it work by using the same settings on each end. But most people stuck with the "8-N-1" convention in use by that time.

\$\endgroup\$
  • \$\begingroup\$ Hello Sir can you suggest some application which is related to customizable uart? please help. \$\endgroup\$ – sol Feb 3 '15 at 6:45
  • \$\begingroup\$ Radioteletype \$\endgroup\$ – Bruce Abbott Feb 3 '15 at 6:56
  • \$\begingroup\$ Well, on this site, if you want to ask another question, it's best to post it as a new question. But if you want some adventure, go find an old 5-bit teleprinter and figure out how to send some text to it! \$\endgroup\$ – gbarry Feb 3 '15 at 6:56
1
\$\begingroup\$

When sending ASCII, if none of the characters have the high bit set, using 7-N-1 rather than 8-N-1 at any given baud rate will offer an easy 11% speed improvement. Beyond that, I've not seen much use for shorter bit lengths.

Good support for 9-bit data is helpful, though usage of it is limited by the fact that many UART devices do not support it well. It's common for UARTs to support 8 bits plus configurable parity, but for such a feature to be really useful the data for the ninth bit must be buffered both transmit and receive FIFOs, and it must be possible to configure the ninth-bit state for transmission without interfering with ninth-bit reception. Having a UART whose receive buffer records whether the received parity matched the transmit parity setting is useless if a byte may occur while software is preparing to change the parity for the next transmission, since software will have no way of knowing whether the incoming data was compared to the old or new setting.

BTW, an approach I haven't seen used, but which might be interesting would be to use a variable-length byte which would regard as a stop bit the first marking bit after the eight. This would allow 256 values to be sent in ten bit times, 256 different ones to be sent in eleven, and possibly another 256 different ones in twelve, etc. That would afford the protocol advantages associated with nine-bit data, but without adding extra overhead on most bytes. It would increase the likelihood that framing errors wouldn't be "noticed" by the UART, but the appearance of unexpected "special" characters could be detected in the protocol.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.