Pico Makes Capable Logic Analyzer

A common enough microcontroller project is to create some form of logic analyzer. In theory, it should be pretty easy: grab some digital inputs, store them, and display them. But, of course, the devil is in the details. First, you want to grab data fast, but you also need to examine the trigger in real time — hard to do in software. You may also need input conditioning circuitry unless you are satisfied with the microcontroller’s input characteristics. Finally, you need a way to dump the data for analysis. [Gusmanb] has tackled all of these problems with a simple analyzer built around the Raspberry Pi Pico.

On the front and back ends, there is an optional board that does fast level conversion. If you don’t mind measuring 3.3 V inputs, you can forego the board. On the output side, there is custom software for displaying the results. What’s really interesting, though, is what is in between.

The simple PCB is completely optional.

The Pico grabs 24 bits of data at 100 MHz and provides edge and pattern triggers. This is impressive because you need to look at the data as you store it and that eats up a few instruction cycles if you try to do it in software, dropping your maximum clock rate. So how does this project manage it?

It uses the Pico’s PIO units are auxiliary dedicated processors that aren’t very powerful, but they are very fast and deterministic. Two PIO instructions are enough to handle the work for simple cases. However, there are two PIOs and each has four separate state machines. It still takes some work, but it is easier than trying to run a CPU at a few gigahertz to get the same effect. The fast trigger mode, in particular, abuses the PIO to get maximum speed and can even work up to 200 MHz with some limitations.

If you want to try it, you can use nothing more than a Pico and a jumper wire as long as you don’t need the level conversion. The project page mentions that custom software avoids using OpenBench software, which we get, but we might have gone for Sigrok drivers to prevent having to reinvent too many wheels. The author mentions that it was easier to roll your own code than conform to a driver protocol and we get that, too. Still, the software looks nice and even has an SPI protocol analyzer. It is all open source, so if you want other protocols before the author gets to them, you could always do it yourself.

If you do want a Pico and Sigrok, we’ve covered a project that does just that. Most of the logic analyzers we use these days we build into our FPGA designs.

GGWave Sings The Songs Of Your Data

We’re suckers for alternative data transmission methods, and [Georgi Gerganov]’s ggwave made us smile. At its core, it’s doing what the phone modems of old used to do – sending data encoded as different audio tones. But GGwave does this with sophistication!

It splits the data into four-bit chunks, and uses 16 different frequency offsets to represent each possible value. But for each chunk, these offsets are added to one of six different base frequencies, which allows the receiving computer to tell which chunk it’s in. It’s like a simple framing concept, and it makes the resulting data sound charmingly like R2-D2. (It also uses begin and end markers to be double-sure of the framing.) The data is also sent with error correction, so small hiccups can get repaired automatically.

What really makes ggwave shine is that it’s ported to every platform you care about: ESP32, Arduino, Linux, Mac, Windows, Android, iOS, and anything that’ll run Python or JavaScript. So it’ll run in a browser. There’s even a GUI for playing around with alternative modulation schemes. Pshwew! This makes it easy for a minimalist microcontroller-based beeper button to control your desktop, or vice-versa. An ESP32 makes for an IoT-style WiFi-to-audio bridge. Write code on your cell phone, and you can broadcast it to any listening microcontroller. Whatever your use case, it’s probably covered.

Now the downside. The data rate is slow, around 64-160 bits per second, and the transmission is necessarily beepy-booopy, unless you pitch it up in to the ultrasound or use the radio-frequency HackRF demo. But maybe you want to hear when your devices are talking to each other? Or maybe you just think it’s cute? We do, but we wouldn’t want to have to transmit megabytes this way. But for a simple notification, a few bytes of data, a URL, or some configuration parameters, we can see this being a great software addition to any device that has a speaker and/or microphone.

Oh my god, check out this link from pre-history: a bootloader for the Arduino that runs on the line-in.

Continue reading “GGWave Sings The Songs Of Your Data”

A clock with a VFD display in an orange TV-like case

Never Miss An Email With This 1970s Style Desktop Notifier

If you like the 1970s aesthetic but think bell-bottoms, big hair and psychedelic wallpaper are a bit too much in this day and age, you might want to have a look at [Pierre Muth]’s latest build, The Absurd Notifier. It’s a useful desk accessory that adds just a little bit of ’70s flair to your office: housed inside what looks like an orange TV standing on shiny metal feet is a little gadget that can tell you if you’ve got important email messages waiting or an appointment coming up.

[Pierre] built the system around a Garmin Vivosmart 3 smartwatch that he bought very cheaply because it had a broken display. The display’s pinout and protocol were of course undocumented, so [Pierre] hooked up his logic analyzer to try and figure out how it worked. It turned out to be a simple SPI setup, and with a bit of trial and error he was able to extract the images that the watch was sending out.

To replace the broken screen, [Pierre] turned to some 128×64 pixel VFD displays that he had left over from an earlier project. Their resolution was exactly the same as the Garmin’s original OLED display, but their interface wasn’t: the VFDs expected 115k2 serial data. Programming a PIC microcontroller with an SPI port on one side and a UART port on the other made for a simple bridge between the two.

[Pierre] then designed and 3D printed a case reminiscent of a 1970s TV, with matching bright orange color. The end result is a funky little retro clock that shows notifications on a vintage green display. If you like desktop notifiers, we seen several neat ones alerting their owners about things ranging from new YouTube subscribers to the ISS passing by.

Continue reading “Never Miss An Email With This 1970s Style Desktop Notifier”

Raspberry Pi Pico “Modchip” Unlocks The GameCube

In terms of units sold, it’s no secret that the GameCube was one of Nintendo’s poorest performing home consoles. You could argue increased competition meant sales of the quirky little machine were destined to fall short of the system’s legendary predecessors, but that didn’t keep the Wii from outselling it by a factor of five a few years later. Still, enough incredible games were released for the GameCube that the system still enjoys a considerable fanbase.

