Designing A Single Instruction Computer

Today’s computers are unimaginably complex, and so complicated it’s nearly impossible for anyone to comprehend everything a CPU can do in excruciating detail. It wasn’t always like this – the early CPUs of the 70s and 80s were relatively simple and can easily be recreated at the individual gate level. CPUs can be even simpler, as [Jack Eisenmann] demonstrates with a single instruction computer, the DUO Compact 2, made entirely out of 74-series logic chips and a bunch of memory.

[Jack] has a long history of building strange computers out of individual chips, including a TTL logic CPU and a significantly more complicated single instruction computer. The latest, though, is as simple as it gets. It’s just twenty chips, capable of calculating prime numbers, sorting strings, and everything else a computer is able to do.

With every one-instruction computer, there is the obvious question of what instruction this computer uses. For the DUO Compact 2 it’s a single instruction that accepts three arguments, A, B, and C. The instruction copies a byte from A to B, then jumps to the instruction at C. Is it even possible for a computer to add two numbers with this instruction? Yes, if you have massive look up tables stored in 2 Megabytes of Flash and 512 kB of RAM.

In the video below, [Jack] goes over how his tiny computer works and demonstrates prime number generation (it’s slow), string sorting (also slow), and displaying ’99 bottles of beer on the wall’ on the computer’s LCD. All the files to replicate this computer are available on [Jack]’s webpage, along with an emulator in case you don’t want to break out a breadboard for this one.

Continue reading “Designing A Single Instruction Computer”

The Raspberry Pi Infinity+ Is A Fully Functional Huge Raspberry Pi

It wasn’t an easy weekend for the rest of the world’s hackers and makers, that of the Bay Area Maker Faire. Open your social media accounts, and most of your acquaintances seemed to be there and having a great time, while the rest were doing the same at the Dayton Hamvention. Dreary televised sports just didn’t make up for it.

MCM Electronics had the Maker Faire booth next to that of the Raspberry Pi Foundation, and since they needed both a project to show off and a statement item to draw in the crowds, they came up with the idea of a 10x scale reproduction of a Raspberry Pi above the booth. And since it was Maker Faire this was no mere model; instead it was a fully functional Raspberry Pi with working LEDs and GPIO pins.

The project started with a nearly faithful (We see no Wi-Fi antenna!) reproduction of a Raspberry Pi 3 in Adobe Illustrator. The circuit board was a piece of MDF with a layer of foam board on top of it with paths milled out for wiring and the real Pi which would power the model, hidden under the fake processor. The LEDs were wired into place, then the Illustrator graphics were printed into vinyl which was wrapped onto the board, leaving a very two-dimensional Pi.

The integrated circuits and connectors except for the GPIO pins were made using clever joinery with more foam board, then wrapped in more printed vinyl and attached to the PCB. A Pi camera was concealed above the Broadcom logo on the processor model, to take timelapse pictures of the event. This left one more component to complete, the GPIO pins which had to be functional and connected to the pins on the real Pi concealed in the model. These were made from aluminium rods, which were connected to a bundle of wires with some soldering trickery, before being wired to the Pi via the screw terminals on a Pi EZ-Connect HAT from Alchemy Power.

Is the challenge now on for a range of compatible super-HATs to mate with this new GPIO connector standard?

We previously covered the 2012 Maker Faire exhibit that inspired this huge Pi. The Arduino Grande was as you might well guess, a huge (6x scale) fully functional Arduino. In fact, the world seems rather short of working huge-scale models of single board computers, though we have featured one or two working small-scale computer models.

Thanks [Michael K Castor] and [Christian Moist] for sharing their project with us.

Does Intel Measure Up At The Austin X Games?

Intel made an appearance at the recent summer X Games in Austin, TX with the Curie, a gadget for sensing the motion and position of skateboarders and BMXers. The Curie, attached to the bikes or helmets, measured the dynamics of the tricks performed by the participants.

An Intel 32 bit Quark SE system on a chip sent the telemetry data in real-time using Bluetooth. The module contains an accelerometer and gyroscope to capture all the twists, turns, and tumbles of the athletes. An analysis of the data was presented as part of the on-screen graphic displays of the events.

Continue reading “Does Intel Measure Up At The Austin X Games?”

An Atari ST Rises From The Ashes

We’ve all made rash and impulsive online purchasing decisions at times. For [Drygol] the moment came when he was alerted to an Atari 1040STe 16-bit home computer with matching monitor at a very advantageous price.

Unfortunately for him, the couriers were less than careful with his new toy. What arrived was definitely an ST, but new STs didn’t arrive in so many pieces of broken ABS. Still, at least the computer worked, so there followed an epic of case repair at the end of which lay a very tidy example of an ST.

He did have one lucky break, the seller had carefully wrapped everything in shrink-wrap so no fragments had escaped. So carefully applying acetone to stick the ABS together he set to work on assembling his unexpected 3D jigsaw puzzle. The result needed a bit of filler and some sanding, but when coupled with a coat of grey paint started to look very like an ST case that had just left the factory. Adding  modern SD card and USB/Ethernet interfaces to the finished computer delivered a rather useful machine as you can see in the video below the break.
Continue reading “An Atari ST Rises From The Ashes”

