Close To The Metal

Firmware is caught between hardware and software. What do I mean? Microcontroller designers compete on how many interesting and useful hardware peripherals they can add to the chips, and they are all different on purpose. Meanwhile, software designers want to abstract away from the intricacies and idiosyncrasies of the hardware peripherals, because code wants to be generic and portable. Software and hardware designers are Montagues and Capulets, and we’re caught in the crossfire.

I’m in the middle of a design that takes advantage of perhaps one of the most idiosyncratic microcontroller peripherals out there – the RP2040’s PIOs. Combining these with the chip’s direct memory access (DMA) controllers allows some fairly high-bandwidth processing, without bogging down the CPUs. But because I want this code to be usable and extensible by a wide audience, I’m also trying to write it in MicroPython. And configuring DMA controllers is just too idiosyncratic for MicroPython.

But there’s an escape hatch. In my case, it’s courtesy of the machine.mem32 function, which lets you read and write directly into the chip’s memory, including all of the memory-mapped configuration registers. Sure, it’s absurdly low-level, but it means that anything you read about in the chip’s datasheet, you can do right away, and from within the relative comfort of a Micropython program. Other languages have their PEEK and POKE equivalents as well, or allow inline assembler, or otherwise furnish you the tools to get closer to the metal without having to write all the rest of your code low level.

I’m honestly usually a straight-C or even Forth programmer, but this experience of using a higher-level language and simultaneously being able to dive down to the lowest levels of bit-twiddling at the same time has been a revelation. If you’re just using Micropython, open up your chip’s datasheet and see what it can offer you. Or if you’re programming at the configure-this-register level, check out the extra benefits you can get from a higher-level language. You can have your cake and eat it too!

Try It Out

It’s like Star Wars versus Star Trek at a SciFi convention, or asking creamy or chunky at the National Peanut Butter Appreciation Festival. (OK, we made that one up.) When Jenny reviewed the 1.0 version of LibrePCB, it opened the floodgates. Only on Hackaday!

Of course it makes sense that in a community of hardware hackers, folks who are not unfamiliar with the fine art and engineering of designing their own PCBs, have their favorite tools. Let’s face it, all PCB design software is idiosyncratic, and takes some learning. But the more fluent you are with your tool of choice, the more effort you have invested in mastering it, leading to something like the sunk-cost phenomenon: because you’ve put so much into it, you can’t think of leaving it.

The beauty of open-source software tools is that there’s almost nothing, aside from your own psychology, stopping you from picking up another PCB program, kicking the proverbial tires with a simple design, and seeing how it works for you. That’s what Jenny did here, and what she’s encouraged me to do. Whether it’s beginner-friendly Fritzing (also recently in version 1.0), upstarts LibrePCB or Horizon EDA, heavyweight champion KiCAD, or the loose-knit conglomeration of tools in coralEDA, you have enough choices that something is going to fit your PCB hand like a glove.

I certainly wouldn’t risk a swap up to a new tool on something super complicated, or something with a tight deadline, but why not start up a fun project to test it out? Maybe follow Tom Nardi’s lead and make a Simple Add-on, for a badge or just as a blinky to put on your desk? Don’t be afraid to try something new!

Horrendous Mess Of Wires

When do you post your projects? When they’re done? When they’re to the basic prototype stage? Or all along the way, from their very conception? All of these have their merits, and their champions.

In the post-all-along-the-way corner, we have Hackaday’s own [Arya Voronova], who outlines the many ways that you can start documenting your project before it’s even a fully fledged project. She calls these tidbits “breadcrumbs”, and it strikes me as being a lot like keeping a logbook, but doing it in public. The advantages? Instead of just you, everyone on the Internet can see what you’re up to. This means they can offer help, give you parts recommendations, and find that incorrect pinout that one pair of eyes would have missed. It takes a lot of courage to post your unfinished business for all to see, but ironically, that’s the stage of the project where you stand to gain the most from the exposure.

On the opposite end of the spectrum are the folks who document their projects at the very end. We see a ton of these on Hackaday.io and in people’s personal blogs. It’s a great service to the community, frankly, because at that point, you’re already done with the project. This is the point where the reward, for you, is at its minimum, but it’s also the point where you feel least inhibited about sharing if you’re one of those people who are afraid of showing your work off half-done. The risk here, if you’re like me, is that you’re already on to the next project when one is “done”, and going back over it to make notes seems superfluous. Those of you who do it regardless, we salute you!

And then there’s the middle ground. When you’re about one third of the way done, you realize that you might have something half workable, and you start taking a photo or two, or maybe even typing words into a computer. Your git logs start to contain more than just “fixed more stuff” for each check-in, because what if someone else actually reads this? Maybe you’re to the point where you’ve just made the nice box to put it in, and you’re not sure if you’ll ever go back and untangle that rat’s nest, so you take a couple of pictures of the innards before you hot glue it down.

