Upgrade Board Adds GPIO Pins To Your Replica PDP-11

Like many Hackaday readers, [Steven Stallion] has had his eyes on the replica PDP-11 created by [Oscar Vermeulen] for some time now, and this summer he finally got the opportunity to build one himself. But while most owners might be content to just watch the Raspberry Pi based faux-retro computer blink away on a shelf, he wanted to explore putting the machine to more practical use. The end result is the PiDP-11 I/O Expander,  an add-on that lets the modern minicomputer interact with the world around it.

Developed after some discussion with [Oscar] himself, the Microchip MCP23016 based expander board fits neatly onto the PiDP-11 PCB, and [Steven] has made sure his installation guide meshes well with the replica’s documentation. The Pi’s I2C bus is actually broken out on the original PCB, so you just need to solder a header on and run some jumpers to where the expander is mounted. You’ll need to pull 5 V as well, and the installation guide has a few tips on convenient connection points.

The installed PiDP-11 I/O Expander

Each expander board gives you 16 GPIO pins which can be accessed over I2C, including support for interrupts which has been connected to GPIO 19 on the Raspberry Pi. [Steven] notes that you should be able to stack multiples of his expander up should you need even more free pins, though some fiddling with pull-up resistors and I2C addresses will likely be necessary.

The PCBs for the expander have been released under the two clause BSD license, so you’re free to spin up your own copies however you see fit. But if you’d like to save some time, [Steven] is offering assembled boards on Tindie.

Since [Oscar] first teased it at the 2015 Hackaday Supercon, we’ve been enamored with his fantastic PDP-11 replica. We’re always glad to see when somebody has picked up one of these wonderful kits, and doubly so when they’ve figured out a way to expand it in unexpected ways.

Here’s How To Sniff Out An LCD Protocol, But How Do You Look Up The Controller?

Nothing feels better than getting a salvaged component to do your bidding. But in the land of electronic displays, the process can quickly become a quagmire. For more complex displays, the secret incantation necessary just to get the things to turn on can be a non-starter. Today’s exercise targets a much simpler character display and has the added benefit of being able to sniff the data from a functioning radio unit.

When [Amen] upgraded his DAB radio he eyed the 16×2 character display for salvage. With three traces between the display and the controller it didn’t take long to trace out the two data lines using an oscilloscope. Turing on the scope’s decoding function verified his hunch that it was using I2C, and gave him plenty of data to work from. This included a device address, initialization string, and that each character was drawn on screen using two bytes on the data bus.

He says that some searching turned up the most likely hardware: a Winstar WO1602I-TFH- AT derived from an ST7032 controller. What we’re wondering is if there is a good resource for searching this kind of info? Our go-to is the LCD display and controller reference we covered here back in March. It’s a great resource, but turns up bupkis on this particular display. Are we relegated to using DuckDuckGo for initialization strings and hoping someone’s published a driver or a logic dump of these parts in the past, or is there a better way to go about this? Let us know in the comments!

An OLED Photo Frame Powered By The ATtiny85

Rolling your own digital picture frame that loads images from an SD card and displays them on an LCD with a modern microcontroller like the ESP32 is an afternoon project, even less if you pull in somebody else’s code. But what if you don’t have the latest and greatest hardware to work with?

Whether you look at it as a practical application or an interesting experiment in wringing more performance out of low-end hardware, [Assad Ebrahim]’s demonstration of displaying digital photographs on an OLED using the ATtiny85 is well worth a look. The whole thing can put put together on a scrap of perfboard with a handful of common components, and can cycle through the five images stored on the chip’s flash memory for up to 20 hours on a CR2032 coin cell.

As you might expect, the biggest challenge in this project is getting all the code and data to fit onto the ATtiny85. To that end [Assad] wrote his own minimal driver for the SSD1306 OLED display, as the traditional Adafruit code took up too much space. The driver is a pretty bare bones implementation, but it’s enough to initialize the screen and get it ready for incoming data. His code also handles emulating I2C over Atmel’s Universal Serial Interface (USI) at an acceptable clip, so long as you bump the chip up to 8 MHz.

For the images, [Assad] details the workflow he uses to take the high-resolution color files and turn them into an array of bytes for the display. Part of that it just scaling down and converting to 1-bit color, but there’s also a bit of custom Forth code in the mix that converts the resulting data into the format his code expects.

This isn’t the first time we’ve seen somebody use one of these common OLED displays in conjunction with the ATtiny85, and it’s interesting to see how their techniques compare. It’s not a combination we’d necessarily chose willingly, but sometimes you’ve got to work with whats available.

I2C Paper Tape Reader Is Not What You Think

We’re not quite sure what drove the development of this project, but [shapoco] has put together an intriguing device that reads I2C signals (Japanese Twitter link) which have been printed as black and white rectangles on paper tape. He wrote a program that prints an I2C byte stream onto strips containing the SCL and SDA signal patterns. Once printed, you cut the strips from the paper and glue them together into one long piece, making a complete message — in this case, commands to a small LCD screen that will display the phrase “Hello, Tape I2C”.

