<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>🧰 The Glue Logic Toolbox on Digital Logic Notebook</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/</link><description>Recent content in 🧰 The Glue Logic Toolbox on Digital Logic Notebook</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/index.xml" rel="self" type="application/rss+xml"/><item><title>One Inverter</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/one-inverter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/one-inverter/</guid><description>&lt;h1 id="one-inverter"&gt;One Inverter&lt;a class="anchor" href="#one-inverter"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The problem is small and extremely common: a design needs exactly &lt;em&gt;one&lt;/em&gt; &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/not/"&gt;inverter&lt;/a&gt; — to flip an active-low signal to active-high, correct a polarity, or generate a complement — and nothing else. Dropping a 14-pin hex inverter to use one-sixth of it is wasteful on a modern board.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Reach for a &lt;strong&gt;single-gate (&amp;ldquo;tiny logic&amp;rdquo;) inverter&lt;/strong&gt;: the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/implementation/tiny-logic/"&gt;74LVC1G04&lt;/a&gt; in a tiny SOT-23-5 or smaller package, running at low voltage with 5 V-tolerant inputs. On an all-5 V board the classic &lt;strong&gt;74HC04&lt;/strong&gt; hex inverter still works if the extra five gates can be spared or reused elsewhere. If the signal is also slow or noisy, use the Schmitt-trigger version (&lt;strong&gt;74LVC1G14&lt;/strong&gt; / 74HC14) and get &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/debounce/"&gt;debounce&lt;/a&gt;-grade edge cleaning in the same part.&lt;/p&gt;</description></item><item><title>Debounce</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/debounce/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/debounce/</guid><description>&lt;h1 id="debounce"&gt;Debounce&lt;a class="anchor" href="#debounce"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A mechanical switch or button does not make one clean transition. Its contacts — like the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/before-the-ic/relays/"&gt;relay contacts&lt;/a&gt; that first exposed the problem — bounce for a few milliseconds on every closure, producing a burst of edges that a fast logic input or an interrupt reads as many presses.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The classic answer is a &lt;strong&gt;74HC14&lt;/strong&gt; hex &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/schmitt-trigger/"&gt;Schmitt-trigger&lt;/a&gt; inverter (or the single-gate &lt;strong&gt;74LVC1G14&lt;/strong&gt;) with a small &lt;strong&gt;RC filter&lt;/strong&gt; on its input. The resistor and capacitor slow the signal so the bounce is smeared into a gentle ramp; the Schmitt input&amp;rsquo;s hysteresis then turns that ramp into exactly one clean edge, ignoring the wobble in between.&lt;/p&gt;</description></item><item><title>More Outputs</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/more-outputs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/more-outputs/</guid><description>&lt;h1 id="more-outputs"&gt;More Outputs&lt;a class="anchor" href="#more-outputs"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A microcontroller or FPGA has run out of pins, but the design still needs to drive many things — a bank of LEDs, seven-segment digits, relays, or status lines. The trick is to trade a few pins and a little time for as many outputs as needed.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The workhorse is the &lt;strong&gt;74HC595&lt;/strong&gt;, an 8-bit serial-in, parallel-out &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/moving-data/shift-registers/"&gt;shift register&lt;/a&gt; with a latched output. Three signals — data, shift clock, and latch — feed eight bits in serially, and the latch then presents all eight at the outputs at once (so they change cleanly together rather than rippling). Its serial-output pin feeds the next &amp;lsquo;595&amp;rsquo;s input, so devices &lt;strong&gt;daisy-chain&lt;/strong&gt;: three pins can drive 8, 16, 24, or more outputs, limited mainly by how long the shifting takes.&lt;/p&gt;</description></item><item><title>More Inputs</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/more-inputs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/more-inputs/</guid><description>&lt;h1 id="more-inputs"&gt;More Inputs&lt;a class="anchor" href="#more-inputs"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The mirror of the output problem: a design needs to read more switches, buttons, or digital sensors than there are pins to spare. The same shift-register trick works in reverse — sample many inputs, then clock them out over a few wires.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The go-to is the &lt;strong&gt;74HC165&lt;/strong&gt;, an 8-bit parallel-in, serial-out &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/moving-data/shift-registers/"&gt;shift register&lt;/a&gt;. A load pulse captures all eight inputs at once into the register; the controller then clocks those bits out serially on a single data line. Like the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/more-outputs/"&gt;74HC595&lt;/a&gt; it &lt;strong&gt;daisy-chains&lt;/strong&gt; — each &amp;lsquo;165&amp;rsquo;s serial output feeds the next&amp;rsquo;s input — so three pins can read 8, 16, or more inputs. The &amp;lsquo;595 for outputs and the &amp;lsquo;165 for inputs are the standard complementary pair.&lt;/p&gt;</description></item><item><title>Switch Analog Signals</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/switch-analog-signals/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/switch-analog-signals/</guid><description>&lt;h1 id="switch-analog-signals"&gt;Switch Analog Signals&lt;a class="anchor" href="#switch-analog-signals"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A logic gate cannot pass an analog signal, and a relay is bulky and slow for routing a small voltage. The need here is to steer an analog signal — an audio line, a sensor voltage, a reference — on and off, or from one path to another, under &lt;em&gt;digital&lt;/em&gt; control.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The classic answer is the &lt;strong&gt;4066&lt;/strong&gt;, a quad bilateral (analog) switch. Each switch is a CMOS &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/analog-helpers/analog-switches/"&gt;transmission gate&lt;/a&gt; — an NMOS and a PMOS transistor in parallel — that, when its control input is high, conducts in &lt;em&gt;either&lt;/em&gt; direction and passes whatever analog voltage sits between the supply rails. When the control is low, the path is open. It is a genuine switch for signals, controlled by a logic level.&lt;/p&gt;</description></item><item><title>One of Eight Sensors</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/one-of-eight-sensors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/one-of-eight-sensors/</guid><description>&lt;h1 id="one-of-eight-sensors"&gt;One of Eight Sensors&lt;a class="anchor" href="#one-of-eight-sensors"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A design has one ADC input but eight analog sensors to read (or one signal path that must select among eight sources). Rather than eight converters, route each sensor to the single ADC in turn.&lt;/p&gt;
&lt;h2 id="the-part"&gt;The Part&lt;a class="anchor" href="#the-part"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The standard part is the &lt;strong&gt;4051&lt;/strong&gt;, an 8-channel analog &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/multiplexer/"&gt;multiplexer&lt;/a&gt;/demultiplexer. Three address lines select which of the eight channels connects to the common pin, and because it is built from &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/analog-helpers/analog-switches/"&gt;transmission gates&lt;/a&gt; it passes analog voltages in either direction — so the same part can gather eight inputs to one ADC or fan one source out to eight destinations. Its relatives cover other groupings: the &lt;strong&gt;4052&lt;/strong&gt; is a dual 4-channel mux, the &lt;strong&gt;4053&lt;/strong&gt; a triple 2-channel. The 74HC4051 is the faster high-speed-CMOS version.&lt;/p&gt;</description></item><item><title>Level Shifting</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/level-shifting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/level-shifting/</guid><description>&lt;h1 id="level-shifting"&gt;Level Shifting&lt;a class="anchor" href="#level-shifting"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Modern boards are rarely a single voltage. A 3.3 V microcontroller must talk to a 5 V sensor, a 1.8 V memory, or an I²C bus shared across domains, and connecting mismatched levels directly either fails to register a logic high or over-volts an input. Level shifting moves a signal safely from one voltage domain to another — and the right part depends entirely on the &lt;em&gt;direction&lt;/em&gt; and the &lt;em&gt;drive type&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Reset Delay</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/reset-delay/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/glue-logic-toolbox/reset-delay/</guid><description>&lt;h1 id="reset-delay"&gt;Reset Delay&lt;a class="anchor" href="#reset-delay"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;At power-up, a chip must be held in reset until its supply is stable, then released cleanly. Do this wrong and the device wakes into a garbage state, latches up, or resets erratically as the rail sags. The need is a reset that asserts while power is coming up and releases only once the supply is good — ideally with a defined delay.&lt;/p&gt;
&lt;h2 id="the-right-answer-a-supervisor-ic"&gt;The Right Answer: a Supervisor IC&lt;a class="anchor" href="#the-right-answer-a-supervisor-ic"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A dedicated &lt;strong&gt;reset supervisor&lt;/strong&gt; (MAX809, MCP100/MCP809, TPS3839, and many others) is the proper part. It watches the supply voltage against a precise threshold, holds reset asserted whenever the rail is below it, and releases after a fixed delay once the rail is good — and, crucially, re-asserts on a &lt;strong&gt;brown-out&lt;/strong&gt; if the supply dips later. Many include a watchdog input as well. This is what production designs use, because it handles the cases a naïve delay cannot.&lt;/p&gt;</description></item></channel></rss>