Saving PIC Microcontrollers With DIY Programmer

When working on a project, plenty of us will reach for an Atmel microcontroller because of the widespread prevalence of the Arduino platform. A few hackers would opt for a bit more modern part like an ESP32. But these Arduino-compatible platforms are far from the only microcontrollers available. The flash-based PIC family of microcontrollers is another popular choice. Since they aren’t quite as beginner or user-friendly, setting up a programmer for them is not as straightforward. [Tahmid] needed to program some old PIC microcontrollers and found the Pi Pico to be an ideal programmer.

The reason for reaching for the Pico in the first place was that [Tahmid] had rediscovered these decade-old microcontrollers in a parts bin but couldn’t find the original programmer. Thanks to advances in technology in the last ten years, including the advent of micropython, the Pico turned out to be the ideal programmer. Micropython also enables a fairly simple drag-and-drop way of sending the .hex file to the PIC, so the only thing the software has to do is detect the PIC, erase it, and flash the .hex file. The only physical limitation is that the voltages needed for the PIC are much higher than the Pico can offer, but this problem is easily solved with a boost converter (controlled by the Pico) and a level shifter.

[Tahmid] notes that there’s plenty of room for speed and performance optimization, since this project optimized development time instead. He also notes that since the software side is relatively simple, it could be used for other microcontrollers as well. To this end, he made the code available on his GitHub page. Even if you’re more familiar with the Arduino platform, though, there’s more than one way to program a microcontroller like this project which uses the Scratch language to program an ESP32.

Take The Minimal Pain Out Of ESP32 Programming

Perhaps without many of us realising it, our single board computers perform the task of making programming their processor or SoC a lot easier. They take care of setting the right lines or commands to put the chip in programming mode, they deal with timings, such that we simply fire our code from our dev environment without having to expend much thought. It’s not as though it’s difficult to program most microcontrollers, but there is usually a procedure to set the chip in programming mode. Tired of pressing buttons to achieve this with the ESP32, [DoganM95] took the time to create an all-in-one USB ESP32 programming board.

It’s a straightforward enough CH340C design that also has a USBC-PD chip on-board allowing powering of an attached ESP32 from PD sources. It’s all the stuff you’d find incorporated on a little dev board, without the ESP32, so while it’s nothing earth-shattering it’s also a neat and useful little addition to your arsenal. Unsurprisingly it’s not the first time someone’s created a similar board for a commercially available ESP32 module.

RFM9x module held in an adapter board with flexipins

FlexyPins Might Help With Those Pesky Castellated Modules

[SolderParty] just announced FlexyPins (Twitter, alternative view) – bent springy clips that let you connect modules with castellated pins. With such clips, you can quickly connect and disconnect any castellated module, swapping them without soldering as you’re prototyping, testing things out, or pre-flashing modules before assembly. They’re reportedly gold-plated, and a pack of ~100 will set you back 6EUR, shipping not included.

Of course, this is basically “fancy pieces of wire”, purpose-shaped, gold-plated and, hopefully, made out of material that is springy enough and doesn’t snap easily after bending a few times. We’ve seen this concept used for prototyping before, with random pieces of wire doing a pretty good job of maintaining connectivity, but these clips bring it that much closer to production-grade. It also makes us wonder – just how hard it is to solder 30-40 of them into a circuit? Do they self-align enough with the footprints given, or do you have to hold them with tweezers at a peculiar angle as you solder them? Time will tell, of course.

Continue reading “FlexyPins Might Help With Those Pesky Castellated Modules”

This Debug Connector Brings Your Issues To The Edge

Given an unknown PCBA with an ARM processor, odds are good that it will have either the standard 10 pin 0.05″ or 20 pin 0.1″ debug connector. This uncommon commonality is a boon for an exploring hacker, but when designing a board such headers require board space in the design and more components to be installed to plug in. The literally-named Debug Edge standard is a new libre attempt to remedy this inconvenience.

The name “Debug Edge” says it all. It’s a debug, edge connector. A connector for the edge of a PCBA to break out debug signals. Card edge connectors are nothing new but they typically either slot one PCBA perpendicularly into another (as in a PCI card) or hold them in parallel (as in a mini PCIe card or an m.2 SSD). The DebugEdge connector is more like a PCBA butt splice.

It makes use of a specific family of AVX open ended card edge connectors designed to splice together long rectangular PCBAs used for lighting end to end. These are available in single quantities starting as low as $0.85 (part number for the design shown here is 009159010061916). The vision of the DebugEdge standard is that this connector is exposed along the edge of the target device, then “spliced” into the debug connector for target power and debug.

Right now the DebugEdge exists primarily as a standard, a set of KiCAD footprints, and prototype adapter boards on OSHPark (debugger side, target side). A device making use of it would integrate the target side and the developer would use the debugger side to connect. The standard specifies 4, 6, 8, and 10 pin varieties (mapping to sizes of available connector, the ‘010’ in the number above specifies pincount) offering increasing levels of connectivity up to a complete 1:1 mapping of the standard 10 pin ARM connector. Keep in mind the connectors are double sided, so the 4 pin version is a miniscule 4mm x 4.5mm! We’re excited to see that worm its way into a tiny project or two.

