Doing 1080p Video, Sort Of, On The STM32 Microcontroller

When you think 1080p video, you probably don’t think STM32 microcontroller. And yet! [Gabriel Cséfalvay] has pulled off just that through the creative use of on-chip peripherals. Sort of.

The build is based around the STM32L4P5—far from the hottest chip in the world. Depending on the exact part you pick, it offers 512 KB or 1 Mbyte of flash memory, 320 KB of SRAM, and runs at 120 MHz. Not bad, but not stellar.

Still, [Gabriel] was able to push 1080p at a sort of half resolution. Basically, the chip is generating a 1080p widescreen RGB VGA signal. However, to get around the limited RAM of the chip, [Gabriel] had to implement a hack—basically, every pixel is RAM rendered as 2×2 pixels to make up the full-sized display. At this stage, true 1080p looks achievable, but it’ll be a further challenge to properly fit it into memory.

Output hardware is minimal. One pin puts out the HSYNC signal, another handles VSYNC. The same pixel data is clocked out over R, G, and B signals, making all the pixels either white or black. Clocking out the data is handled by a nifty combination of the onboard DMA functionality and the OCTOSPI hardware. This enables the chip to hit the necessary data rate to generate such a high-resolution display.

There’s more work to be done, but it’s neat to see [Gabriel] get even this far with such limited hardware. We’ve seen others theorize similar feats on chips like the RP2040 in the Pi Pico, too. Video after the break.

Continue reading “Doing 1080p Video, Sort Of, On The STM32 Microcontroller”

Is That A Coaster? No, It’s An LED Matrix!

I’m sure you all love to see some colorful blinkenlights every now and then, and we are of course no exception. While these might look like coasters at a distance, do not be deceived! They’re actually [bitluni]’s latest project!

[bitluni]’s high-fidelity LED matrix started life as some 8×8 LED matrices lying on the shelf for 10 years taunting him – admit it, we’re all guilty of this – before he finally decided to make something with them. That idea took the form of a tileable display with the help of some magnets and pogo pins, which is certainly a very satisfying way to connect these oddly futuristic blinky coasters together.

It all starts with some schematics and a PCB. Because the CH32V208 has an annoying package to solder, [bitluni] opted to have the PCB fab do placement for him. Unfortunately, though, and like any good prototype, it needed a bodge! [bitluni] had accidentally mirrored a chip in the schematic, meaning he had to solder one of the SMD chips on upside-down, “dead bug mode”. Fortunately, the rest was seemingly more successful, because with a little 3D-printed case and some fancy programming, the tiny tiles came to life in all of their rainbow-barfing glory. Sure, the pogo pins were less reliable than desired, but [bitluni] has some ideas for a future version we’re very much looking forward to.

Video after the break.
Continue reading “Is That A Coaster? No, It’s An LED Matrix!”

PCB data sheet of a custom 4-bit microcontroller

Building A Microcontroller From Scratch: The B4 Thinker Project

[Marius Taciuc’s] latest endeavor, the B4 Thinker, offers a captivating glimpse into microcontroller architecture through a modular approach. This proof-of-concept project is meticulously documented, with a detailed, step-by-step guide to each component and its function.

Launched in 2014, the B4 Thinker project began with the ambitious goal of building a microcontroller from scratch. The resulting design features a modular CPU architecture, including a base motherboard that can be expanded with various functional modules, such as an 8-LED port card. This setup enables practical experimentation, such as writing simple assembly programs to control dynamic light patterns. Each instruction within this system requires four clock pulses to execute, and the modular design allows for ongoing development and troubleshooting.

Continue reading “Building A Microcontroller From Scratch: The B4 Thinker Project”

A Cheap DIY PLC Based On The Atmega328P

If you’re running a big factory, you’ve probably got a massively expensive contract with a major programmable logic controller (PLC) manufacturer. One shudders to think about the cost of the service subscription on that one. If you’re working on a smaller scale, though, you might consider a DIY PLC like this one from [Mr Innovative.]

PLCs are rarely cutting-edge; instead, they’re about reliability and compliance with common industry standards. To that end, this design features the ATmega328P. Few other microcontrollers are as well understood or trusted as that one. The device is compatible with RS232 and RS485 and will run off 24 VDC, both of which you would find in a typical industrial environment. It offers 24 V digital inputs and outputs, as well as analog inputs and outputs from 0 to 10 V. [Mr Innovative] demonstrates it by hooking up a DWIN human-machine interface (HMI) for, well… human interaction, and a variable frequency drive to run a motor.

If you want to run a basic industrial-lite system but can’t afford the real industrial price tag, you might enjoy tinkering around at this level first. It could be a great way to get a simple project up and running without breaking the bank. Video after the break.

Continue reading “A Cheap DIY PLC Based On The Atmega328P”

