There's an ATMega88 in that handsome case.

Give ATMega88 The Boot With This Retro Front Panel

It’s a truism that a computer must boot before it begins to operate. Nowadays that bootstrapping process is automatic, but in the case of the very first home computers, it was very much a hands-on affair. That’s what all those switches and blinkenlights are for on the front panel of the Altair 8800 — laboriously flicking each bit into memory as required to get your program going.

[Linus Åkesson] missed those very early days, and wanted to see what it was like, and clicking virtual switches on an emulator wasn’t going to cut it. He realized that he could set up an ATmega88 for front-panel booting, and proceeded to do just that.

The article linked above goes into good detail; for those of you who prefer video, we’ve embedded his presentation below.  They say the book is always better, but to get the full story, you’ll really want both in this case. The video contains a lot more context and build details, but neglects to mention some issues he had with programming that are detailed in the text. In short, the Write Page bit needs to be written to the Command register to use the page buffer. Which does make sense, but tripped [Linus] up at first.

Then again, this use case isn’t exactly detailed in the datasheet. ATmega88 is an old chip, but not Intel 8008 old, so that’s no surprise. Which is exactly what makes this a good hack! The only thing lacking is blinkenlights to allow one to see the contents of the registers. [Linus] discusses the idea of putting them in, but is apparently happy with this more minimalist approach.

We’ve seen the doughty Atmel chip hacked into everything from web-servers to washing machines, and even things that don’t start with “W”. As for the redoubtable [Linus], he’s most famous around these parts for his musical inventions and adventures with the Commodore 64Continue reading “Give ATMega88 The Boot With This Retro Front Panel”

10 Cent Microcontroller Makes Music

Compared to the old 8-bit Arduinos, it’s incredible how cheap modern microcontrollers like the ESP32 have become. But there are even cheaper options out there if you don’t need that kind of horsepower, and are willing to do a little work yourself, as [atomic14] demonstrates.

The CH32V003 is a dirt cheap microcontroller—which can reportedly be had for as little as 10 cents if you know where to look. It’s not the most powerful chip by any means, boasting just 16 K flash, and 2 K of SRAM. However, it is a 32-bit RISC V machine, and it does run at 48 MHz—giving it a leg up on many 8-bit parts that are still out there.

Surprisingly there aren’t a whole lot of CH32V003 products for the maker market, so if you want to play with it, you’ll probably need to spin up your own boards. [atomic14] does just that, showing us how the chip can be put to good use by turning it into a little musical trinket. It’s a fun demo, and a great way to get to grips with programming on a new microcontroller platform.

It’s hard to get more chiptune than a 10 cent chip beeping its little head off. How could possibly justify spending tens of dollars modding a Game Boy when this exists, even if it sounds like a caffeinated greeting card?

Continue reading “10 Cent Microcontroller Makes Music”

Making A Clock With A Retooled Unihiker K10

The Unihiker K10 is intended to be a small single-board solution for light AI and machine learning tasks. However, you don’t have to use it in that way if you don’t want to. [mircemk] figured out how to repurpose the device, and whipped up a simple Internet clock build to demonstrate how it’s done. 

While the Unihiker K10 is based on the common ESP32 microcontroller, out of the box, it isn’t compatible with standard Arduino libraries. However, [mircemk] had previously figured out how to get the K10 to play nice with the Arduino environment, building a simple light meter as a proof of concept. It just took a little tinkering to get everything playing nicely together, but soon enough, the TFT LCD and a light sensor were playing nicely with the K10 platform.

Moving forward, [mircemk] wanted to unlock more capability, so set about figuring out how to get WiFi and the onboard buttons working within the Arduino environment. A great way to test this was building a clock—the screen would show an analog clock face, the buttons would be used for control, and the WiFi would be used to query an NTP time server to keep it synced up and accurate.

It took a little work, particularly as the buttons are accessed through an external I/O expansion chip, but [mircemk] got there in the end. The clock may not be a particularly advanced project, but the write-up demonstrates how the K10 can readily be used with Arduino libraries for when you’re not interested in leveraging its fancier AI/ML capabilities.

We’ve seen a few good builds from [mircemk] before, too, like this neat proximity sensor. Continue reading “Making A Clock With A Retooled Unihiker K10”

World’s Cheapest ARM Debugger Is Actually RISC-V

[bogdanthegeek] has a lot of experience with the ARM platform, and their latest escapade into working with cheap ARM chips recovered from disposable vapes involved a realization that it was just plain wrong to debug such recovered silicon with something as expensive as a Pi Pico. No, they needed to build a debugger using the super cheap CH32V003.

