Moving Software Down To Hardware

In theory, any piece of software could be built out of discrete pieces of hardware, provided there are enough transistors, passive components, and time available. In general, though, we’re much more likely to reach for a programmable computer or microcontroller for all but the simplest tasks for several reasons: cost, effort, complexity, economics, and sanity. [Igor Brichkov] was working with I2C and decided that he wanted to see just where this line between hardware and software should be by implementing this protocol itself directly with hardware.

One of the keys to “programming” a communications protocol in hardware is getting the timing right, the first part of which is initializing communications between this device and another on the bus. [Igor] is going to be building up the signal in parts and then ORing them together. The first part is a start condition, generated by one oscillator and a counter. This also creates a pause, at which point a second oscillator takes over and sends data out. The first data needed for I2C is an address, which is done with a shift register and a counter pre-set to send the correct bits out on the communications lines.

To build up the rest of the signal, including data from the rotary encoder [Igor] is using for his project, essentially sets of shift registers and counters are paired together to pass data out through the I2C communications lines in sequence. It could be thought of that the main loop of the hardware program is a counter, which steps through all the functions sequentially, sending out data from the shift registers one by one. We saw a similar project over a decade ago, but rather than automating the task of sending data on I2C it allowed the user to key in data manually instead.

Continue reading “Moving Software Down To Hardware”

I2C Sniffing Comes To The Bus Pirate 5

While the Bus Pirate 5 is an impressive piece of hardware, the software is arguably where the project really shines. Creator [Ian Lesnet] and several members of the community are constantly working to add new features and capabilities to the hardware hacking multi-tool, to the point that if your firmware is more than a few days old there’s an excellent chance there’s a fresher build available for you to try out.

One of the biggest additions from the last week or so of development has been the I2C sniffer — a valuable tool for troubleshooting or reverse engineering devices using the popular communications protocol. [Ian] has posted a brief demo video of it in action.

It’s actually a capability that was available in the “classic” versions of the Bus Pirate, but rather than porting the feature over from the old firmware, [Ian] decided to fold the MIT licensed pico_i2c_sniffer from [Juan Schiavoni] into the new codebase. Thanks to the RP2040’s PIO, the sniffer works at up to 500 kHz, significantly outperforming its predecessor.

Admittedly, I2C sniffing isn’t anything you couldn’t do with a cheap logic analyzer. But that means dealing with captures and making sure the protocol decoder is setup properly, among other bits of software tedium. In comparison, once you start the sniffer program on the Bus Pirate 5, I2C data will be dumped out to the terminal in real-time for as long as you care to see it. For reverse engineering, it’s also very easy to move quickly from sniffing I2C packets to replaying or modifying them within the Bus Pirate’s interface.

If you already have a Bus Pirate 5, all you need to do is flash the latest firmware from the automated build system, and get sniffing. On the fence about picking one up? Perhaps our hands-on review will help change your mind.

In A World Without USB…

It is easy to forget that many technology juggernauts weren’t always the only game in town. Ethernet seems ubiquitous today, but it had to fight past several competing standards. VHS and Blu-ray beat out their respective competitors. But what about USB? Sure, it was off to a rocky start in the beginning, but what was the real competition at that time? SCSI? Firewire? While those had plusses and minuses, neither were really in a position to fill the gap that USB would inhabit. But [Ernie Smith] remembers ACCESS.bus (or, sometimes, A.b) — what you might be using today if USB hadn’t taken over the world.

Back in the mid-1980s, there were several competing serial bus systems including Apple Desktop Bus and some other brand-specific things from companies like Commodore (the IEC bus) and Atari (SIO). The problem is that all of these things belong to one company. If you wanted to make, say, keyboards, this was terrible. Your Apple keyboard didn’t fit your Atari or your IBM computer. But there was a very robust serial protocol already in use — one you’ve probably used yourself. IIC or I2C (depending on who you ask).

Continue reading “In A World Without USB…”

Close up of a typewriter annex SMS-receiver

Back To The Future Of Texting: SMS On A Panasonic Typewriter

