Bare Metal STM32: The Various Real Time Clock Flavors

Keeping track of time is essential, even for microcontrollers, which is why a real-time clock (RTC) peripheral is a common feature in MCUs. In the case of the STM32 family there are three varieties of RTC peripherals, with the newest two creatively called ‘RTC2′ and RTC3’, to contrast them from the very basic and barebones RTC that debuted with the STM32F1 series.

Commonly experienced in the ubiquitous and often cloned STM32F103 MCU, this ‘RTC1’ features little more than a basic 32-bit counter alongside an alarm feature and a collection of battery-backed registers that requires you to do all of the heavy lifting of time and date keeping yourself. This is quite a contrast with the two rather similar successor RTC peripherals, which seem to insist on doing everything possible themselves – except offer you that basic counter – including giving you a full-blown calendar and today’s time with consideration for 12/24 hour format, DST and much more.

With such a wide gulf between RTC1 and its successors, this raises the question of how to best approach these from a low-level perspective.

Continue reading “Bare Metal STM32: The Various Real Time Clock Flavors”

Rackintosh Plus Is The Form Factor Nobody Has Been Waiting For

For all its friendly countenance and award-winning industrial design, there’s one thing the venerable Macintosh Plus can’t do: fit into a 1U rack space. OK, if we’re being honest with ourselves, there are a lot of things a Mac from 1986 can’t do, but the rack space is what [identity4] was focused on when they built the 2025 Rackintosh Plus.

Some folks may have been fooled by this ad to think this was an actual product.

For those of you already sharpening your pitchforks, worry not: [identity4]’s beloved vintage Mac was not disassembled for this project. This rack mount has instead become the home for a spare logic board they had acquired Why? They wanted to use a classic Mac in their studio, and for any more equipment to fit the space, it needed to go into the existing racks. It’s more practical than the motivation we see for a lot of hacks; it’s almost surprising it hasn’t happened before. (We’ve seen Mac Minis in racks, but not the classic hardware.)

Aside from the genuine Apple logic board, the thin rack also contains a BlueSCSI hard drive emulator, a Floppy Emu for SD-card floppy emulator, an RGB-to-HDMI converter to allow System 7 to shine on modern monitors, and of course a Mean Well power supply to keep everything running.The Floppy Emu required a little light surgery to move the screen so it would fit inside the low-profile rack. [identity4] also broke out the keyboard and mouse connectors to the front of the rack, but all other connectors stayed on the logic board at the rear.

Sound is handled by a single 8-ohm speaker that lives inside the rack mount, because even if the Rackintosh can now fit into a 1U space, it still can’t do stereo sound…or anything else a Macintosh Plus with 4 MB of RAM couldn’t do. Still, it’s a lovely hack. and the vintage-style advertisement was an excellent touch.

Now they just need the right monochrome display.

A Look At Not An Android Emulator

Recently, Linux has been rising in desktop popularity in no small part to the work on WINE and Proton. But for some, the year of the Linux desktop is not enough, and the goal is now for the year of the Linux phone. To that end, an Android Linux translation layer called Android Translation Layer (we never said developers were good at naming) has emerged for those running Linux on their phones.

Android Translation Layer (ATL) is still in very early days, and likely as not, remains unpackaged on your distro of choice. Fortunately, a workaround is running an Alpine Linux container with graphics pass through via a tool like Distrobox or Toolbox. Because of the Alpine derived mobile distribution postmarketOS, ATL is packaged in the Alpine repos.

In many ways, running Android apps on Linux is much easier then Windows apps. Because Android apps are architecture independent, hardware emulation is unnecessary. With such similar kernels, on paper at least, Android software should run with minimal effort on Linux. Most of what ATL provides is a Linux/Android hardware abstraction layer glue to ensure Android system calls make their way to the Linux kernel.

Of course, there is a lot more to running Android apps, and the team is working to implement the countless Android system APIs in ATL. For now, older Android apps such as Angry Birds have the best support. Much like WINE, ATL will likely devolve into a game of wack-a-mole where developers implement fresh translation code as new APIs emerge and app updates break. Still, WINE is a wildly successful project, and we hope to see ATL grow likewise!

If you want to get your Android phone to talk to Linux, make sure to check out this hack next! 

A photo of the air-wired circuit, with one LED on and the other off.

The Magic Of The Hall Effect Sensor

Recently, [Solder Hub] put together a brief video that demonstrates the basics of a Hall Effect sensor — in this case, one salvaged from an old CPU fan. Two LEDs, a 100 ohm resistor, and a 3.7 volt battery are soldered onto a four pin Hall effect sensor which can toggle one of two lights in response to the polarity of a nearby magnet.

