Implementing A CPU Using 555 Timers And Logic Synthesis

There is many a comment on these here pages along the lines of “Why did you use a microcontroller, when you could just have easily used a 555 timer!” And, yes, we sometimes agree with the sentiment, but when a chance comment seen by Hackaday.io user [Tim Böscke] suggested turning it around and building a microcontroller out of 555 timers, the gauntlet was well and truly thrown down. Now let’s be clear, this is not the first time we’ve come across this idea, there was a breadboard 555 based build ten years ago, but this is the first time we’ve seen it done by leveraging open source synthesis targeting a PCB!

The first logic element was a simple inverter, constructed by tying the TRIGger and THReShold pins together.

LTSpice model of a NAND gate implemented with 555 and diodes

From there it was a simple matter of adding a few diode-resistor networks to the input, to effect a NAND2 gate and a NOR2 gate. Development was speeded up a bit by modeling the logic circuits in LTSpice, to find the best combination of part values. From these simple elements, all further logic functions could be implemented. Next a memory element was needed. As luck would have it, the 555 has a RS flip flop as part of its circuit, fed by dual comparator inputs. All that was needed was to bias the THRS input at Vdd/2 and then feed the data in via a pass transistor, and hey presto! a serviceable, albeit slow latch.

Continue reading “Implementing A CPU Using 555 Timers And Logic Synthesis”

SCAMP runs SCAMP/os

Homebrew 16 Bit Computer Reinvents All The Wheels

Building your own computer has many possible paths. One can fabricate their own Z80 or MOS 6502 computers and then run a period correct OS. Or a person could start from scratch as [James Stanley] did. [James] has invented a completely unique computer and CPU he calls SCAMP. SCAMP runs a custom OS called SCAMP/os which you can check out in the video below the break.

[James] describes the CPU and computer as purposefully primitive. Built out of discrete 74xx series logic chips, it runs at a fast-enough-for-homebrew 1 MHz. Plus, it has a lot of blinking lights that can’t help but remind us of the original Imsai 8080. But instead of a panel of switches for programming, the SCAMP/os boots to a shell, which is presented through a serial terminal. Programs are written in a bespoke language with its own compiler. The OS is described as a having a Unix-like feel with CP/M-like functionality. That’s quite a combination!

What we love most about the build, other than its clean looks and blinkenlights, is the amount of work that [James] has put into documenting the build both on his blog and on Github, where the source code and design is available. There’s also an open invitation for contributors to help advance the project. We’re sure he’ll get there, one bit at a time.

While [James] is using a Compact Flash card for storage currently we can’t help but wonder if a Cassette Tape storage system might be a worthwhile future upgrade.

Continue reading “Homebrew 16 Bit Computer Reinvents All The Wheels”

What’s The Deal With UEFI?

It seems like there are two camps, the small group of people who care about UEFI and everyone else who doesn’t really notice or care as long as their computer works. So let’s talk about what UEFI is, how it came to be, what it’s suitable for, and why you should (or shouldn’t) care.

Continue reading “What’s The Deal With UEFI?”

C Is The Greenest Programming Language

Have you ever wondered if there is a correlation between a computer’s energy consumption and the choice of programming languages? Well, a group of Portuguese university researchers did and set out to quantify it. Their 2017 research paper entitled Energy Efficiency across Programming Languages / How Do Energy, Time, and Memory Relate?  may have escaped your attention, as it did ours.

Abstract: This paper presents a study of the runtime, memory usage and energy consumption of twenty seven well-known soft- ware languages. We monitor the performance of such lan- guages using ten different programming problems, expressed in each of the languages. Our results show interesting find- ings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consump- tion. We show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern.

While we might take issue with some of the programming languages selected as being “well known”, the project was very thorough and quite well documented. Most people would take for granted that a computer program which runs faster will consume less energy. But this might not always be true, as other factors enter into the power consumption equation besides speed. The team used a collection of ten standard algorithms from the Computer Language Benchmarks Game project (formerly known as The Great Computer Language Shootout) as the basis for their evaluations.

Last year they updated the functional language results, and all the setups, benchmarks, and collected data can be found here. Check out the paper for more details. Have your choice of programming language ever been influenced by energy consumption?

A breadboard filled with logic chips and wiring

SPAM-1 Is A Well-Documented Discrete CPU With An Impressive Software Library

Here at Hackaday we love projects that are so well-documented that you can spend days reading up on what the designer has achieved. [John Lonergan] didn’t disappoint when he designed the SPAM-1, an 8-bit CPU built from discrete logic gates. His detailed log contains a wealth of information on such things as designing opcodes, optimizing program counter logic, running a digital simulation, as well as his thoughts on microcode design. The sheer volume of it may be a bit off-putting to beginners, so it might be best to start with the video series that describes the architecture and goes into detail on several sub-blocks.

