A Pi Pico connected to a MYIR Z-turn board with a set of jumper wires

Need A JTAG Adapter? Use Your Pico!

JTAG is a powerful interface for low-level debugging and introspection of all kinds of devices — CPUs, FPGAs, MCUs and a whole lot of complex purpose-built chips like RF front-ends. JTAG adapters can be quite obscure, or cost a pretty penny, which is why we’re glad to see that [Adam Taylor] from [ADIUVO] made a tutorial on using your Pi Pico board as a JTAG adapter. This relies on a project called XVC-Pico by [Dhiru Kholia], and doesn’t require anything other than a Pi Pico board itself — the XVC-Pico provides both a RP2040 firmware implementing the XVC (Xilinx Virtual Cable) specification and a daemon that connects to the Pico board and interfaces to tools like Vivado.

First part of the write-up is dedicated to compiling the Pico firmware using a Linux VM. There’s a pre-built .uf2 binary available in the GitHub repo, however, so you don’t have to do that. Then, he compiles and runs a daemon on the PC where the Pico is connected, connects to that daemon through Vivado, and shows successful single-stepping through code on a MYIR Z-turn board with a Xilinx XC7Z020. It’s worth remembering that, if your FPGA’s (or any other target’s) JTAG logic levels are 1.8V or 2.5V-based, you will need a level shifter between it and the Pi Pico, which is a board firmly in the 3.3V realm.

You just cannot beat the $3 price and the ease of setup. Pi Pico is shaping up to be more and more of a hardware multi-tool. Just a month ago, we covered how the Pico can work as a logic analyzer. A lot of that, we have the PIO peripherals to thank for — an assembly of state machines that even let you “bitbang” high-speed interfaces like DVI. If you’re interested in how PIO functions, there are some good write-ups around here. Lacking a Pi Pico, you can use this board’s bigger sister to interface with JTAG, too.

Screenshot of Pulseview showing capture and decode of some digital channels

Need A Logic Analyzer? Use Your Pico!

There’s a slew of hardware hacker problems that a logic analyzer is in a perfect position to solve. Whether you’re trying to understand why an SPI LCD screen doesn’t initialize, what’s up with your I2C bus, or determine the speed of an UART connection, you’ll really want to have a logic analyzer on hand. People have been using a Pi Pico as a logic analyzer in a pinch, and now [pico-coder] has shared a sigrok driver that adds proper support for a Pico to beloved tools like Pulseview.

The specs offered are impressive. Compared to the $10 “Saleae” clone analyzers we are so used to, this thing boasts 21 digital channels with up to 120 MHz capture speed, 3 ADC channels at up to 500 KHz, and hardware-based triggers. The GitHub repository linked above stores the driver files out-of-tree, but provides build instructions together with an easily flash-able uf2 firmware. It’s likely that you’ll soon see this driver in a stock Pulseview installation, however, given the submitter-friendly attitude we’ve witnessed on the sigrok mailing list. However, if you need a logic analyzer ASAP, you should follow the caringly offered quickstart guide.

We’ve covered Pulseview being used in combination with cheap accessible analyzers before — a must-watch if you need to get yourself up to speed on the value they provide to a hobbyist. If an oscilloscope is what you need and a smartphone is what you have, perhaps you’ll enjoy the Scoppy firmware for the Pico.

We thank [mip] for sharing this with us!

Breakbeats Courtesy Of The RP2040

While one often listens to songs or albums in full, sometimes you just want to lay down a simple beat. [todbot]’s latest project promises to do just that.

The build relies on a Raspberry Pi Pico or any other RP2040-based microcontroller board, and is programmed in CircuitPython. The PWM feature is used for audio output, and it’s loaded with different WAV samples of the classic “Amen” break.

Each measure, a random new sample is chosen and played, changing the beat. Even better, all the samples can loop, and they come in varying lengths, allowing them to overlap and lay over each other to add further depth to the mix. It’s a cinch to setup, as CircuitPython has an AudioMixer object built in.

Those wishing to tinker for themselves can find all the code and samples on Github. A build like this one is a great way to start learning about working with audio and music, after all. We’ve seen [todbot]’s work here before, too. Video after the break.

Continue reading “Breakbeats Courtesy Of The RP2040”

Digital Rain Animation Crammed Into Pi Pico

With a new Matrix movie now in cinemas, we’ve all been reminded of those screensavers that were just the coolest thing ever when the original film dropped in 1999. [en0b] decided to recreate the classic “digital rain” effect on the Raspberry Pi Pico, using up all the little microcontroller’s storage in the process.

