Abstracting transistors into high-level design

Although it’s not the best way of understanding computers, most people tend to imagine electronic devices as black boxes filled with magic and blue smoke. Even microcontrollers, the most fundamental means of computation, are treated like little black plastic centipedes with metal legs. In a series of blog posts, [Andrew Gibiansky] is tearing down the walls of obfuscation and illuminating the world of transistors, gates, and FPGAs.

The first blog post goes over the idea of electronic circuits as a waterfall; a positive voltage is a reservoir on a mountain top and ground is sea level. This idea is extended to the lowly transistor acting as an electronic switch, able to turn a circuit on and off.

Continuing on to logic gates, [Andrew] covers the NOT, AND, and OR gates before moving on the flip-flops and SRAM. These can, of course, be modeled in Verilog and VHDL – programming languages that abstract the world of transistors and gates into a much more human-readable form.

[Andrew] is far from done with his series of blog posts, but judging from his work so far it seems to be a great resource for untangling the obtuse concepts of gates and memory into the coherent design of a computer.

7400 frequency counter

This frequency counter is [Miguel Pedroso’s] entry in the 7400 Logic contest. After looking at the design we think this is a perfect project for those who have not worked with logic ICs before. The concept is simple and [Miguel] does a great job of explaining his implementation.

At its heart the device simply counts the oscillations of an input signal for one second, then latches the total to the 7-segment displays before zeroing the counter block and starting over. Six 4029 decade counters give the device a range of 1MHz. A set of 4511 BCD to 7-segment decoders translate the count to the display. A 4521 frequency divider chip uses an on-board 4.194304 MHz crystal oscillator to time both the display latching and the counter clearing. [Miguel] mentions that tuning the load capacitors is a bit tricky. Since breadboards have their own capacitance issues it may be necessary to change the load capacitor values when moved to protoboard or the crystal won’t start oscillating. You can see those caps are not the same value, but the tests in the video after the break show that this is pretty much spot-on.

If you’d rather give this a try in HDL here’s an FPGA-based frequency counter from which you can draw some inspiration.

Continue reading “7400 frequency counter”

Two-player Tic-Tac-Toe from logic chips

Here’s another entry in the 7400 Logic contest. [Circuitchef] used gates and a few flip-flops to build a two-player electronic Tic-Tac-Toe game. The full details or shared in the PDF file he links to in his post. We’ve also linked to it after the break in case the Dropbox he is using becomes unavailable.

He provides a nice block diagram which helps to understand the game’s design. The board is arranged in a 3×3 matrix of momentary push buttons and bi-color LEDs. Each player takes turns pushing the button in the square they’d like to claim. The input circuitry uses flip-flops to establish which player’s turn it is, illuminating the appropriate color for that square. A set of 3-input AND gates monitor all possible combinations of winning patterns. The outputs of those gates are OR’d down to just one output which is used to light up the ‘Winner’ LED with the right color. If all boxes are lit up and none of those combinations is satisfied the game is declared a draw. This can all be seen in the demo embedded below the fold.

Continue reading “Two-player Tic-Tac-Toe from logic chips”

Pull-string most useless machine

The mechanical simplicity of this pull-string controlled most useless machine is delightful. You can see the metal gripper which is reaching up to tug on a light-fixture-style pull chain. This is how it turns itself off after you’ve pulled the string to power it up.

The device is [Alex555’s] entry in the 7400 Logic competition. We do hope that he ends up posting a schematic because we’d love to see the gritty details of how it works. After the break you can watch two doors open, allowing the arm to raise up and the gripper to grab the chain. This takes just four servo motors, which are controlled by the signal from a 555 timer and some accompanying hardware.

Apparently the chain is a fake, as the servos didn’t provide enough force to actuate that type of switch. It’s not a surprise as those pull chains do require quite a tug. An optical sensor was used to trigger the movement when your hand reaches for the chain.

Continue reading “Pull-string most useless machine”

7400 project encrypts and decrypts data

[Nakul], [Nikilesh], and [Nischal] just finished posting about their entry in the 2012 Open 7400 Logic competition. It’s an encryption system based entirely on 7400 logic chips. The device operates on 8-bit binary numbers, which limits its real-world applications. But we bet they learned a lot during the development process.

The encryption algorithm is based on a the concept of cellular automaton. This is a something with which we’re already familiar having seen many Conway’s Game of Life projects around here. What we’re not familiar with is this particular wing of the concept called ‘Rule 30‘. It works well with this project because a complex pattern can be generated from simple beginnings.

After conceptualizing how the system might work the team spent some time transferring the implementation to the chips they had available. The end result is a quartet of chip-packed breadboards and a rat’s nets of wires, but the system is capable of both encrypting and decrypting data.

Programming Tetris by first building a logic gate, then a computer, then…

Hone your fundamental understanding of computer systems by completing this online course called NAND to Tetris. The idea is to develop each fundamental unit that goes into making computer programs a reality. This starts with logic gates, which are put together into modules that eventually become a functioning computer. From there you need an operating system,  a compiler, and eventually you’ll be playing a game of Tetris which you programmed yourself.

It’s certainly not an easy journey, but if you have a computer at your disposal you should be able to make it all the way through the course. There’s a software suite which includes a hardware simulator so that the computer you’re building can be assembled using HDL instead physical components.

The concept is discussed in this TED talk given by [Shimon Schocken]. It is also embedded after the break and in addition to the NAND to Tetris project he shows off some self learning software on the iPad. To us it seems very much like the learning software [Neal Stephenson] envisions in the Young Lady’s Illustrated Primer from his Diamond Age novel.

Continue reading “Programming Tetris by first building a logic gate, then a computer, then…”

2012 Open 7400 Logic Competition

The Open 7400 Logic Competition is being held again this year. Start thinking about your entries, they’ll need to be finished and submitted by October 31st. As motivation, Digilent has put up two of their Analog Discovery kits as prizes. They can be used as a dual channel oscilloscope, function generator, or 16-channel logic analyzer. Last year was the first time the competition was held. As hype for the event built, more and more prize sponsors signed on and we hope to see the same thing happen this year.

Your entry can be just about anything as long as you show your schematic, explain the project, and use logic. It can be 7400 TTL, 4000 CMOS, discrete gates, or even a CPLD. Last year’s entries spanned a wide range of themes from LED blinkers, to unorthodox 74xx chip hacking, to boards packed full of chips. Good luck and don’t forget to tip us off about your work!

[Thanks Adrian]