We’re not sure exactly sure what’s inside that rectangular widget epoxied to the bottom of that perf board through which the tape passes. But clearly, it must contain a pair of LEDs to illuminate the tape and a pair of sensors to detect the reflection off the tape (looking at the wiring, it seems unlikely that anything is mounted underneath the tape). According to one machine-translated Twitter message, detection is done using a Schmitt trigger made from an LM393 comparator with hysteresis (see this TI app note for a review of this type of circuit). Here’s a scope capture of the resulting signals. [Shapoco] notes that the circuit can operate much faster — the tape is being pulled slowly in the video to make it easier to see.

This is not [shapoco]’s first experiment in optical I2C communications. Check out the second video down below where he’s reading I2C signals from a computer’s display. One person tweeted about how software source code was sometimes printed optically in old Byte magazines many years ago, a topic we talked about in Hackaday Podcast #049 last year when discussing Cauzin strips.

Besides just being cool, and possibly helpful as an educational device, does this technique have any real-world applications these days? Let us know your thoughts in the comment section below. Thanks to [Manawyrm] for sending us this tip.

Continue reading “I2C Paper Tape Reader Is Not What You Think”

Bridging The PC And Embedded Worlds With Pico And Python

Although protocols like I2C and SPI are great for communicating between embedded devices and their peripherals, it can be a pain to interface these low-level digital interfaces to a PC. [Alexandre] typically used an Arduino to bridge between the PC and embedded worlds, but he got tired of defining a custom serial protocol for each project. Inspired by MicroPython’s machine module, [Alexandre] has developed u2if—an implementation of some of MicroPython’s machine module for PC—using a USB-connected Raspberry Pi Pico to bridge between a PC and low-level digital interfaces.

u2if consists of two parts: the PC portion is a Python implementation of a portion of the MicroPython machine module, and the Raspberry Pi Pico receives some custom C++ firmware. Thus far, [Alexandre] has implemented functionality for the onboard ADCs, I2C, SPI, UART, and GPIO lines as well as additional support for I2S sound and the WS2812B addressable LED.

Development board for Raspberry Pi Pico.

In addition to the u2if package, [Alexandre] has designed a PCB to break out all of the Raspberry Pi Pico’s interfaces in a handy 3×3.9″ board. We especially like that multiple headers are supplied for I2C, including one with enough space to mount an SSD1306 OLED display.

We think this could be an incredibly useful tool, and what makes it even more impressive is that it uses a board many of us already have laying around. If you want a dedicated device for interfacing with low-level digital buses, you may want to check out the GreatFET.

Removing Supervisor Passwords And Learning Python

When learning a new programming language, it’s best to have a goal in mind and work towards it. [Timo] thought it was about time to learn python, and he also had a project in mind: removing the BIOS supervisor password from his old Thinkpad. From there it was just a few keystrokes (and some soldering) and he was able to change the BIOS password of this black box from the outside.

The build utilizes a BeagleBone to communicate with the laptop’s EEPROM via the I2C bus. An oscilloscope also monitors the bus to look for a specific window every four-seconds when the computer is not accessing the bus. During that short period, the EEPROM can be read and written to. Once the window opens, the BeagleBone executes the Python script, which attempts to read the EEPROM and can also perform actions such as removing or changing the BIOS supervisor password.

Of course, tinkering with the EEPROM on a laptop has a high risk of bricking the device, and not all laptops use the same security measures or even memory addresses for things like this, so documentation and precision are key. Also, with Thinkpads of this vintage it’s possible to replace the firmware on these chips entirely with a FOSS version called libreboot, and even though the process is difficult, it’s definitely recommended.

Continue reading “Removing Supervisor Passwords And Learning Python”

DIY I2C Tester

[Dilshan] built a dedicated I2C tester which allows for I2C bus control over USB using simple commands such as init, read, write, etc. The Linux kernel has had I2C driver support for a couple of decades, but you’ll be hard pressed to find a computer or laptop with a I2C connector (excluding Bunnie Huang’s Novena hacker’s laptop, of course). This tester does require a Linux host, and his programs use libusb on the computer side and V-USB on the embedded side.

[Dilshan] put a lot of time into building this project, and it shows in the build quality and thorough documentation. With its single-sided PCB and all thru-hole construction, it makes a great beginner project for someone just getting into the hobby. At the heart of the tester is an ATmega16A in a 40-pin PDIP package (despite the Microchip overview page calling it a 44-pin chip), supported by a handful of resistors and transistors. Schematics are prepared in KiCad, code is compiled using gcc and avr-gcc, and he provides a label for the enclosure top. The only thing missing is information on the enclosure itself, but we suspect you can track that down with a little sleuthing (or asking [Dilshan] himself).

If you use I2C quite a lot, give this project a look. Easy to build, useful in the lab, and it looks nice as well. We have featured [Dilshan]’s work over the years, including this logic pattern generator and his two-transistor-on-a-breadboard superheterodyne receiver.