Thursday, June 27, 2024

Feather of the Day: Adafruit Feather RP2040 with USB Type A Host #Adafruit #Feather

The Adafruit Feather ecosystem is so rich with hardware diversity, we wanted to share them, one each day. Today is the Adafruit Feather RP2040 with USB Type A Host!

You’re probably really used to microcontroller boards with USB, but what about a dev board with two? Two is more than one, so that makes it twice as good! And the Adafruit Feather RP2040 with USB Host is definitely double-the-fun of our other Feather RP2040 boards, with a USB Type A port on the end for connecting USB devices to.

Now you might be thinking “hey waitaminute, the RP2040 doesn’t have two USB port peripherals???” and you’d be correct! But what it does have is a nifty PIO peripheral that can be (ab)used to emulate a USB host peripheral. You get to keep the main USB port for uploading, debugging, and data communication, while at the same time sending and receiving data to just-about-any USB device. This work is originally by sekigon on GitHub, and if you’re using Pico SDK that’s still the recommended library to use.

Currently, support for the USB Host peripheral is only in Arduino. So check out the TinyUSB ‘dual role’ examples for some things you can do! For example, datalogging to a USB Key. Or reading from another device/microcontroller that has USB CDC serial interface. Or creating an HID re-mapper. Or connecting to weird devices that require firmware-updates like the Cypress EZ-USB based Intellikeys communications board.

Note that this is definitely a firmware hack: you will need to dedicate the second ARM core and both PIO peripherals to just handling the USB messages, but we find that it does work fairly well, or at least as well as most microcontroller USB Host peripherals!

We also include a 1 Amp boost converter based on the TPS61023 so you can run from Lipo battery and get a nice clean 5V output for the USB devices. The booster has the enable pin tied to one of the extra GPIO on the RP2040 so power can be manually turned on and off to hard-reset whatever is connected.

At the Feather’s heart is an RP2040 chip, clocked at 133 MHz and at 3.3V logic, the same one used in the Raspberry Pi Pico. This chip has a whopping 8MB of onboard QSPI FLASH and 264K of RAM!  There’s even room left over for a STEMMA QT connector for plug-and-play of I2C devices!

USE

The Adafruit Feather RP2040 with USB Type A Host Guide provides all the details and use examples.

Projects:

Would you like to see this Feather in action? Check out the project below:

In stock! You can buy the Adafruit Feather RP2040 with USB Type A Host in the Adafruit shop.

No comments:

Post a Comment