Checking In On The ISA Wars And Its Impact On CPU Architectures

An Instruction Set Architecture (ISA) defines the software interface through which for example a central processor unit (CPU) is controlled. Unlike early computer systems which didn’t define a standard ISA as such, over time the compatibility and portability benefits of having a standard ISA became obvious. But of course the best part about standards is that there are so many of them, and thus every CPU manufacturer came up with their own.

Throughout the 1980s and 1990s, the number of mainstream ISAs dropped sharply as the computer industry coalesced around a few major ones in each type of application. Intel’s x86 won out on desktop and smaller servers while ARM proclaimed victory in low-power and portable devices, and for Big Iron you always had IBM’s Power ISA. Since we last covered the ISA Wars in 2019, quite a lot of things have changed, including Apple shifting its desktop systems to ARM from x86 with Apple Silicon and finally MIPS experiencing an afterlife in  the form of LoongArch.

Meanwhile, six years after the aforementioned ISA Wars article in which newcomer RISC-V was covered, this ISA seems to have not made the splash some had expected. This raises questions about what we can expect from RISC-V and other ISAs in the future, as well as how relevant having different ISAs is when it comes to aspects like CPU performance and their microarchitecture.

Continue reading “Checking In On The ISA Wars And Its Impact On CPU Architectures”

Ask Hackaday: What Would You Do With The World’s Smallest Microcontroller?

It’s generally pretty easy to spot a microcontroller on a PCB. There are clues aplenty: the more-or-less central location, the nearby crystal oscillator, the maze of supporting passives, and perhaps even an obvious flash chip lurking about. The dead giveaway, though, is all those traces leading to the chip, betraying its primacy in the circuit. As all roads lead to Rome, so it often is with microcontrollers.

It looks like that may be about to change, though, based on Texas Instruments’ recent announcement of a line of incredibly small Arm-based microcontrollers. The video below shows off just how small the MSPM0 line can be, ranging from a relatively gigantic TSSOP-20 case down to an eight-pin BGA package that measures only 1.6 mm by 0.86 mm. That’s essentially the size of an 0603 SMD resistor, a tiny footprint for a 24-MHz Cortex M0+ MCU with 16-kB of flash, 1-kB of SRAM, and a 12-bit ADC. The larger packages obviously have more GPIO brought out to pins, but even the eight-pin versions support six IO lines.

Of course, it’s hard not to write about a specific product without sounding like you’re shilling for the company, but being first to market with an MCU in this size range is certainly newsworthy. We’re sure other manufacturers will follow suit soon enough, but for now, we want to know how you would go about using a microcontroller the size of a resistor. The promo video hints at TI’s target market for these or compact wearables by showing them used in earbuds, but we suspect the Hackaday community will come up with all sorts of creative and fun ways to put these to use — shoutout to [mitxela], whose habit of building impossibly small electronic jewelry might be a good use case for something like this.

There may even be some nefarious use cases for a microcontroller this small. We were skeptical of the story about “spy chips” on PC motherboards, but a microcontroller that can pass for an SMD resistor might change that equation a bit. There’s also the concept of “Oreo construction” that these chips might make a lot easier. A board with a microcontroller embedded within it could be a real security risk, but on the other hand, it could make for some very interesting applications.

What’s your take on this? Can you think of applications where something this small is enabling? Or are microcontrollers that are likely to join the dust motes at the back of your bench after a poorly timed sneeze a bridge too far? Sound off in the comments below.

Continue reading “Ask Hackaday: What Would You Do With The World’s Smallest Microcontroller?”

A 6502, In The Shell

Shell scripting is an often forgotten programming environment, relegated to simple automation tasks and little else. In fact, it’s possible to achieve much more complex tasks in the shell. As an example, here’s [calebccf] with an emulated 6502 system in a busybox ash shell script.

What’s in the emulator? A simple 6502 system with RAM, ROM, and an emulated serial port on STDIO. It comes with the wozmon Apple 1 monitor and BASIC, making for a very mid-1970s experience. There’s even a built-in monitor and debugger, which from our memories of debugging hand-assembled 8-bit code back in the day, should be extremely useful.

Although the default machine has a generous 32k of RAM and 16k ROM, you can easily adjust these limits by editing machine.sh. In addition, you can get a log of execution via a socket if you like. Don’t expect it to run too fast, and we did have to adjust the #! line to get it to run on our system (we pointed it to bash, but your results may vary).

What you use this for is up to you, but we’re sure you’ll all agree it’s an impressive feat in the shell. It’s not the first time we’ve seen some impressive feats there, though. Our Linux Fu column does a lot with the shell if you want further inspiration.

