Please ensure that JavaScript is enabled in your browser to view this page.
Electrical engineer and self-described "Internet of Things enthusiast" Renze Nicolai has released a new firmware for the low-cost Raspberry Pi Pico board, designed to turn it — or other RP2040-based boards — into a USB to I2C adapter.
"This RP2040 firmware implements the USB protocol expected by the I2C-Tiny-USB kernel driver, allowing the use of a Raspberry Pi Pico as USB to I2C adapter," Nicolai explains. "This firmware is a complete re-implementation of the [I2C-Tiny-USB] firmware for use with the RP2040."
The original I2C-Tiny-USB project sought to offer an easy way to interface I2C devices with a PC, doing away with the at-the-time traditional parallel-port adapters in favor of USB — using Microchip's ATmega range of microcontrollers to bridge the two. It was built primarily with the tinyUSBboard range in mind, a family of Arduino-compatible microcontroller boards built with a view to their use in implementing custom USB devices.
The Raspberry Pi Pico, meanwhile, is increasingly popular — and manages to beat out the already-affordable tinyUSBboard, priced at $4.99 as a partially-complete kit, at just $4 per board fully assembled. With stock easily available, even during these times of ongoing component shortages, it makes sense to use the Raspberry Pi Pico as the basis for a reimplementation of the firmware.
Nicolai has published full source code for the project, including examples, on GitHub — but warns anyone looking to turn their Raspberry Pi Pico or compatible into an I2C adapter that "more testing is needed to verify that the firmware works correctly," and it should be treated as "proof of concept status."
Hackster.io, an Avnet Community © 2022