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.

Building A Pocket Sized Python Playground

Like many of us, [Ramin Assadollahi] has a certain fondness for the computers of yesteryear. Finding his itch for nearly instant boot times and bare metal programming weren’t being adequately scratched by any of his modern devices, he decided to build the PortablePy: a pocket-sized device that can drop him directly into a Python prompt wherever and whenever the urge hits him.

The device is powered by the Adafruit PyPortal Titano, which combines a ATSAMD51J20, ESP32, an array of sensors, and a 3.5″ diagonal 320 x 480 color TFT into one turn-key unit. The PyPortal is designed to run CircuitPython, but the scripts are usually dropped on the device over USB. That’s fine for most applications, but [Ramin] wanted his portable to be usable without the need for a host computer.

For a truly mobile experience, he had to figure out a way to bang out some Python code on the device itself. The answer ended up being the M5Stack CardKB, a tiny QWERTY board that communicates over I2C. Once he verified the concept was sound, he wrote a simple file management application and minimal Python editor that could run right on the PyPortal.

The final step was packaging the whole thing up into something he could actually take off the bench. He designed a 3D printed clamshell case inspired by the classic Game Boy Advance SP, making sure to leave enough room in the bottom half to pack in a charging board and LiPo pouch battery. He did have to remove some of the connectors from the back of the PyPortal to get everything to fit inside the case, but the compact final result seems worth the effort.

While an overall success, [Ramin] notes there are a few lingering issues. For one thing, the keyboard is literally a pain to type on. He’s considering building a custom keyboard with softer buttons, but it’s a long-term goal. More immediately he’s focusing on improving the software side of things so its easier to write code and manage multiple files.

It sounds like [Ramin] isn’t looking to compromise on his goal of making the PortablePy completely standalone, but if your convictions aren’t as strong, you could always connect a device like this up to your mobile to make things a bit easier.

Continue reading “Building A Pocket Sized Python Playground”