Pi Hand Is A Digital Display Of A Different Sort

Hackers enjoy a good theme, and so it comes as no surprise that every time March 14th (Pi Day) rolls around, the tip line sees an uptick in mathematical activity. Whether it’s something they personally did or some other person’s project they want to bring to our attention, a lot of folks out there are very excited about numbers today.

One of our most prolific circumference aficionados is [Cristiano Monteiro], who, for the last several years, has put together a special project to commemorate the date. For 2025, he’s come up with a robotic hand that will use its fingers to show the digits of Pi one at a time. Since there’s only one hand, anything higher than five will be displayed as two gestures in quick succession, necessitating a bit of addition on the viewer’s part.

[Cristiano] makes no claims about the anatomical accuracy of his creation. Indeed, if your mitts look anything like this, you should seek medical attention immediately. But whether you think of them as fingers or nightmarish claws, it’s the motion of the individual digits that matter.

To that end, each one is attached to an MG90 servo, which an Arduino Nano drives with attached Servo Shield. From there, it’s just a matter of code to get the digits wiggling out the correct value, which [Cristiano] has kindly shared for anyone looking to recreate this project.

If you’re hungry for more Pi, the ghostly display that [Cristiano] sent in last year is definitely worth another look. While not directly related to today’s mathematical festivities, the portable GPS time server he put together back in 2021 is another fantastic build you should check out.

Continue reading “Pi Hand Is A Digital Display Of A Different Sort”

ClockworkPi Unveils New PicoCalc Handheld

Do you like scientific calculators? Don’t bother answering that question, you’re reading Hackaday so we already know the answer. We also know you’re a fan of building things yourself and open source, which makes us fairly sure you’ll be just as interested in the recently announced ClockworkPi PicoCalc as we are.

On the surface, it looks like a chunky scientific calculator, though on further inspection you’ll note it comes equipped with a QWERTY keyboard. But open up the case and what you’ve really got is an elaborate carrier board for the Raspberry Pi Pico. The PicoCalc supports all variants of the microcontroller, but realistically we can’t think of any reason that you wouldn’t just use the latest version.

With the MCU connected, you’ll have access to the PicoCalc’s 320×320 4-inch IPS screen, backlit I2C-connected keyboard, SD card slot, 8 MB PSRAM, and dual PWM speakers. Power is provided by a pair of 18650 cells (which you’ll need to supply on your own), and the board has the necessary circuitry to charge them up over USB-C.

Everything is housed in an injection molded case, but the project page says all the necessary CAD files will be eventually be released under the GPL v3 so you can 3D print or CNC your own enclosure. For now though, the only thing of note that seems to be in the PicoCalc GitHub repository is a PCB schematic.

The software side of things is a little less clear. The page mentions a BASIC interpreter, MP3 playback, and support for various programming languages, but we get the impression that’s just a list of stuff you can run on the Pi Pico. There are a few images that clearly show the PicoCalc actually being used as a calculator however, so there may be an official firmware yet to be revealed.

The PicoCalc kit is on sale now, and will set you back $75 USD — which actually includes a first-generation Pi Pico, on the off chance that you don’t already have a few laying around. We’ve been impressed with the previous offerings from ClockworkPi, so assuming this new kit maintains that same build quality, it seems like a fair enough price.

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.

Low-Resolution Fluid Simulation On An ESP32

Fluid simulations are a key tool in fields from aerospace to motorsports and even civil engineering. They can be three-dimensional and complicated and often run on supercomputer clusters bigger than your house. However, you can also do simple two-dimensional fluid simulations on very simple hardware, as [mircemk] demonstrates.

This build is almost like a simple toy that displays particles rolling around and tumbling as you turn it one way or the other. Behind the scenes, an ESP32 is running the show, simulating a group of particles responding to gravity in a fluid-like manner. The microcontroller is  hooked up with an 3-axis gyroscope and accelerometer, which it uses to track motion and influence the motion of the particles in turn. The results of the simple fluid simulation are displayed on a screen made up of a 16 x 16 matrix of WS2812B addressable RGB LEDs, which add enough color to make the build suitably mesmerizing.

There’s something compelling about turning the display and watching the particles tumble and flow, particularly when they’re all set to different colors. [mircemk] also gave the build the ability to operate in several different modes, running “sand,” “liquid” and “gas” simulations and with dynamic coloring to boot.

We’ve seen some great videos from [mircemk] before, too, like this sensitive metal detector rig. Continue reading “Low-Resolution Fluid Simulation On An ESP32”