Can You Hack The RP2350? There’s $10,000 On The Line

The Raspberry Pi Foundation had their new RP2350 chip audited by Hextree.io, and now, both companies want to see if you can hack it. Just to prove that they’re serious, they’re putting out a $10,000 bounty. Can you get inside?

The challenge to hack the chip is simple enough. You need to dump a secret that is hidden at OTP ROW 0xc08. It’s 128 bits long, and it’s protected in two ways—by the RP2350’s secure boot and by OTP_DATA_PAGE48_LOCK1. Basically, the chip security features have been activated, and you need to get around them to score the prize.

The gauntlet was thrown down ahead of DEF CON, where the new chip was used in the event badges. Raspberry Pi and Hextree.io invited anyone finding a break to visit their booth in the Embedded Systems Village. It’s unclear at this stage if anyone claimed the bounty, so we can only assume the hunt remains open. It’s been stated that the challenge will run until 4 PM UK time on September 7th, 2024.

Hacking microcontrollers is a tough and exacting art. The GitHub repo provides full details on what you need to do, with the precise rules, terms, and conditions linked at the bottom. You can also watch the challenge video on Hextree.io.

Raspberry Has A New Pico, Built With The New RP2350

Raspberry Pi’s first foray into the world of microcontrollers, the RP2040, was a very interesting chip. Its standout features were the programmable input/output units (PIOs) which enabled all sorts of custom real-time shenanigans. And that’s not to discount the impact of the Pi Pico, the $4 dev kit built around it.

Today, they’re announcing a brand-new microcontroller: the RP2350. It will come conveniently packaged in the new Pi Pico 2, and there’s good news and bad news. The good news is that the new chip is better in every way, and that the Pico form factor will stay the same. The bad news? It’s going to cost 25% more, coming in at $5. But in exchange for the extra buck, you get a lot.

For starters, the RP2350 runs a bit faster at 150 MHz, has double the on-board RAM at 520 kB, and twice as much QSPI flash at 4 MB. And those sweet, sweet PIOs? Now it has 12 instead of just 8. (Although we have no word yet if there is more program space per PIO – even with the incredibly compact PIO instruction set, we always wanted more!)

Two flavors on the same chip: Arm and RISC

As before, it’s a dual-core chip, but now the cores are Arm Cortex M33s or RISC-V Hazard3s. Yes, you heard that right, there are two pairs of processors on board. Raspberry Pi says that you’ll be able to select which style of cores runs either by software or by burning one-time fuses. So it’s not a quad core chip, but rather your choice of two different dual cores. Wild!

Raspberry Pi is also making a big deal about the new Arm TrustZone functionality. It has signed boot, 8 kB of OTP key-storage memory, SHA-256 acceleration, a hardware RNG, and “fast glitch detectors”. While this is probably more aimed at industry than at the beginning hacker, we’re absolutely confident that some of you out there will put this data-safe to good use.

There is, as of yet, no wireless built in. We can’t see into the future, but we can see into the past, and we remember that the original Pico was wireless for a few months before they got the WiFi and Bluetooth radio added into the Pico W. Will history repeat itself with the Pico 2?

We’re getting our hands on a Pico 2 in short order, and we’ve already gotten a sneak peek at the extensive software toolchain that’s been built out for it. All the usual suspects are there: Picotool, TinyUSB, and OpenOCD as we write this. We’ll be putting it through its paces and writing up all the details next week.

You Can Program AVRs From The Commodore 64

These days, most of our microcontroller boards come with bootloaders so you can squirt hex into them straight over USB. However, you don’t need to do things this way. If you’re more old school, you can program your AVRs right from a Commodore 64. [Linus Akesson] shows us how.

Programming an AVR isn’t that hard. By holding the chip in reset, it’s possible to flash code via a serial protocol using just three wires. However, that’s pretty impractical to do with modern PCs — they don’t come with addressable IO pins anymore. Normally, you’d use a dedicated programmer to do the job, but [Linus] found his had died on a Friday night. So he set about turning his C64 into one instead.

He decided to use the pins of the C64’s Joystick Port 2, with pins 1, 2, 3, and 4 hooked up to SCK, MOSI, Reset, and MISO on the AVR, respectively. 5 V and Ground were also provided courtesy of the C64’s port. He then whipped up a simple bit of assembly code to read a bit of AVR hex and spit it out over the Joystick port following the in-circuit programming protocol. With a 1541 Ultimate to load files on to the C64 in hand, it was easy to pull his compiled AVR program off his modern PC, chuck it on the C64, and then get the old Commodore to program the AVR in turn.

It’s not the first time [Linus] has wowed us with a C64 in hand. If you’ve got your own fresh projects for the best-selling computer of all time, don’t hesitate to let us know!