Tuesday, February 23, 2010

Chapter 4 - Exercise 19

The section covering Exercise 19 is long... a lot of material. But it's fun reading (at least to me) and not hard to follow.

The first circuit you'll build uses the 74HC00 chip. It performs a NAND operation on the inputs that are fed into pins 1 and 2. The first part of this exercise has you using pushbuttons to control the positive voltage to pins 1 and 2... when the buttons are not being pushed, pins 1 and 2 are connected to the negative voltage side of the circuit (with 10K resistors for protection). The LED will only light up when both buttons are pushed. The first video below shows this in action.

It's on the next part of the circuit where I got a little confused. I wired up everything as seen in Figure 4-79 but when I applied power the LED would stay lit. Only when pushing the single pushbutton did the light go out. It was supposed to be the opposite... then I re-read the section and realized I'd forgotten to swap out the 74HC00 with the 74HC08. Big difference! One is NAND and the other is AND... but with the 74HC00, I got exactly what I should have... the opposite of what happens with the 74HC08. You can see this in the 2nd video.

Also, I had to go back and double-check about the usage of the diode. My diodes have that small gray band on one end and I couldn't remember which direction was which. You only want voltage going back into pin 2 once the pushbutton has been pressed and then the circuit locks. This means the diode must allow voltage to only flow out of pin 3 and into pin 2. I think of the gray band as a wall, so it needs to point in the direction of the LED, meaning no voltage will flow through it when the pushbutton is initially pressed. Since the other end does not have a "wall" voltage flows in the direction away from the LED... or from gray band to no band. (Hope that makes sense...)

Next, I substituted the 74HC08 for the 74HC00 and the circuit worked as described on page 196. Powering up, the LED is initially dark, but a single press of the pushbutton and the circuit locks on and the LED stays lit, even after releasing the button. This is seen in the 3rd video.

A lot of information in this section, so I'll be going back and reading it all again just to make sure I've got it all.

No comments:

Post a Comment