Writing An OLED Display Driver In MicroZig

Although most people would use C, C++ or MicroPython for programming microcontrollers, there are a few more obscure options out there as well, with MicroZig being one of them. Recently [Andrew Conlin] wrote about how to use MicroZig with the Raspberry Pi RP2040 MCU, showing the process of writing an SSD1306 OLED display driver and running it. Although MicroZig has since published a built-in version, the blog post gives a good impression of what developing with MicroZig is like.

Zig is a programming language which seeks to improve on the C language, adding memory safety, safe pointers (via option types), while keeping as much as possible of what makes C so useful for low-level development intact. The MicroZig project customizes Zig for use in embedded projects,  targeting platforms including the Raspberry Pi MCUs and STM32.  During [Andrew]’s usage of MicroZig it was less the language or supplied tooling that tripped him up, and more just the convoluted initialization of the SSD1306 controller, which is probably a good sign. The resulting project code can be found on his GitHub page.

Interposer Helps GPS Receiver Overcome Its Age

We return to [Tom Verbeure] hacking on Symmetricom GPS receivers. This time, the problem’s more complicated, but the solution remains the same – hardware hacking. If you recall, the previous frontier was active antenna voltage compatibility – now, it’s rollover. See, the GPS receiver chip has its internal rollover date set to 18th of September 2022. We’ve passed this date a while back, but the receiver’s firmware isn’t new enough to know how to handle this. What to do? Build an interposer, of course.

You can bring the module up to date by sending some extra init commands to the GPS chipset during bootup, and, firmware hacking just wasn’t the route. An RP2040 board, a custom PCB, a few semi-bespoke connectors, and a few zero-ohm resistors was all it took to make this work. From there, a MITM firmware wakes up, sends the extra commands during power-on, and passes all the other traffic right through – the system suspects nothing.

Everything is open-source, as we could expect. The problem’s been solved, and, as a bonus, this implant gives a workaround path for any future bugs we might encounter as far as GPS chipset-to-receiver comms are concerned. Now, the revived S200 serves [Tom] in his hacking journeys, and we’re reminded that interposers remain a viable way to work around firmware bugs. Also, if the firmware (or the CPU) is way too old to work with, an interposer is a great first step to removing it out of the equation completely.

The Perfect Pi Pico Portable Computer

[Abe] wanted the perfect portable computer. He has a DevTerm, but it didn’t quite fit his needs. This is Hackaday after all, so he loaded up his favorite CAD software and started designing. The obvious choice here would be a Raspberry Pi. But [Abe] didn’t want to drop in a Linux computer — he was going for something a bit smaller.

An RP2040 Pico would be a perfect fit. Driving a display with the Pico can be eat a lot of resources though. The solution was a PicoVision from Pimoroni. PicoVision uses two RP2040 chips. One drives an HDMI port, while the other is free to run application software. This meant a standard HDMI screen could be used.

The keyboard was a bit harder. After a lot of searching, [Abe] found an IR remote designed for smart TVs. The QWERTY keyboard was the perfect size but didn’t have an interface he could use. He fixed that with an adapter PCB including an I2C GPIO expander chip. A bit of I2C driver software later, and he had a working input keyboard.

Hardware doesn’t do anything without software though. The software running on the handheld is called Slime OS, and the source is available at [Abe’s] GitHub. It’s a launcher, with support for applications written in python. [Abe] has a few basic demos working, but he’s looking for help to get more features up and running.

Although it wasn’t quite what [Abe] was after, our own [Donald Papp] came away fairly impressed when he gave the DevTerm a test drive back in 2022. Something to consider if you’re looking for a Linux handheld and not quite ready to build one yourself.

Continue reading “The Perfect Pi Pico Portable Computer”

A 36-key monoblock split keyboard with three thumb keys on each side.

Lorem Ipsum 36? Dolor Sit Amet Keyboard!

You know, it’s a tale as old as custom mechanical keyboards. [penkia] couldn’t find any PCBs with 36 keys and Gateron low-profile switch footprints, so they made their own and called it the LoremIpsum36. Isn’t it lovely?

Close-up of the RP2040 sitting flush as can be in the PCB.This baby runs on an RP2040, which sits flush as can be in a cutout in the PCB. This maneuver, along with the LP switches in hard-to-find SK-33 sockets results in quite the thin board.