We’ve seen plenty of part-free debug and programming connectors before. Have a favorite? Let us know in the comments!

Turning The Raspberry Pi Into A MCU Programmer

Once you graduate beyond development boards like the Arduino or Wemos D1, you’ll find yourself in the market for a dedicated programmer. In most cases, your needs can be met with a cheap USB to serial adapter that’s not much bigger than a flash drive. The only downside is that you’ve got to manually wire it up to your microcontroller of choice.

Unless you’re [Roey Benamotz], that is. He’s recently created the LEan Mean Programming mAchine (LEMPA), an add-on board for the Raspberry Pi that includes all the sockets, jumpers, and indicator LEDs you need to successfully flash a whole suite of popular MCUs. What’s more, he’s written a Python tool that handles all the nuances of getting the firmware written out.

After you’ve configured the JSON file with the information about your hardware targets and firmware files, they can easily be called up again by providing a user-defined ID name. This might seem overkill if you’re just burning the occasional hex, but if you’re doing small scale production and need to flash dozens of chips, you’ll quickly appreciate a little automation in your process.

Of course, if you’re just trying to flash some code in a pinch, there are some more expedient options out there. We’re particularly fond of using a development board to program the bare MCU.

Continue reading “Turning The Raspberry Pi Into A MCU Programmer”

Simple Pogo Programmer For ESP8266 Modules

ESP8266 development boards like the Wemos D1 Mini and NodeMCU are an excellent way to get a one-off project up and rolling quickly, but their size and relative complexity mean they aren’t necessarily a good choice for even short-run production hardware. On the other hand, programming the bare ESP modules can be something of a pain. But thanks to [Greg Frost], flashing those tiny little boards just got a lot easier.

His 3D printed design uses pogo pins to securely connect to the board’s castellated edges, which also holds it in place during the programming process. On the back side there’s just a few jumper wires and a couple of resistors, which ultimately lead to the FT232R FTDI board that actually connects the chip to the computer so you can program it.

We’d like to see a back panel that encloses the wiring, and perhaps an alternate version that deletes the space for the FTDI board in favor of a row of header pins. Both easy enough modifications to the basic design should [Greg] or anyone else feel so inclined. But even as it is, this is a great little programmer that can be sourced and assembled easily and cheaply.

This isn’t the first 3D printed ESP8266 programmer we’ve seen, and there are some improvised versions which are even cheaper to put together, but this design has a certain professional look that we think will be right at home on your bench.

Pano Logic FGPA Hacking Just Got Easier

When Pano Logic went out of business in 2012, their line of unique FPGA-based thin clients suddenly became a burden that IT departments didn’t want anything to do with. New and used units flooded the second-hand market, and for a while you could pick these interesting gadgets up for not much more than the cost of shipping. Thanks to considerable interest from the hacking community the prices for these boxes have climbed a bit on eBay, but they’re still a great way to get your feet wet with FPGA hacking.

Especially now, as Pano Logic fanatic [Skip Hansen] has figured out how to flash a new firmware on them without having to crack open the case and break out the JTAG or SPI programmer. For the seasoned hardware hacker that might not seem like a big deal, but if you’re new to the game or just more interested in the software side of the equation, this trick makes things considerably more accessible. Having an external programmer is still a good idea if things go south, but if you’re just looking to flash some demos and see what the hardware is capable of this is a huge quality of life improvement.

Even if you aren’t interested in fiddling with the orphaned products of a defunct Bay Area startup, the write-up is a fascinating look at practical software reverse engineering. As it turns out, [Skip] didn’t create this new firmware update tool from scratch. He actually opened up the official Linux update utility from Pano Logic in Ghidra and was able to figure out where the firmware image actually lived inside the program. He then wrote his own tool in C which will patch the update tool with a user-supplied firmware image.

After patching, all you need to do is follow the official update procedure, which Pano Logic helpfully documented in the YouTube video after the break. [Skip] mentions he didn’t find any clear license information in the official software he was fiddling with, and of course with the company out of business it’s not too likely anyone is going to come knocking down his door anyway. Still, he says the downloads for the Pano Logic updater are still floating around on the tubes out there for you to find, so he’s not distributing anyone’s code but his own in this project.

There are a number of hackers out there working to turn the Pano Logic thin clients into useful general purpose FPGA platforms, such as [Tom Verbeure], who’s incredible graphics demos got [Skip] inspired to grab his own unit off eBay. With support for USB and SDRAM added by [Wenting Zhang] while getting his FPGA GBA emulator running on the hardware, it seems there’s never been a better time to get on the Pano Logic train.

Continue reading “Pano Logic FGPA Hacking Just Got Easier”