If you’re interested in the physics, the once sentence version goes something like this: the Hall Effect is the production of a potential difference, across an electrical conductor, that is transverse to an electric current in the conductor and to an applied magnetic field perpendicular to the current. Get your head around that!

Of course we’ve covered the Hall effect here on Hackaday before, indeed, our search returned more than 1,000 results! You can stick your toe in with posts such as A Simple 6DOF Hall Effect ‘Space’ Mouse and Tracing In 2D And 3D With Hall Effect Sensors.

Continue reading “The Magic Of The Hall Effect Sensor”

Was Action! The Best 8-Bit Language?

Most people’s memories of programming in the 8-bit era revolve around BASIC, and not without reason. Most of the time, it was all we had. On the other hand, there were other options if you sought them out, and [Paul Lefebvre] makes the case that Goto10Retro that Action! was the best of them.

The limits of BASIC as an interpreted language are well-enough known that we needn’t go over them here. C and Pascal were available for some home computers in the 1980s, and programs written in those languages ran well, but compiling them? That was by no means guaranteed.

The text editor. Unusual for Atari at the time, it allowed scrolling along a line of greater than 40 char.

For those who lived on the Atari side of the fence, the Action! language provided a powerful alternative. Released by Optimized Systems Software in 1983, Action! was heavily optimized for the 6502, to the point that compiling and running simple programs with “C” and “R” felt “hardly slower” than typing RUN in BASIC. That’s what [Paul] writes, anyway, but it’s a claim that almost has to be seen to be believed.

You didn’t just get a compiler for your money when you bought Action!, though. The cartridge came with a capable text editor, simple shell, and even a primitive debugger. (Plus, of course, a hefty manual.) It’s the closest thing you’d find to an IDE on a computer of that class in that era, and it all fit on a 16 kB cartridge. There was apparently also a disk release, since the disk image is available online.

Unfortunately for those of us in Camp Commodore, the planned C-64 port never materialized, so we missed out on this language.  Luckily our 64-bit supercomputers can easily emulate Atari 8-bit hardware and we can see what all the fuss was about. Heck, even our microcontrollers can do it. 

 

Bambu Lab’s PLA Tough+ Filament: Mostly A Tough Sell

Beyond the simple world of basic PLA filaments there is a whole wild world of additives that can change this humble material for better or worse. The most common additives here are primarily to add color, but other additives seek to specifically improve certain properties of PLA. For example Bambu Lab’s new PLA Tough+ filament series that [Dr. Igor Gaspar] over at the My Tech Fun YouTube channel had over for reviewing purposes.

According to Bambu Lab’s claims for the filament, it’s supposed to have ‘up to’ double the layer adhesion strength as their basic PLA, while being much more robust when it comes to flexing and ‘taking a beating’. Yet as [Igor] goes through his battery of tests – comparing PLA Tough+ against the basic PLA – the supposedly tough filament is significantly worse in every count. That sad streak lasts until the impact tests, which is where we see a curious set of results – as shown above – as well as [Igor]’s new set of impact testing toys being put through their paces.

Of note is that although the Tough+ variants tested are consistently less brittle than their basic PLA counterparts, the Silver basic PLA variant makes an unexpectedly impressive showing. This is a good example of how color additives can have very positive impacts on a basic polymer like PLA, as well as a good indication that at least Bambu Lab’s Basic PLA in its Silver variant is basically better than Tough+ filaments. Not only does it not require higher printing temperatures, it also doesn’t produce more smelly VOCs, while being overall more robust.

Continue reading “Bambu Lab’s PLA Tough+ Filament: Mostly A Tough Sell”

O Brother, What Art Thou?

Dedicated word processors are not something we see much of anymore. They were in a weird space: computerized, but not really what you could call a computer, even in those days. More like a fancy typewriter, with a screen and floppy disks. Brother made some very nice ones, and [Chad Boughton] got his hands on one for a modernization project.

The word processor in question, a Brother WP-2200, was chosen primarily because of its beautiful widescreen, yellow-phosphor CRT display. Yes, you read that correctly — yellow phosphor, not amber. Widescreen CRTs are rare enough, but that’s just different. As built, the WP-2200 had a luggable form-factor, with a floppy drive, ̶m̶e̶c̶h̶a̶n̶i̶c̶a̶l̶ clacky keyboard, and dot-matrix printer in the back. Continue reading “O Brother, What Art Thou?”