Rather than rely on existing graphics libraries, [en0b] set about using a high-quality GIF for the animation. The original file was 8 MB, which was far too big to fit on the Pico. After some finagling in an image editor and with the help of a custom Python script, however, [en0b] managed to fit the 127-frame animation at 240 x 135 resolution into the 2 MB Flash onboard the chip. With the microcontroller hooked up to the 1.14″ IPS “Pico Display” from Pimoroni, the final looks great and faithfully recreates the aesthetic seen in the film.

[en0b]’s technique could reliably be used for displaying any GIF that you can cut down to 14 to 16 colors without losing too much quality. It’s not the world’s highest-end graphics format, but it does the job for little animations like these.

We’ve seen similar builds before too, using more heavy-duty hardware to build a magic 8-ball in much the same way. Meanwhile, if you’ve got your own neat little GIF hacks or Pico projects, don’t hesitate to send them in!

Build A Dog Ball Launcher That Kinda Looks Like A Dog

The average garden dog will play fetch long beyond the average human’s endurance. If you want to keep your dog exercised without hurting your pitching arm, [brankly’s] automatic dog ball launcher might just be what you need.

The design is straightforward. The 3D printed housing features a large funnel into which a ball can be dropped. A servo then holds the ball while a pair of rollers are spun up by brushed DC motors. After two seconds, the servo releases the ball towards the rollers which launch the ball out of the machine. A Raspberry Pi Pico runs the show, controlling the timing of the ball launch and varying the motor speed to change the distance the ball is launched on each firing.

Files are available on Thingiverse for those eager to build their own. If you’re good, you might even be able to train your dog to drop the ball in themselves. We’ve seen similar builds before, too! Video after the break.

Continue reading “Build A Dog Ball Launcher That Kinda Looks Like A Dog”

Raspberry Pi Pico Makes For Expeditious Input Device

With its copious number of GPIO pins and native USB, the Raspberry Pi Pico is arguably the ideal microcontroller for developing your own platform agnostic USB Human Input Devices. But you don’t have to take our word for it. Check out how quickly the $4 USD board allowed [Alberto Nunez] to put together a pair of foot pedals for his computer.

Wiring doesn’t get much easier than this.

A peek inside the enclosure reveals…well, not a whole lot. All that’s hiding inside that heavy-duty plastic box is the Pi Pico and some screw down terminals that let [Alberto] easily wire up the female bulkhead connectors for the pedals themselves. Incidentally, while you could certainly make your own pedals, the ones used for this project appear to be the sort of commercially available units we’ve seen used in similar projects.

With the hardware sorted, [Alberto] just needed to write the software. While he could have taken the easy way out and hard coded everything, we appreciate that his CircuitPython script loads its configuration from a text file. This allows you to easily configure which GPIO pins are hooked up to buttons, and what key codes to associate them with. He didn’t really need to go through this much effort for his own purposes, but it makes the project far easier to adapt for others, so our hats off to him.

If you’re looking for a bit more inspiration, our very own [Kristina Panos] put together a Python-powered macro foot stool that you can put under your desk for rapid fire keyboard shortcuts. Plus you can stand on it to reach the top shelf, if need be.

Pi Pico Emulates ROM For Speedy Retro Hacking

If you’ve ever worked on a system that loads its software from a ROM or EPROM, you know how much of a hassle it can be to make frequent changes to the code. Pulling the chip, flashing it, and sticking it back into the socket each time you change a line isn’t anyone’s idea of a good time. Which is why [Nick Bild] has come up with the PicoROM, a way to emulate a ROM chip using the Raspberry Pi Pico.

With the Pi Pico standing in for the original ROM, updating firmware takes a fraction of the time and doesn’t require you to actually disconnect any of the hardware. [Nick] had done something similar with FPGAs in the past, but the far cheaper and easier to work with Pi Pico makes this version particularly appealing. The secret to getting it to work is the overclocking potential of the Pico, which he says has been pushed to 400 MHz for this particular application.

PicoROM on a breadboard.

The downside is that you can’t access the Pico’s onboard flash when the chip is running that fast. To get around that limitation, all of the code is loaded into the microcontroller’s RAM. With a healthy 264 KB of memory this isn’t really a problem when emulating 32 KB chips, but [Nick] says his method would quickly fall apart for larger ROMs.

Beyond the Pi Pico itself, [Nick] is using a trio of 74LVC245AN 8-bit logic level shifters so the chip can talk to the 5 V logic of his homebrew 6502 computer. With everything wired up on a simple breadboard, PicoROM has no trouble serving up the operating system as it hums along at 2 MHz.

Of course, a modern high-performance microcontroller isn’t strictly necessary. In the past we’ve covered devices that could emulate an EPROM using 1990s era silicon.