Tag Archives: bit-banging

UART Examination Week 6

Contrary to the assignment, a UART also known as the Universal Asychronous Receiver/Transmitter is not a communication protocol, but a physical circuit that transmits and receives data through the serial port. Though similarly to protocol like SPI and I2C, UART is another method to transmitting and receiving serial data from other devices. This transaction of serial data or dialog between devices is an electronics form of language, in other words communication protocols. UART (according to circuitbasics) is a relatively old communication method and like stated in its name, is asychronous language. In computing, Asychronous indicates a dialog between UARTs is defined by a start and stop notification in a data series versus a clock that synchronizes the output to the receiving UART. A UART and a I2C can send a limited amount of bits (1 start bit, 5 to 9 data bits, an optional parity bit, and 1 or 2 stop bits), these messages are called packets.

How a UART works is that it will receive data in a parallel form (all at once through multiple points) and the UART(1) will translate the data into a packet to which it will transmit the data to the receiving UART(2) in series (one after the other on a single line). The receiving UART(2) will then translate the data (discarding the start and stop bit) and send it in parallel to the external data bus.

One of the more popular advantageous attributes that UART features includes: it uses only two wires to transmit data to another device (TxD: Transmit Data –RxD: Receive Data), uses a parity bit for error checking, data packet can be changed, contains a serial buffer (extra storage space so it can do other tasks while waiting for data), and is a pervasively used and accepted method (found in most processors). These attributes make UART a great communication protocol/mode, nevertheless their convenience do have their foibles. Some disadvantages include the data frame is limited to 9 bits, does not support multiple slaves/ master systems, and the baud rates (reading speed) must be within 10% of the transmitting and receiving UARTS.

Most (all) processors have a UART because of their simplicity in communication transmission, some processors include Raspberry Pi and computers. Though in more sophisticated CPUs the UART chip has become dispensable because the software of the outputted transmission can regulate the process instead of hardware, this technique is called bit-banging.  (not completed yet)