Bare-Metal STM32: Setting Up And Using SPI

The Serial Peripheral Interface (SPI) interface was initially standardized by Motorola in 1979 for short-distance communication in embedded systems. In its most common four-wire configuration, full-duplex data transfer is possible on the two data (MOSI, MISO) lines with data rates well exceeding 10 Mb/s. This makes SPI suitable for high-bandwidth, full-duplex applications like SD storage cards and large resolution, high-refresh displays.

STM32 devices come with a variable number of SPI peripherals, two in the F042 at 18 Mb/s and five in the F411. Across the STM32 families, the SPI peripheral is relatively similar, with fairly minor differences in the register layout. In this article we’ll look at configuring an SPI peripheral in master mode.

Continue reading “Bare-Metal STM32: Setting Up And Using SPI”

This Snappy 8-Bit Microcomputer Brings The Speed To Retrocomputing

When the need for speed overcomes you, thoughts generally don’t turn to 8-bit computers. Sure, an 8-bit machine is fun for retro gameplay and reliving the glory days, and there certainly were some old machines that were notably faster than the others. But raw computing power isn’t really the point of retrocomputing.

Or is it? [Bernardo Kastrup] over at The Byte Attic has introduced an interesting machine called the Agon Light, an 8-bit SBC that’s also a bit like a microcontroller. The machine has a single PCB that looks about half as big as an Arduino Uno, and sports some of the same connectors and terminals around its periphery. The heart of the Agon Light is an eZ80 8-bit, 18.432 MHz 3-stage pipelined CPU, which is binary compatible with the Z80. It also has an audio-video coprocessor, in the form of an ESP32-Pico-D4, which supports a 640×480 64-color display and two mono audio channels. There’s no word we could find of whether the ESP32’s RF systems are accessible; it would be nice, but perhaps unnecessary since there are both USB ports and a PS/2 keyboard jack. There’s also a pin header for 20 GPIOs as well as I2C, SPI, and UART for serial communication.

The lengthy video below goes into all the details on the Agon Light, including the results of benchmark testing, all of which soundly thrash the usual 8-bit suspects. The project is open source and all the design files are available, or you can get a PCB populated with all the SMD components and just put the through-hole parts on. [Bernardo] is also encouraging people to build and sell their own Agon Lights, which seems pretty cool too. It honestly looks like a lot of fun, and we’re looking forward to seeing what people do with this.

Continue reading “This Snappy 8-Bit Microcomputer Brings The Speed To Retrocomputing”

Custom Sony Camera Remote Built With ESP32

Whether you’re shooting video or photos, having a camera remote can really improve your productivity. No longer do you have to run back to the camera to press its tiny buttons! [Frank Zhao] is a Sony user, so decided to whip up a custom remote using the ESP32 for his Alpha camera, adding special features along the way.

The build communicates with the camera over WiFi, but can fall back to Infrared if there’s an issue with the radio link. It’s built around the M5StickC, which is a pre-built device featuring an ESP32 and a small display in a handheld form factor. It let him build the remote in half the size of the official Sony device. With limited buttons on board, though, he relies on the IMU to control many advanced features with motion gestures.

The remote enables a bunch of functionality that Sony didn’t bake into its cameras from the factory. There’s a sound-activated shutter release, dual shutter mode, and several timer-based tools including astrophotography modes. There’s also a big knob you can add for focus pulls, and a mode to reset the auto-focus when you’re frustrated that it isn’t working properly. Some of the features work better than others, as sometimes, the camera doesn’t respond to commands quickly enough. Regardless, it’s pretty neat that [Frank] has unlocked so much extra functionality with his custom $20 remote.

We’ve seen other homebrewed tools open up new creative possibilities for cameras before, too. If you’ve got your own nifty camera hacks, let us know on the tipsline!

WheatSystem Is A Homebrew 8-Bit OS

[Esperantanaso] has long been involved in producing homebrew 8-bit computers. His various builds could all achieve different things, but he grew frustrated that applications written for one could not be easily run on another. He recently took a big leap forward in this area, though, cooking up his own 8-bit operating system called WheatSystem.