What follows is an interesting tour around ARM Debug Access Port (DAP) programmers and creating a practical USB-connected device that actually works with modern toolchains. The first problem to be solved was that of host connectivity. These days, it’s USB or go home, which immediately limits the microcontrollers you can choose. Luckily for [Bogdan], they were aware of the excellent work by [cnlohr] on wedging low-speed USB support onto the RISC-V CH32v003 with the software-only bit-banging rv003usb, which provided a starting point. The next issue was to check for interrupt-driven endpoint support (needed for low-speed USB) in the Mac OS X kernel, which they knew was being dropped at an alarming rate (well, at least for full-speed). Luckily, the CMSIS-DAP standard required support for interrupt-driven USB endpoints, so kernel support was likely intact.

Next, [Bogdan] noticed that the DAPLink project had been ported to the bigger, native-USB WCH chips like the CH32V203, so it was a matter of porting this code to the diminutive CH32V003 using the rv003usb stack for the USB support using [cnlohr]’s ch32fun toolchain. There were a few bumps along the way with a lack of clarity in the DAPLink code, and some inconsistencies (across platforms) with the USB library dependencies of the upstream tool pyOCD, but they did get some tools working on at least Mac OS and some others on Linux. Which was nice.

We’ve covered the CH32V003 a fair bit, with people trying to give it all kinds of big-CPU tricks, such as speech recognition (of sorts) or even building a supercluster.

Bit-banged 100 MBit/s Ethernet Transmission On Raspberry Pi Pico

The Raspberry Pi Pico is a very capable board, but it’s still a surprise to see bit-banged 100 MBit/s Fast Ethernet implemented on one. [Steve]’s Pico-100BASE-TX library allows an RP2040 (or RP2350) microcontroller to stream data at roughly 11 Mbyte/s, enough to implement 100 MBit/s Fast Ethernet transmission.

We’ve seen 10BASE-T implemented on a Pico, but it takes a lot more than just shoveling bits faster to get 100BASE-T working. 10BASE-T uses two voltage levels and Manchester encoding, but 100BASE-T uses three voltage levels, which [Steve] cleverly implemented on the Pico with two GPIOs, and far more complex encoding. Check out the repository’s README for details as well as a couple example applications.

[Steve] tells us that to the best of his knowledge, this is the first bit-banged 100 MBit/s Ethernet implementation using a microcontroller. It’s transmit-only — reception being an entirely different beast — but it’s possible some enterprising soul might find a solution. If you do, be sure to let us know all about it!

The site controller board

Homebrew Dam Control System Includes All The Bells And Whistles

Over on brushless.zone, we’ve come across an interesting write-up that details the construction of a dam control system. This is actually the second part, in the first, we learn that some friends purchased an old dysfunctional 80 kW dam with the intention of restoring it. One friend was in charge of the business paperwork, one friend the mechanical side of things, and the other was responsible for the electronics — you can probably guess which ones we’re interested in.

The site controller is built around a Nucleo-H753 featuring the STM32H753ZI microcontroller, which was selected due to it being the largest single-core version of the dev board available. This site controller board features a dozen output light switches, sixteen front-panel button inputs, dual 24 V PSU inputs, multiple non-isolated analog inputs, atmospheric pressure and temperature sensors, multiple analog multiplexers, a pair of SSD1309 OLED screens, and an ESP32 for internet connectivity. There’s also fiber optic TX and RX for talking to the valve controller, a trio of isolated hall-effect current sensors for measuring the generator phase current, through current transformers, four contactor outputs (a contactor is a high-current relay), a line voltage ADC, and the cherry on top — an electronic buzzer.

The valve controller has: 48 V input from either the PSU or battery, motor phase output, motor field drive output, 8 kV rated isolation relay, limit switch input, the other side of the optical fiber TX and RX for talking to the site controller board, and connectors for various purposes.

If you’re interested in seeing this dam control system being tested, checkout the video embedded below.

Continue reading “Homebrew Dam Control System Includes All The Bells And Whistles”

Serial And UPDI Handled Together With One Convenient Circuit

Sometimes it’s nice when you can do everything you need to do with just one single port. In this vein, [Nicola Strappazzon] whipped up a circuit to combine serial and UPDI programming in a very convenient way.

As an example, [Nicola] demonstrates the concept using an AVR128DA28 microcontroller. It’s paired with a 4052 multiplexer IC and a CH340 USB-to-serial chip. Everything is wired up such that the 4052 acts as a switch for the signal coming from the CH340. When the RTS flow-control signal is set high, it switches the 4052 to hook up the CH340’s RX and TX pins to the UDPI interface on the AVR microcontroller. Conversely, when the RTS signal is set low, the CH340 is instead hooked up to the serial UART on the microcontroller. From there, it’s a simple matter of configuring avrdude to properly set the RTS pin when attempting to program the attached device.

If you’re working with UPDI devices and you want to be able to talk to them and program them with a minimum of fuss, this project might be useful for you. We’ve looked at dedicated UPDI programmers before, too. If you’re cooking up your own nifty microcontroller hacks, don’t hesitate to let us know on the tipsline.