The design has changed a bit since [John] first started on the project, as he decided to add more and more features, but the final result is a well-thought out architecture that keeps the simplicity needed for discrete hardware but still has enough features to keep it interesting for seasoned CPU aficionados. The instruction size is rather large (48 bits) to simplify the instruction decoding at the expense of larger code size. Conditional jump instructions are not present; instead, all instructions have an optional control flag to make them conditional, a feature inspired by the ARM instruction set.

Once the design was mature enough, [John] modelled the entire thing in Verilog and simulated his design to verify correct operation and to check the timings, estimating it to be workable up to 5 MHz or so. A large stack of breadboards and DIP chips from the 74xx series then brought the design to life.

Not content with simply designing, simulating and implementing a custom CPU in hardware, [John] also spent significant effort on the software side of things, writing an assembler and even a C-like compiler for the SPAM-1 platform. And if that wasn’t enough, he also added an emulator for the classic CHIP-8 language, which allows it to run existing programs like Pong and Tetris. Input and output for all this software is mostly through a UART connection to a PC. A VGA interface is still on [John]’s to-do list, but he did build an adapter to connect a classic NES controller to the system.

The SPAM-1 is a worthy addition to the long list of discrete-logic CPUs we’ve seen here, such as this breadboard computer running a UNIX-like OS or this minimalistic one. If you’d like to see one that implements an existing instruction set, try this homebrew RISC-V computer.

Continue reading “SPAM-1 Is A Well-Documented Discrete CPU With An Impressive Software Library”

A GPU card with a home-made fan assembly

3D-printed Fan Mount Keeps Server GPU Cool In Desktop Case

Most readers of Hackaday will be well aware of the current shortages of semiconductors and especially GPUs. Whether you’re planning to build a state-of-the art gaming PC, a mining rig to convert your kilowatt-hours into cryptocoins, or are simply experimenting with machine-learning AI, you should be prepared to shell out quite a bit more money for a proper GPU than in the good old days.

Bargains are still to be had in the second-hand market though. [Devon Bray] chanced upon a pair of Nvidia Tesla K80 cards, which are not suitable for gaming and no longer cost-effective for mining crypto, but ideal for [Devon]’s machine-learning calculations. However, he had to make a modification to enable proper thermal management, as these cards were not designed to be used in regular desktop PCs.

The reason for this is that many professional-grade GPU accelerators are installed in rack-mounted server cases, and are therefore equipped with heat sinks but no fans: the case is meant to provide a forced air flow to carry away the card’s heat. Simply installing the cards into a desktop PC case would cause them to overheat, as passive cooling will not get rid of the 300 W that each card pumps out on full load.

[Devon] decided to make a proper thermal solution by 3D printing a mount that carries three fans along with an air duct that snaps onto the GPU card. In order to prevent unnecessary fan noise, he added a thermal control system consisting of a Raspberry Pi Pico, a handful of MOSFETs, and a thermistor to sense the GPU’s temperature, so the fans are only driven when the card is getting hot. The Pi Pico is of course way more powerful than needed for such a simple task, but allowed [Devon] to program it in MicroPython, using more advanced programming techniques than would be possible on, say, an Arduino.

We love the elegant design of the fan duct, which enables two of these huge cards to fit onto a motherboard side-by-side. We’ve seen people working on the opposite problem of fitting large fans into small cases, as well as designs that discard the whole idea of using fans for cooling.

Continue reading “3D-printed Fan Mount Keeps Server GPU Cool In Desktop Case”

Hacking An Obsolete Yet Modern Calculator

The gold standard for graphing calculators, at least in the US, are the Texas Instruments TI-84 series. Some black sheep may have other types, but largely due to standardized testing these calculators dominate the market. Also because of standardized testing, these calculators have remained essentially unchanged for decades. While this isn’t great for getting value for money, it does mean that generations of students have been able to hack on these calculators to do all kinds of interesting things as [George Hilliard] outlines.

Even before the creation of these graphing calculators, the z80 processor behind them was first produced over four decades ago and was ubiquitous in the computer scene at the time, which also lends to its hackability. There’s plenty to catch up on here, too, from custom TI games that trick the two-tone display into grayscale to Game Boy emulators that can play Zelda since the TI and Game Boy share the same processors. There are also several methods of running native code or otherwise “jailbreaking” these devices to run arbitrary code.

It looks like the world of TI hacking is alive and well now, and with several decades of projects to browse there’s always something new to find. As it stands, there may be more decades of these types of projects to come, since neither TI nor the various testing standardization companies and government agencies show any signs of changing any time soon.

Thanks to [Adrian] for the tip!