Data Logging; Everyone’s Doing It, Why Aren’t You?

Between Tesla Motors’ automobiles and SpaceX’s rockets, Elon Musk’s engineers just have to be getting something right. In part, SpaceX’s success in landing their first stage rockets is due to analysis of telemetry data. You can see some of the data from their launch vehicles on the live videos and there is surely a lot more not shown.

An article in MIT Technology Review provides similar insights in how Tesla came from behind in autonomous vehicle operation by analyzing telemetry from their cars. Since 2014 their Model S received an increasing number of sensors that all report their data over the vehicle’s always-on cellular channel. Sterling Anderson of Tesla reported they get a million miles of data every 10 hours.

Image Credit Tesla
Image Credit Tesla

The same approach can help us to improve our systems but many believe creating a log of key data is costly in time and resources. If your system is perfect (HA HA!) that would be a valid assessment. All too often such data becomes priceless if analysis explains why your drone or robot wanted to go left into a building instead of right into the open field.

Continue reading “Data Logging; Everyone’s Doing It, Why Aren’t You?”

Metalized Gift Wrap Saves A Classic Keyboard

What do you do when you decide that running CP/M on a Commodore 128 with a 5.25″ drive “Isn’t CP/M enough”? If you are [FozzTexx], you reach for your trusty TRS-80 Model II, with its much more CP/M-appropriate 8″ drive.

There was one small snag with the TRS-80 though, its keyboard didn’t work. It’s a capacitive device, meaning that instead of each key activating a switch, it contains a capacitive sensor activated by a piece of aluminized Mylar film on a piece of foam. Nearly four decades of decay had left the foam in [FozzTexx]’s example sadly deflated, leaving the keys unable to perform. Not a problem, he cast around for modern alternatives and crafted replacements from a combination of foam weather strip and metalized gift wrap.

Care had to be taken to ensure that the non-metalized side of the gift wrap faced the capacitive sensor pads, and that the weather strip used had the right thickness to adequately fill the gap. But the result was a keyboard that worked, and for a lot less outlay and effort than he’d expected. We would guess that this will be a very useful technique for owners of other period machines with similar keyboards.

What is CP/M, I hear you ask? Before there was Linux, Windows, and MacOS, there was DOS, and before DOS, there was CP/M. In the 1970s this was the go-to desktop operating system, running on machines powered by Intel’s 8080 and its derivatives like the Zilog Z80 in the TRS-80. When IBM needed an OS for their new PC they initially courted CP/M creators Digital Research, but eventually they hired a small software company called Microsoft instead, and the rest is history. Digital Research continued producing CP/M and its derivatives, as well as an MS-DOS clone and the GEM GUI that may be familiar to Atari ST owners, but were eventually absorbed into Novell in the 1990s.

We’ve featured a few capacitive keyboards here at Hackaday before, including this similar repair to a Compaq from the 1980s, and this look at a classic IBM terminal keyboard.

Learn To Program With Literate Programming

My heyday in programming was about five years ago, and I’ve really let my skills fade. I started finding myself making excuses for my lack of ability. I’d tackle harder ways to work around problems just so I wouldn’t have to code. Worst of all, I’d find myself shelving projects because I no longer enjoyed coding enough to do that portion. So I decided to put in the time and get back up to speed.

Normally, I’d get back into programming out of necessity. I’d go on a coding binge, read a lot of documentation, and cut and paste a lot of code. It works, but I’d end up with a really mixed understanding of what I did to get the working code. This time I wanted to structure my learning so I’d end up with a more, well, structured understanding.

However, there’s a problem. Programming books are universally boring. I own a really big pile of them, and that’s after I gave a bunch away. It’s not really the fault of the writer; it’s an awkward subject to teach. It usually starts off by torturing the reader with a chapter or two of painfully basic concepts with just enough arcana sprinkled in to massage a migraine into existence. Typically they also like to mention that the arcana will be demystified in another chapter. The next step is to make you play typist and transcribe a big block of code with new and interesting bits into an editor and run it. Presumably, the act of typing along leaves the reader with such a burning curiosity that the next seventeen pages of dry monologue about the thirteen lines of code are transformed into riveting prose within the reader’s mind. Maybe a structured understanding just isn’t worth it.

I wanted to find a new way to study programming. One where I could interact with the example code as I typed it. I wanted to end up with a full understanding before I pressed that run button for the first time, not after.

When I first read about literate programming, my very first instinct said: “nope, not doing that.” Donald Knuth, who is no small name in computing, proposes a new way of doing things in his Literate Programming. Rather than writing the code in the order the compiler likes to see it, write the code in the order you’d like to think about it along with a constant narrative about your thoughts while you’re developing it. The method by which he’d like people to achieve this feat is with the extensive use of macros. So, for example, a literate program would start with a section like this:

Continue reading “Learn To Program With Literate Programming”