openskills.info
Open Course

Embedded Hardware Interfaces

Embedded hardware interfaces are the wiring-level protocols, such as GPIO, UART, I2C, SPI, and CAN, that a microcontroller uses to talk to sensors, displays, and other chips on the same circuit board.

itComputer architecture and hardware

Don't Panic - Embedded Hardware Interfaces

Embedded hardware interfaces are the small agreements that let the chips on one circuit board stop glaring at each other and exchange signals. A microcontroller has sensors, displays, memory, and motor drivers nearby. It cannot negotiate with them in prose, so it uses wires, voltage levels, timing, and a few very firm rules about which bit is allowed to arrive when.

The useful surprise is that not every named interface is a data link. GPIO is one on-or-off signal with no protocol at all. PWM sends no structured message; it changes average power by varying duty cycle. ADC goes the other way and turns a continuously changing voltage into a number. Calling all three communication is how a board ends up with a very confident yet dim LED.

For actual serial traffic, choose the shape of the problem. UART is two wires and a prior agreement about baud rate; it suits a debug console or one peripheral. I2C saves pins by putting several addressed devices on one open-drain, two-wire bus. The pull-up resistors do the apparently unglamorous job of restoring a released line high, which turns out to be central rather than decorative. SPI spends more pins for speed: clock and data lines are shared, but every device gets its own chip-select line.

CAN has a different personality because it expects many nodes and an electrically noisy environment. Its two differential wires carry frames whose identifiers also set priority. When nodes begin together, the lower identifier wins arbitration without corrupting the message. That is less a queue than a polite argument conducted at wire speed, with no raised voices and very strict rules about zeros.

Start with the Slides tab when you need the choice map: one signal, one peripheral, several low-speed devices, higher throughput, analog control, analog measurement, or many noisy nodes. Keep the Cheatsheet nearby for wire names, I2C speed modes, SPI modes, and Linux device paths. The Practice Reference is for confirming GPIO, I2C, and SPI wiring from userspace before firmware turns a loose connection into an afternoon of theories. The Quiz is there to check whether the map still holds once the acronyms begin arriving in a small convoy.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://www.nxp.com/docs/en/user-guide/UM10204.pdf
  • https://docs.kernel.org/driver-api/spi.html
  • https://docs.arduino.cc/learn/communication/uart/
  • https://docs.kernel.org/driver-api/gpio/intro.html
  • https://docs.kernel.org/userspace-api/gpio/chardev.html
  • https://docs.kernel.org/i2c/dev-interface.html
  • https://docs.kernel.org/driver-api/pwm.html
  • https://docs.espressif.com/projects/arduino-esp32/en/latest/api/adc.html
  • https://docs.arduino.cc/language-reference/en/functions/analog-io/analogRead/
  • https://www.tekeye.uk/downloads/can2spec.pdf
  • https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
  • https://www.can-cia.org/can-knowledge/history-of-can-technology
  • https://www.iso.org/standard/20380.html
  • https://www.ti.com/lit/an/slva689/slva689.pdf
  • https://www.saleae.com/support/getting-started/protocols
  • https://digilent.com/shop/analog-discovery-3/
  • https://www.totalphase.com/products/aardvark-i2cspi/
  • https://www.peak-system.com/products/hardware/external-pc-interfaces/pcan-usb/