I2C Pico USB Adapter: Part 1 - Introduction

In this series of posts I will describe my latest project: an I2C to USB adapter that can be constructed with an RP2040 or RP2350 board.

The adapter using a XIAO RP2040 connected to a PCF8583 RTC+RAM

This project is an adaptation of i2c-tiny-usb, a project with the same goals but built with an ATtiny microcontroller.

The main idea is an adapter that plugs in a PC's USB port and allows the connection of one or more I2C devices. Programs running on the PC can interact with the I2C devices through USB messages,

When I found the i2c-tiny-usb project, it looked like the RP2040 (or RP2350) would be a good fit, as it is easily available, cheap, and has full USB hardware (USB is implemented in software on the ATtiny by some clever bit-banging). As we will see in the next parts, things were more challenging than I thought.

Only the USB port and a pair of GPIOs are needed for a minimal adapter, so you can use one of the small RP boards if you want a compact device.

For the firmware development, I used the Pico C SDK. As the USB is used for communication with the PC a pico debug probe was very helpful.

Another thing that attracted me to this project is the availability of driver and library support for the adapter under Linux, Windows, and Mac. In the last part of this series we will take a quick look at this (for Linux and Windows, I do not have a Mac).


Comments

Popular posts from this blog

Using the PIO to Interface a PS/2 Keyboard