Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Digital signals & protocols lab

Type some bytes and see the wires: UART frames, SPI in all four modes, an I2C transaction and line codes such as Manchester and AMI, with each part explained.

    How to use

    1. Type a few characters (each becomes one byte) or hex bytes such as 0x41 0x42. The list shows each byte in binary.
    2. Choose UART, SPI, I2C or Line codes. The timing diagram redraws as you change anything.
    3. Below the diagram, a note explains what each part of the signal is.
    4. Swipe or scroll sideways to see long messages; up to 8 bytes are drawn.

    Keyboard and touch

    Arrow keys on the tabsChange signal kind
    TabMove through the settings

    Tips

    • Both ends of a UART link must agree on baud, data bits, parity and stop bits ("115200 8N1" = 115200 baud, 8 bits, no parity, 1 stop).
    • SPI devices state their mode in the data sheet; mode 0 is the most common. A wrong mode often reads every byte shifted by one bit.
    • I2C addresses are usually written as 7 bits (0x3C); some data sheets give the 8-bit form with the read/write bit (0x78).
    • Manchester and differential Manchester need twice the bandwidth of NRZ but carry their own clock.
    • Measure real signals with a logic analyser or oscilloscope; this page only draws the ideal timing.

    About this lab

    The diagrams follow the usual definitions: an asynchronous serial frame with a low start bit, data least significant bit first, optional even or odd parity and high stop bits; SPI modes from the clock polarity and phase (CPOL, CPHA); the I2C sequence of START, address with read/write bit, acknowledge bits and STOP, as described in NXP's I2C-bus specification; and the textbook line codes, with Manchester drawn as in IEEE 802.3 (a 1 is low-to-high in the middle of the bit). Timing is idealised (no rise times or clock stretching). Nothing is sent anywhere.

    See you tomorrow!

    A fresh daily puzzle every morning, and new tools added every month.

    Browse every product