The work initially began with BreadSystem, which relied on applications existing in bytecode. This would then be run by the BreadSystem OS which would handle the requisite conversion to the machine code of the system it ran on. However, the work quickly got out of hand when it came to implementing advanced features like the file system and floating-point handling. BreadSystem was looking likely to be too heavy to run on lightweight 8-bit systems.

That led to the development of WheatSystem, which kept the bytecode runtime environment, unified heap, and a memory permission system from BreadSystem. Fancier features like granular memory permissioning, automatic garbage collection, and file system directories were dropped.

WheatSystem quickly became a basic and functional OS. To demonstrate it, [Esperantanaso] created WheatBox 55A1, a small homebrew computer based on the ATmega328. It readily runs simple applications like a prime number generator or a basic RPG.

Creating one’s own OS is no mean feat, even at the 8-bit level. We’ve seen it done before, and it never fails to impress.

Continue reading “WheatSystem Is A Homebrew 8-Bit OS”

Tiny Thin Client Is Small But Compatible

We were impressed with [moononournation’s] tiny thin client project. It claims to use an Arduino, but as you might guess it is using the Arduino software along with a network-enabled microcontroller like an ESP32. The impressive part is that it is standards-compliant and implements VNC’s RFB protocol.

The original coding for RFB on Arduino is from [Links2004] and armed with that, the thin client is probably easier to create than you would guess. However, this project wanted to use a larger screen and found that it led to certain problems. In particular, the original code had a 320×240 display. This project was to use an 800×480 display, but with the limits on the ESP32, the frame rate possible would be under 7 frames per second. The answer was to combine a 16-bit parallel interface with better compression back to the VNC server.

The little keyboard is probably not very practical, but it is compact. That would be another easy thing to modify. Currently, the keyboard uses I2C, but it would be straightforward to change things up. This would be a worthy base to build a bigger project on top. A 3D printed enclosure would be nice, too.

We’ve seen a number of projects built around commercial thin clients. Some from defunct businesses are good sources for obscure parts, too.

Continue reading “Tiny Thin Client Is Small But Compatible”

USB Power Isolator Keeps Smoke In

Anyone who’s done an electronics project knows the most important part of any good design is making sure to keep the magic smoke inside of all of the components. There are a lot of ways to make sure the smoke stays in there, but one of the most important is making sure that the power supply is isolated. If you’re using a USB port on a computer as your power source, though, it can be a little more complicated to isolate it from the computer.

The power supply is based around a small transformer with a set of diodes to act as a rectifier. Of course, while a transformer is great at isolating power supplies, it isn’t much good at DC. That’s what the ATtiny microcontroller is for. It handles the high-speed switching of the MOSFETs, which drive the transformer and handle some power regulation. There are two different power supplies created as part of this project as well — the first generates +5V much like a normal USB plug would have, and the other creates both +5V and -5V. It will be important not to mix these two up, or that tricky blue smoke may escape.

The project page goes into extensive details on the operation of the device, so if electrical theory is of interest, this will definitely be worth a read. Isolating a valuable computer from a prototype circuit is certainly important, but if you’re looking for a way to isolate a complete USB connection, look at this build which includes isolation for a USB to FTDI adapter.

The State Of The SBC Interface Ecosystem, Is It Time To Design A Standard?

We are spoiled for choice when it comes to single board computers, whether they be based around a microcontroller or a more capable SoC capable of running an operating system such as GNU/Linux. They can be had from well-established brands such as Arduino, Adafruit, or Raspberry Pi, or from a Wild West of cheaper Far Eastern modules carrying a plethora of different architectures.

Everyone has their own favourite among them, and along with that comes an ecosystem of operating systems and software development environments. There’s another aspect to these boards which has evolved; certain among them have become de facto interface connector standards for hardware peripherals. Do these standards make any sense? Let’s talk about that.

Continue reading “The State Of The SBC Interface Ecosystem, Is It Time To Design A Standard?”