I’m a little ashamed I’m probably on the “post only when it’s done” end of things than is healthy, mostly because I don’t have the aforementioned strength of will to go back. What about you?

Do Bounties Hurt FOSS?

As with many things in life, motivation is everything. This also applies to the development of software, which is a field that has become immensely important over the past decades. Within a commercial context, the motivation  to write software is primarily financial, in that a company’s products are developed by individuals who are being financially compensated for their time. This is often different with Free and Open Source Software (FOSS) projects, where the motivation to develop the software is in many cases derived more out of passion and sometimes a wildly successful hobby rather than any financial incentives.

Yet what if financial incentives are added by those who have a vested interest in seeing certain features added or changed in a FOSS project? While with a commercial project it’s clear (or should be) that the paying customers are the ones whose needs are to be met, with a volunteer-based FOSS project the addition of financial incentives make for a much more fuzzy system. This is where FOSS projects like the Zig programming language have put down their foot, calling FOSS bounties ‘damaging’.

Continue reading “Do Bounties Hurt FOSS?”

Confluence Of Nerdery

You might find yourself, dear Hackaday reader, attracted to some pretty strange corners of the tech world. Who knows when that knowledge of stenography, ancient retrocomputing, and floppy disk internals will all combine to get someone falsely accused out of jail? Go read this story and come on back, but the short version is that [Bloop Museum] helped recover some 40+ year old court evidence off of some floppies to right an old wrong.

If you looked at the combination of extremely geeky topics, you’d say it’s unlikely to find anyone well versed in any one of them, and you’d say that the chances of anyone knowing enough in each these fringe domains to be helpful is exceedingly low. But I’m absolutely sure that the folks at [Bloop Museum] had some more to throw into the mix if they were called for. Or better yet, they might know exactly the right geeks to call in.

And that’s the other heartwarming part of the story. When [Bloop Museum] didn’t know everything about old stenography formats, they knew the right people to reach out to – the Plover open stenography project. Who is going to know more? Nobody! Together, the nerd community is an unstoppable resource.

So remember, when you’re hanging out with your geek friends, to keep a running catalog of everyone’s interests. Because you never know when you’re going to need an expert in re-gilding frames, or relocating bee hives, or restoring 1930’s radio sets. Or decoding obscure data formats to get someone out of jail.

Hackaday Halloween

We’re running the 2023 Halloween Hackfest and it’s your chance to document your Halloween projects, and win fame, fortune, or at least one of three $150 DigiKey gift certificates, plus some Arduino schwag courtesy of the contest’s sponsors! You’ve got until the end of October, so get on it!

What Is Killing Cursive? Ballpoints. Probably.

I get it — you hate writing by hand. But have you ever considered why that is? Is it because typing is easier, faster, and more convenient here in 2023? Maybe so. All of those notwithstanding, I honestly think there’s an older reason: it’s because of the rise of ballpoint pens. And I’m not alone.

Bear with me here. Maybe you think you hate writing because you were forced to do it in school. While that may very well be, depending on your age, you probably used a regular wood-case pencil before graduating to the ballpoint pen, never experiencing the joys of the fountain pen. Well, it’s never too late.

Continue reading “What Is Killing Cursive? Ballpoints. Probably.”

Inspiration

While we were debating about whether it even makes any sense to reboot RadioShack, or indeed any brick-and-mortar electronics store in the modern era, Dan Maloney and I stumbled on what probably is the real source of all of our greybeard nostalgia for the store chain: inspiration.

For both of us, the appeal of a store like RadioShack was going through the place and thinking of what you’d do with all of those parts. Looking at the back of the beefiest MOSFET in the joint, you’d think about all the current you could pass with it. Or what you’d do with all of those piezo buzzers. And if you didn’t know yet what electronics project you wanted to make, there were things like the Forrest Mims notebooks to inspire you. There you’d find a way to turn the humble LED into a light sensor, whether you needed to or not. I wonder how many packs of assorted LEDs that book sold?!

Dan got his first hands on with a computer in RadioShack as well, because they let folks try them right there. If you didn’t know what you wanted a computer for, and that was the big question of the early microcomputer era, you could head into the store yourself and find out. Seeing, and playing with, Demon Dancer inspired.

A lot of this role is taken over by hackerspaces these days, and even more is taken by the Internet itself, of course. We have no shortage of inspiration – just read a day’s worth of Hackaday if you don’t believe me. So is there any room left for RadioShack’s inspirational role? Maybe not. But if that’s the cost of living in a world where we have access to more great ideas than we’ll ever have time to execute, then so be it!