Digital Circuits

Created; 5/09/2020Last update: 5/09/2020

Introduction

Digital circuits operate on logic levels, 0 or 1. It's consisting of logic gates. In electronic system, discrete logic gates and chips. help achieve simple digital I/O control and peripheral selection.

Background

Logic gates & logic table

    • AND
      • Two inputs and 1 output.
      • Output is only 1 "high" when both inputs are 1 "high"
      • Main purpose is to provide circuit control decision based two valid inputs from both of the sources.
    • NAND
      • Two inputs and 1 output.
      • Output is only 0 "low" when both inputs are 1 "high"
      • Main purpose is to provide circuit control decision based two valid inputs from both of the sources but needs output inversion.
    • OR
      • Two inputs and 1 output.
      • Output is only 1"high" when either or both inputs are 1 "high"
      • Main purpose is to provide circuit control decision based valid decisions from either of the sources
    • XOR
      • Two inputs and 1 output.
      • Output is only 1"high" when either or inputs are 1 "high" but not both.
      • Main purpose is to provide decision based valid decisions from either of the sources but not both.
    • Inverter
      • 1 input and 1 output.
      • Output logical level is inverse of input
      • Main purpose is to invert logic level for certain inputs that requires opposite logic level of assertion
    • Buffer
      • 1 input and 1output
      • Output logical level is the same logical of input level
      • Main purpose is to provide isolation between input and output
    • SR Latch
      • two inputs, SET and RESET, and two outputs, Q and Q' (inverse of Q)
      • Set and reset are the inputs, when both are 0, output data remains unchanged; hence data stored keeps its value
      • To store a value, assert SET input high while keep RESET input low, the output data Q will changed to high "1".
      • To clear a value, assert RESET input high while keep SET input low, the outpout data Q will changed to low "0".
        • Note: cannot sets SET and RESET both high due to undefined output state.

Protocol Bridge Chip

  • Provides standard communication interface conversion.
    • USB to UART
    • I2C/SPI to UART

GPIO Expander

  • Provides extra control signals for peripheral selection.
    • I2C to GPIO

Design Analysis

Simple Data Storage

    • Used SR latch as a short memory circuit to remember previous output data such as a control signal. One such application is to remember the control signal state before system reboot. When use control signal to as the Set input and keep reset input low to store the whether or not the control signal is every high. Then reboot action depends on the previous control signal state.

Microphone Mute Switch

    • Used AND gate wth a control signal and Digital Microphone output signal. Control signal cuts off microphone data path when its voltage is low.

Inverter

    • Used to invert button press (signal is grounded when pressed) that needs to turn on an chip that has active high enable.

Debug

    • Use a USB to UART bridge chip to read important debug logs for processor or microcontroller.

Q&A

What are common discrete logic vendors?

Nexperia, NXP, on-SEMI, etc. provides a comprehensive logic chips.

Which vendor is commonly used for USB to UART bridge?

FTDI chip is widely used.

Summary & Conclusion

  • Logic chip operates on two states, 0 and 1.
  • Simple logic chips, Latch, AND, OR, XOR, buffer, provides low cost solutions needed for circuit control.
  • Protocol Bridge chips are used for simple digital interface conversion.
  • GPIO expander are used for Chip with limited general purposed I/O control ports.

Logic chips, bridge chips, and mux are the most common digital circuits used in for circuit signal control in electronic system.

Further Reading/Practice

Go through a catalog of different logic chips on Digikey and different vendors.