Among us Hackaday writers, there are quite a few enthusiasts for retro artifacts – and it gets even better when they’re combined in an unusual way. So, when we get a tip about a build like this by [Sam Christy], our hands sure start itching.

The story of this texting typewriter is one that beautifully blends nostalgia and modern technology. [Sam], an engineering teacher, transformed a Panasonic T36 typewriter into a device that can receive SMS messages, print them out, and even display the sender’s name and timestamp. For enthusiasts of retro gadgets, this creation bridges the gap between analog charm and digital convenience.

What makes [Sam]’s hack particularly exciting is its adaptability. By effectively replacing the original keyboard with an ESP32 microcontroller, he designed the setup to work with almost any electric typewriter. The project involves I2C communication, multiplexer circuits, and SMS management via Twilio. The paper feed uses an “infinite” roll of typing paper—something [Sam] humorously notes as outlasting magnetic tape for storage longevity.

Beyond receiving messages, [Sam] is working on features like replying to texts directly from the typewriter. For those still familiar with the art form of typing on a typewriter: how would you elegantly combine these old machines with modern technology? While you’re thinking, don’t overlook part two, which gives a deeper insight in the software behind this marvel!

Continue reading “Back To The Future Of Texting: SMS On A Panasonic Typewriter”

Sniffing Around Inside A ThinkPad Battery

For most people, a battery pack that’s misbehaving simply means it’s time to get a new battery. But when the battery in their ThinkPad wasn’t able to muster up more than 20 minutes of runtime, [Shrinath Nimare] saw an opportunity to dig deeper and do a bit of investigating.

The problem seemed to be that the battery pack was reporting that it was 100% charged at just 11.7 V instead of the correct 12.3 V. As it turns out, that 11.7 V figure is only slightly above what the battery should be when its run flat — so in reality, the battery was never actually getting a charge and would report that it was dead after just a few minutes of use. But why?

With a logic analyzer attached to the pins of the battery, [Shrinath] set out to sniff its communications with the ThinkPad.  Even if it wouldn’t lead to fixing the battery pack, the information obtained would potentially be useful for other projects, such as creating a custom high-capacity LiFePO4 pack down the line.

Continue reading “Sniffing Around Inside A ThinkPad Battery”

I2C The Hard Way

[Igor] has an AS5600 magnetic rotary encoder chip on a breakout board. Normally, you’d think that was an easy device to work with since it has an I2C interface. But [Igor] wanted to do it the hard way. What’s the hard way? By hand. He directly manipulates the clock and data lines using some push buttons. You can see how it goes in the video below.

This is possible because the controlling device — in this case [Igor] — gets to set the clock rate, and there’s no reason it has to be regular. We have to admit that it never occurred to us to do this, but we have written “bit banged” I2C-like code before.

Continue reading “I2C The Hard Way”

2024 Tiny Games Contest: A Flappy Seagull Game With Sound In Only 500 Bytes

It was probably a reasonable assumption that the “Tiny” in our recently concluded Tiny Games Contest mostly referred to the physical footprint of the game. And indeed, that’s the way most of the entries broke, which resulted in some pretty amazing efforts. [Anders Nielsen], however, took the challenge another way and managed to stuff a seagull-centric side-scroller into just 500 bytes of code.

That’s not to say that the size of [Anders]’s game is physically huge either. Flappy Larus, as he calls his game, runs on his popular 65uino platform, a 6502 microcontroller in the familiar Arduino Uno form factor. So it’s pretty small to begin with, and doesn’t even need any additional components other than the tiny OLED screen which has become more or less standard for the 65uino at this point. The only real add-on is a piezo speaker module, which when hooked up to the I2C data line happens to make reasonable approximations of a squawking seagull, all without adding a single byte of code. Check out a little game play in the video below.

Flappy Larus may be pretty simplistic, but as we recall, the game it’s based on was similarly minimalist and still managed to get people hooked. The 2024 Tiny Games contest is closed now, but if you’ve got an idea for a tiny game, we’d still love to feature it. Hit the tip line and we’ll take a look! Continue reading “2024 Tiny Games Contest: A Flappy Seagull Game With Sound In Only 500 Bytes”