Communications - PatternAgents/Electronics_One_Workshop GitHub Wiki

UART

  • A universal asynchronous receiver/transmitter, abbreviated UART, is a computer hardware device that translates data between parallel and serial formats. UARTs are commonly used in conjunction with communication standards such as RS-232, or RS-485. The universal designation indicates that the data format and transmission speeds are configurable.

  • A UART is usually an individual (or part of an) integrated circuit (IC) used for serial communications over a computer or peripheral device serial port. UARTs are now commonly included in microcontrollers.

  • UARTs can be used in one of several wiring configurations:

    • Simplex - communication in one direction only.
    • Full-Duplex communication in both directions, at the same time.
    • Half-Duplex - communication in both directions, but only one direction at a time.

duplex

  • UARTs send their data in a serial stream, initiated by one or more "Start Bits", followed by 7,8, or 9 bits of data, and the one or more "Stop" Bits.

    tx

  • The speed at which the UART sends and receives data is referred to as the Baud Rate, typically baud rates are 9600, 19200, 56700, and 115200; although almost any rate can be used, these rates correspond to multiples of common computer clock frequencies.

baud

  • An Example connecting an Arduino UART to a Bluetooth Radio:

I2C

  • I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips/NXP. It is typically used for attaching lower-speed peripheral ICs to processors and microcontrollers.

  • I²C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted.

i2cb

  • The I²C bus has either a 7-bit or a 10-bit (depending on the device used) address space. In Arduino, we will generally be using only 7 bit I2C addressing.

  • Common I²C bus speeds are the 100 kbit/s standard mode and the 10 kbit/s low-speed mode, but arbitrarily low clock frequencies are also allowed. Recent revisions of I²C can host more nodes and run at faster speeds (400 kbit/s Fast mode, 1 Mbit/s Fast mode plus or Fm+, and 3.4 Mbit/s High Speed mode).

  • An Example connecting two Arduinos using I2C:

  • Remember, I2C needs Pull-Up Resistors to work correctly. If the board or device you are using doesn't include them, you will need to add them to make the I2C bus function correctly. Typically 4,700 Ohm resistors are used:

SPI

  • The Serial Peripheral Interface (SPI) bus is a synchronous serial communication interface specification used for short distance communication, primarily in embedded systems. The interface was developed by Motorola and has become a de facto standard. Typical applications include Secure Digital cards and liquid crystal displays.

SPI

  • SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing. Multiple slave devices are supported through selection with individual slave select (SS) lines.

I2S

  • I²S, also known as Inter-IC Sound, Integrated Interchip Sound, or IIS, is an electrical serial bus interface standard used for connecting digital audio devices together. It is used to communicate PCM audio data between integrated circuits in an electronic device. The I²S bus separates clock and serial data signals, resulting in a lower jitter than is typical of communications systems that recover the clock from the data stream. Despite the name, it is unrelated to the bidirectional I²C bus.

  • There isn't a lot of support for I2S on the original AVR (Arduino), but it is well supported by the Teensy Audio, which I highly recommend if you want to work with audio.

USB

  • USB, short for Universal Serial Bus, is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication, and power supply between computers and electronic devices. It is currently developed by the USB Implementers Forum.

  • USB was designed to standardize the connection of computer peripherals (including keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters) to personal computers, both to communicate and to supply electric power. It has become commonplace on other devices, such as smartphones, PDAs and video game consoles. USB has effectively replaced a variety of earlier interfaces, such as serial and parallel ports, as well as separate power chargers for portable devices.

Next

==========================

Further (Links)