class: center, middle, inverse, title-slide .title[ # From Transistors to a Chip — the 74HC Family & Datasheets ] .subtitle[ ## Programmable Electronics — Unit 2 ] .date[ ### Class 16 ] --- # Learning Targets .lt-box[ - Explain what an integrated circuit integrates, using the gates you built last class as the reference. - Identify pin 1 on a DIP, seat and remove it without bending pins, and explain why a decoupling capacitor sits next to every chip. - Find a pin function, a supply-voltage range, and a maximum output current in a datasheet you have never seen. - Wire one gate of a 74HC chip, verify its truth table by measurement, and compare it to your transistor version. ] .eu-label[Essential Understanding:] Last class you spent ten minutes and a fistful of transistors on one NAND. This chip holds four of them, built and tested in a factory, in a part you will never open. That is the trade this whole unit is about: you stop seeing the transistors, and in return you get logic by the millions — and a document you now have to trust. --- # Agenda .agenda-box[ 1. Your NAND, mass-produced 2. The DIP package: pin 1, handling, the decoupling cap 3. HIGH and LOW — and why the chip's are cleaner than yours 4. The 74HC family 5. How a datasheet is laid out 6. **Build (25 min):** a 74HC gate, measured — next to your transistor one 7. NAND, the universal gate 8. Homework ] --- # Your NAND, mass-produced - Last class: a NAND was **2 transistors + resistors**, ten minutes, and a lot of jumper wire. - A **74HC00** is **four** of those NANDs — about a dozen transistors — in a 14-pin chip, made by the million, guaranteed identical. - The **555** timer (Class 12) is ~25 transistors in one package. A **microcontroller** (Unit 3) is *millions*. - Every one of them is sold as a single part you drop into the breadboard. You never wire the insides. You never see them. --- # What you gain, what you give up .pull-left.w48[ **Gain:** - Density — a dozen transistors in one part. - Reliability — made and tested by the million, identical. - Speed — the connections are microscopic. - No internal design work at all. ] .pull-right.w48[ **Give up:** - You can't probe a node inside or change anything. - You inherit its quirks and its limits. - You now *must* read — and trust — a datasheet. ] In Unit 1 you could measure every node in the circuit. Starting now, a lot of it is behind plastic, and the datasheet is the only window. --- # The DIP package .pull-left.w42[ <img src="assets/schematics/hc-quad-and-pinout.svg" alt="74HC08 as a 14-pin DIP: pin 1 at the notch, four AND gates, Vcc pin 14, GND pin 7" style="width:100%;max-height:300px;"/> ] .pull-right.w54[ - **DIP** = Dual In-line Package. Two rows of pins, 0.1 inch apart, straddling the breadboard trench. - **Pin 1** is next to the **notch** (or under the dot). Numbering runs **counter-clockwise** from there. - 8-pin: 1–4 down the left, 5–8 up the right. 14-pin: 1–7 down, 8–14 up. - The chip has no idea which way you plugged it in. **The datasheet's pin 1 is the only truth** — same lesson as the transistor pinout in Class 9, and it bites here too. Backwards = Vcc and GND swapped = a hot, dead chip. ] --- # Handling, and the decoupling capacitor .pull-left.w50[ - Pins arrive **splayed** — roll the row flat on the table first, or they fold under. - Seat with **even pressure on both ends**. Remove by levering **a little from each end in turn** — never one end. - **Static:** hold the plastic body, not the pins. CMOS parts are sensitive. ] .pull-right.w46[ - A **0.1 µF ceramic** from Vcc to GND, **right at the chip**, before you wire anything else. - When the chip switches, its current jumps in a nanosecond — too fast for the wires back to the battery. The local cap is a reservoir that covers the spike. - Skip it → glitches that look exactly like logic errors, and an hour lost debugging the wrong thing. ] --- # HIGH and LOW - Logic uses **two bands**, not exact voltages. On 6 V: below **~1.8 V is LOW (0)**, above **~3.5 V is HIGH (1)**, the gap between is **forbidden**. - **Your transistor gate's "HIGH" was only 3–4 V and drooped** when the LED loaded it — you measured it for homework. - A **74HC output swings to a clean, full 0 V or 6 V every time** — no matter how marginal the input was. That's **level restoration**. It's why you can chain a thousand gates inside a chip and the signal never rots. - A **floating** input sits in the forbidden band and drifts. On the 74HC08, that's **6 unused input pins** — tie every one to ground. --- class: small-font # The 74HC family .pull-left.w38[ <img src="assets/schematics/logic-gate-symbols.svg" alt="Symbols for AND, OR, NOT, NAND, NOR, XOR" style="width:100%;max-height:270px;"/> ] .pull-right.w58[ - **74** — the family (1970s, still standard). **HC** — High-speed CMOS. Trailing digits — **which gate**: `'00` NAND · `'08` AND · `'32` OR · `'04` NOT · `'02` NOR · `'86` XOR. - **"Quad"** = four independent gates in a 14-pin chip, sharing only Vcc (pin 14) and GND (pin 7). "Hex" = six. - **CMOS inputs** are voltage-controlled and draw almost **no current** — no base resistors, unlike your transistor gate. - **CMOS outputs** source only **~4 mA** — a dim LED, or the next gate's input. (The 555 you used in Class 12 sources **200 mA** — that's why it drove an LED straight from its output pin and these can't.) - The **bubble** on a symbol = inverted output. NAND = AND + bubble; NOR = OR + bubble. ] --- # How a datasheet is laid out You never read one front to back. You go in hunting **one number**. - **Front page** — what it is, headline specs, the **pinout**. - **Absolute Maximum Ratings** — cross one and the part may be *damaged*. Not operating targets — cliff edges. - **Recommended Operating Conditions** — the supply voltage, temperature, input levels it's *designed* for. - **Electrical Characteristics** — the guaranteed numbers: input thresholds, output current, propagation delay. - **Functional / block diagram** — the simplified insides. --- class: center, middle # Build (25 min): a 74HC gate, measured Same truth table as your transistor gate. One hundredth of the wiring. --- class: small-font # Build instructions Breadboard, 6 V pack, **74HC08** (or 74HC00), 0.1 µF ceramic, 2-way DIP switch, two 10 kΩ, a 470 Ω, an LED, multimeter, **the datasheet**. 1. **From the datasheet:** find the **Vcc pin**, the **GND pin**, and **one gate's** two input pins and its output pin. Check the **supply range** — does it include 6 V? (Look closely.) 2. Seat the chip across the trench, **pin 1 at the notch**. **0.1 µF decoupling cap across Vcc–GND first.** 3. Wire the two chosen inputs: each through the DIP switch to +6 V, **and** a 10 kΩ resistor from that input pin to ground. 4. **Tie every unused input on the chip to ground** — all six of them. 5. LED + 470 Ω from the output pin to ground. 6. Step through all four input combinations. For each: **measure the output voltage**, note the LED, write 1 or 0 using the datasheet threshold. Fill the table. 7. **Compare to your Class 11 gate:** same truth table? Is the HIGH a cleaner voltage now? If a row is wrong, walk the Debug Ladder — check the tied-off inputs first. --- # NAND — the universal gate From NAND gates alone you can build **every** other gate: - **NOT** — tie both NAND inputs together. - **AND** — a NAND, then a NAND wired as NOT. - **OR** — invert both inputs (NAND-as-NOT), then NAND them. A chip fab that makes **only NAND gates** can build any digital logic there is — an entire computer. NOR is universal too. Next class we combine gates into something that does arithmetic. --- class: center, middle # Homework .hw-box[ - On paper: **NOT from one NAND**, then **AND from two NANDs**. - From the datasheets: the **maximum output current** for the 555 and for the 74HC gate — which one could light an LED on its own? And the 74HC's **propagation delay** — how many nanoseconds, and how many of those fit in one second? - Next class: a circuit that **adds two 1-bit numbers**. Predict its truth table — two input columns, and **two** output columns (SUM and CARRY). Four rows. ]