LEGO links

LEGO.com
Set inventories
LUGNET.com
LEGO On My Mind
LEO & LEGO
LEGO Rubik's cube
DIY RCX
DIY RCX sensors
LEGO Harpsicord
LEGO Difference engine

non-LEGO links

Difference engine
Analytic machine
Piano mechanism
Theory of flight
Marine chonometer
The Rubik's cube
The Basic Stamp


Essential Links










This site has had visitors.
Google

Clocked Logic

If you look at any digital electronic book, you'll soon see that anything useful tends to make use of a clock pulse to synchronise everything. The clock input is separate from the logic inputs, but they are related. A simple way to implement a clock is by using two NAND gates. Doing this changes the set and clear operations from working on a 0 to 1 transition to working on a 0 to 1 transition. The clocked Flip-Flop examples should show whats happening:

The initial setup of the FF, set, clock (clk) and clear are at a logic level of 0.

Pulse clear to 1, then pulse to clock (clk) to 1. This makes Q=0 and Qbar=1. Just as before the right hand NAND output is 1, so the clear will have no effect on either Q or Qbar.

The clock goes to 0 and then clear goes to 0. It has to be done in this order to prevent the outputs becoming indeterminate.

Now pulse set to 1 and the clk to 1. This turns Q=1 and Qbar=0. The left hand NAND gate output is 1 and so changing the value of set will not do anything.

The clock goes to 0 and then set goes to 0. Just as before it has to be done in this order to present the outputs becoming indeterminate.

It is possible to build an edge detector for the clock signal. It requires a few more NAND gates. The advantage of doing this is that it no longer matters when the clock signal goes back to 0 and the indeterminant state is avoided.

Copyright © 1999-2008 www.goldfish.org.uk - Send your comments to