[penkia] says that despite using a 3 mm tray for added rigidity, the entire thing is thinner than the Nuphy Air60 v2, which is just over half an inch (13.9 mm) thick. For keycaps, [penkia] has used both XVX profile and FKcaps’ LPF.

And yeah, that area in the middle is crying out for something; maybe a trackball or something similar. But [penkia] is satisfied with it as-is for the first version, so we are, too.

Do you like 36-key boards, but prefer curves? Check out the Lapa keyboard, which doubles as a mouse.

An Instant Gratification Game Boy Printer

When the Game Boy Printer was released back in 1998, being able to produce a hard-copy of your Pokémon diploma or your latest Game Boy Camera snapshot at the touch of a button was was pretty slick indeed. But in our modern paperless society, the GB Printer somehow sticks out as even more archaic than the other add-on’s for Nintendo’s iconic handheld. Even among the folks who are still proudly playing the games that support the Printer, nobody actually wants to print anything out — although that doesn’t mean they don’t want to see the images.

The TinyGB Printer, developed by [Raphaël BOICHOT] and [Brian KHUU], could be considered something of a Game Boy Non-Printer. Powered by the RP2040 Zero development board, this open source hardware device plugs into your Game Boy and is picked up by all the games as a legitimate Printer. But instead of cranking out a little slip of thermal paper once you hit the button, the image is displayed in all its 240×240 glory on a 1.3 inch TFT display mounted to the top of the board.

Continue reading “An Instant Gratification Game Boy Printer”

img showing terminal and pico

I3C Bit-banging Fun For The RP2040

The RP2040 has quickly become a hot favorite with tinkerers and makers since its release in early 2021. This is largely attributed to the low cost, fast GPIOs, and plethora of bus peripherals. [xyphro] has written the I3C Blaster firmware that helps turn the Raspberry Pi Pico into a USB to I3C converter.

The firmware is essentially a bit-bang wrapper and exposes an interactive shell with a generous command set. But it is a lot more than that. [xyphro] has taken the time to dive into the I3C implementation standard and the code is a fairly complex state-machine that is a story on its own.

[xyphro] provides a Python script in case you feel like automating things or drawing up your GUI. And finally, if you are feeling adventurous, the I3C implementation is available for your project tinkering needs.

We loved the fact there is a branch project that lets you extend a Saleae Logic Analyzer to decode I3C and associated protocols by adding a Pico on the cheap. The last update to the project log shows the addition of a MIPI I3C High Data Rate Mode which operates at 25 Mbps which is right up the RP2040s.

[xyphro] gave us the Home Brew Version Of Smart Tweezers a decade ago and we expect there is more to come. If you are interested in reading more about the I3C bus, have a look at I3C — No Typo — Wants To Be Your Serial Bus.

The Business Card Of DOOM

This account of running DOOM on a PCB business card isn’t really about serving the “Will it DOOM?” meme of getting the classic game to run on improbable hardware. Rather, this project has more to do with getting it done right and leveraging work that’s already been done.

We’ll explain. You may recall [rsheldiii]’s previous DOOM keycap build, which was quite an accomplishment for someone who doesn’t fancy himself a hardware hacker. But he made a fair number of compromises to pull that build off, and rather than letting those mistakes propagate, he decided to build a more general platform to serve as a jumping-off point for the DOOM building community. The card is centered on the RP2040, which keeps things pretty simple. The card has a tiny LCD screen along with USB jacks for power and a keyboard, so you can actually play the game. It also has GPIO lines brought out to pads on the edge of the board, in case you want to do something other than play the game, which is shown in the brief video below.

Pretty standard stuff, right? Perhaps, but where this project stands out for us is that it stresses the importance of relying on reference circuits. We’ve all seen projects that have been derided for pulling the example circuit from the datasheet, but as [rsheldiii] points out, that seems a little wrongheaded. Component manufacturers put a lot of effort into those circuits, and they don’t do it out of the goodness of their hearts. Yes, they want to make it easier for engineers to choose their parts, but in doing so they’ve done a lot of the work for you. Capitalizing on that work wherever possible only makes sense, and in this case the results were perfect for the task at hand.

Continue reading “The Business Card Of DOOM