RS485 is a communication standard that should be part of the advanced hardware hacker’s arsenal; it’s not commonly encountered, but powerful exactly when you need it. It’s a physical layer interface for wired communications that uses a single differential pair for noise immunity, has good long-distance properties, and allows many connections to a single bus. Because of that, you will encounter it in security systems and even cameras, wired sensor networks, DMX512 lighting and all sorts of industrial electronics. For our hobbyist goals, you can absolutely use RS485 to build your home (or room) automation system, or a relatively large robot – without all those worries that wireless brings.
The name might remind you of RS232, and that’s because both RS232 and RS485 are standards that come from EIA (Electronics Industries Alliance). It also might remind you of RS422, if you’ve ever seen this name mentioned online – RS422 and RS485 are closely intertwined, sharing most of the physical layer, and I’ll show how exactly they relate. Continue reading “Hacker Dictionary: RS-485 Will Go The Distance”
Flashing your code into an Arduino, an ESP32 or any other modern microcontroller platform is pretty straightforward: connect the device through USB, fire up the appropriate software platform, and press “program”. But those who followed embedded programming classes in the ’80s and ’90s will remember a more complicated procedure that consists of swapping EPROM chips between a programmer, a target board and a UV eraser. Veterans of that era might even remember how you could overwrite a previous program with NOPs and place new code behind it, to save yourself a trip to the “blank chips” bin.
If you’re a retrocomputer enthusiast and would like to have the easy programming of modern tools, but the authenticity of a self-contained ROM-loading computer, you might want to check out [Anders Nielsen]’s latest design of a wireless boot loader for a 6502 single board computer. The target platform for this project is a beautiful custom-made 6502-based retrocomputer that [Anders] documented in detail on his Hackaday.io page.
The basic idea here is to have a wireless receiver on the target system that receives data from a transmitter connected to a modern PC. When you click “program”, the object code is sent to the 6502 machine, stored in RAM and executed. The wireless link is implemented with a pair of nRF24L01 2.4 GHz modules that communicate through SPI. Since [Anders]’s Mac Mini doesn’t come with GPIO ports he hooked up the transmitter to a Raspberry Pi which he controlled through a network link.
On the 6502 side he wrote a bootloader in assembly language, which bit-bangs the SPI protocol to communicate with the wireless module. A simple user interface is included to allow the user to control the loading and running of programs. All code and hardware documentation is available on Github for use by anyone with a similar 6502 system.
Those nRF24L01s are versatile little things: we’ve seen them being used to transfer anything from MIDI data to TCP/IP links, as well as code for other microcontroller platforms.
Continue reading “Wireless Bootloader Saves You From Swapping ROM Chips”
When we go to the cinema and see a film in 2022, it’s very unlikely that what we’re seeing will in fact be a film. Instead of large reels of transparent film fed through a projector, we’ll be watching the output of a high-quality digital projector. The advantages for the cinema industry in terms of easier distribution and consistent quality are obvious. There was a period in the 1990s though when theatres still had film projectors, but digital technology was starting to edge in for the sound. [Nava Whiteford] has found some 35mm trailer film from the 1990s, and analysed the Dolby Digital sound information from it.
The film is an interesting exercise in backward compatibility, with every part of it outside the picture used to encode information. There is the analogue sound track and two digital formats, but what we’re interested in are the Dolby Digital packets. These are encoded as patterns superficially similar to a QR code in the space between the sprocket holes.
Looking at the patent he found that they were using Reed-Solomon error correction, making it relatively easy to decode. The patent makes for fascinating reading, as it details how the data was read using early-1990s technology with each line being scanned by a linear CCD, before detailing the signal processing steps followed to retrieve the audio data. If you remember your first experience of Dolby cinema sound three decades ago, now you know how the system worked.
The film featured also had an analogue soundtrack, and if you’d like to know how they worked, we’ve got you covered!