I²C bus scanner and register reader (MCP2221A, WebHID)

Scan an I²C bus from the browser through an MCP2221A USB bridge, identify the parts by their ID registers, read and write registers, dump an EEPROM, and read a BME280, INA219 or MPU-6050 live.

How to use it

  1. Wire the MCP2221A’s SDA, SCL and ground to the board (with pull-ups), then press Connect and pick it; or try the simulated board.
  2. Scan the bus: every address that acknowledges is shown with the parts usually found there; Identify reads ID registers to tell them apart.
  3. Open an address’s registers to read or write them, dump an EEPROM to a .bin, or read a BME280, INA219 or MPU-6050 as numbers.

Questions

Does it need a driver?

No. The MCP2221A is a HID device, which Chrome and Edge open over WebHID on Windows, macOS, Linux and ChromeOS without installing anything.

Nothing answers the scan. What should I check?

Ground shared with the board, the part’s supply, SDA and SCL not swapped, and pull-ups on both lines (most breakouts have them; a bare bus needs about 4.7 kΩ to 3.3 V). Then try 100 kHz or 50 kHz.

Can the scan change anything on the bus?

It reads one byte at each address, which no common part treats as a command. Identify writes a register number before reading, as every register read does; it writes no data.

Which other USB-to-I²C adapters work?

For now the MCP2221A (Adafruit’s breakout, Microchip’s ADM00559 and the like). FTDI’s FT232H needs its Windows driver replaced with WinUSB through Zadig before a browser can reach it, so it is not supported yet; a Saleae or sigrok capture of the bus opens in the logic analyser viewer.

Is anything sent to a server?

No. The page talks to the adapter from this tab only; there is no server that could receive the data.

Straight to a job

  • MCP2221A GPIO and ADC from the browser: Set the MCP2221A’s four GP pins as inputs, outputs or analog inputs, switch outputs, and read voltages on ADC1 to ADC3 with the supply or an internal reference.

Related tools

  • Logic analyser capture viewer and protocol decoders: Saleae CSV/binary, sigrok .sr and VCD captures decoded as UART, CAN, LIN, SPI and I²C, on a waveform with zoom; CSV, ASC and candump export.
  • Serial terminal (Web Serial): UART console in the browser: baud, parity, text/hex, timestamps, log to file, macros, DTR/RTS; a live plotter and send/expect scripts.
  • Electronics calculators: Divider/ADC, NTC, pull-ups, RC/PWM filter, wire drop, power and heat, CAN bus length.
  • Cortex-M debugger in the browser (ST-LINK, CMSIS-DAP): Halt, step and reset an Arm Cortex-M; watch and write global variables from the ELF live with plots; SEGGER RTT terminal; live SVD peripheral registers; breakpoints, watchpoints and HardFault capture. Over WebUSB, nothing to install.
  • ECU test bench: lab supply, multimeter, relays, PPK2: Drive the instruments on an ECU bench from the browser: a lab power supply (SCPI on LAN or USB, Korad, Riden), a multimeter, a USB relay board for KL30 and KL15, and a Nordic PPK2. Live charts, voltage profiles, ignition cycles and a sleep-current test. Or try the simulated bench.

Also useful for: i2c scanner, i2cdetect, i2c tool, usb to i2c, i2c register read, eeprom dump, 24c02, bme280, ina219, mpu6050.