Now, with the release of PicoBoot by [webhdx], we suspect the GameCube is about to gain a whole new generation of fans. With just a Raspberry Pi Pico, some jumper wires, and a widely available third-party SD card adapter, this open source project bypasses the console’s original BIOS so it can boot directly into whatever homebrew application the user selects. With how cheap and easy to perform this modification is, we wouldn’t be surprised if it kicked off something of a renaissance for GameCube homebrew development.

Installation takes just five wires.

In the video after the break, [Tito] of Macho Nacho Productions provides a rundown of this new project, including a fantastic step-by-step installation guide that covers everything from soldering the jumper wires to the console’s motherboard to getting the firmware installed on the Pico. He then demonstrates booting the console into various community developed front-ends and tools, showing just how versatile the modification is. While some will see this as little more than an easier way to run bootleg games, we can’t help but be excited about what the future holds now that getting your own code to run on the system is so easy.

Alright, maybe it’s not so easy. To solder on the five wires that will eventually snake their way to the GPIO pins of the Pi Pico, you’ll need to strip the console all the way down to the main board. That wouldn’t be too bad itself, but unfortunately to reach two of the connections you’ll need to remove the system’s massive heatsink — which means you’ll need to clean up the old sticky thermal pads and apply new ones if you don’t want your GameCube to turn into a GameCrisp. It’s nothing that would scare off the average Hackaday reader, but it might give pause to those less handy with an iron.

The release of PicoBoot comes hot on the heels of the revelation that the Raspberry Pi Pico can be used not only as an N64 flash cart but as a supercharged PlayStation Memory Card. These projects would all be significantly improved with a custom RP2040 board, and no doubt that’s the direction they’ll eventually head, but it’s hard not to be impressed by what the low-cost microcontroller development board is capable of in its native form. Especially now that it comes in WiFi flavor.

Continue reading “Raspberry Pi Pico “Modchip” Unlocks The GameCube”

UART Can’t? Arduino CANSerial Can!

[Jacob Geigle] had a problem. A GPS unit and a Bluetooth-to-serial were tying up all the hardware UARTs on an AVR Arduino project. “Software serial”, I hear you say. But what if I told you [Jacob] already had the board in question sending out data over CAN bus?

[Jacob]’s sweet hack creates an arbitrary number of CAN “devices” inside the Arduino code, and can treat each one of them as its own serial data channel. The “N” in CAN stands for network, after all. The trick is to create a device ID for each desired CANSerial interface, which is done in his library using the usual Arduino setup step. A buffer takes care of storing all the different channels until they can be pushed out over the hardware CAN peripheral. On the big-computer side of things, some software listens for the different “device” enumeration IDs and assigns each a virtual serial port.

While this was a hack born of necessity, we can see it as a clever opportunity to segregate information coming from the microcontroller into different streams. Maybe a debug channel, a command channel, and a data channel? They’re virtual devices, so go nuts!

While we usually see CANbus in its native habitat – inside your car – it’s also cool to think of the uses we could put it to. For instance, controlling a 3D printer. Need a CAN refresher? We’ve got just the ticket.

[Bus photo: Malta Bus; The terminus, Valletta by John Haslam. Can photo: Paint Cans by Daniel R. Blume. Horrible visual pun: I’m afraid that’s on us. You try finding images for CANbus code!]

Raspberry Pi Pico W Adds Wireless

News just in from the folks at Raspberry Pi: the newest version of their Pico has WiFi and is called, obviously, the Pico W. We were going to get our hands on a sample unit and kick its tires, but it’s stuck in customs. Boo! So until it shows up, here’s what we can glean from the press releases and documentation.

The Pico is, of course, the Raspberry Pi microcontroller dev board based on their RP2040 microcontroller. This in turn has two Cortex M0+ cores and a good chunk of onboard RAM, which has made it a popular target for MicroPython. They had some extra real estate on the PCB, so they’ve added an Infineon CYW43439 WiFi chip, and voila: Pico W.

As of now, the WiFi is supported in both the C SDK and the pre-baked MicroPython image. It looks trivially easy to get it working, and it’s based on the time-tested lwIP stack, a classic in the embedded world. The CYW43439 is also Bluetooth capable, but there’s no firmware support for that yet, but we wouldn’t be surprised if it showed up soon.

The price? $6 for the whole shooting match. You can view this two ways: a small $2 premium over the old Pico, or a price increase of 50%. How you see things probably depends on your order quantity. Either way, it’s firmly in the ESP32 module price range, so you’ve got some comparison shopping to do if your project needs a microcontroller and WiFi. And in these days of silicon shortages, it’s nice to have a couple of options.

Bare-Metal STM32: Adding An Analog Touch With ADCs

An Analogue to Digital Converter (ADC) is at its core a straight-forward device: by measuring an analog voltage within a set range and converting the measured level to a digital value we can use this measurement value in our code. Through the use of embedded ADCs in microcontrollers we can address many essential use cases, ranging from measuring the setting on a potentiometer, to reading an analog output line on sensors, including the MCU’s internal temperature and voltage sensors.

The ADCs found in STM32 MCUs have a resolution between 12 to 16 bits, with the former being the most common type. An ADC can be configured to reduce this resolution, set a specific sampling speed, and set up a multi-mode configuration depending on the exact ADC peripheral. STM32 MCUs feature at least a single ADC peripheral, while some have multiple. In this article we will take a look at how to configure and use the basic features of the ADCs in STM32 MCUs, specifically the ADCs found in F0 and the ADC5_V1_1 type as found in most F3-family MCUs.

Continue reading “Bare-Metal STM32: Adding An Analog Touch With ADCs”