ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Digital Logic Design
    CC-110
    Progress0 / 63 topics
    Topics
    1. Introduction to Digital Systems2. Number Systems3. Introduction to Boolean Algebra4. Basic theorems and properties of Boolean Algebra5. Boolean Functions6. Logic Gates7. NAND and NOR Implementation8. Representation of Function in Sum of Minterms or Product of Maxterms9. Simplification of Boolean function using Karnaugh Map10. Don't care Conditions11. The Tabulation Method12. Introduction to Combinational Logic13. Design of Adders14. Design of Subtractors15. Code Convertors16. Analysis Procedure of Combinational Circuits17. Binary Parallel Adders18. Decimal Adders19. Magnitude Comparator20. Decoders and its applications21. Multiplexers22. Demultiplexers23. Encoders24. ROM25. Programmable Logic Array (PLA)26. Introduction to Sequential Circuits27. Basic Flip Flop28. Clocked RS Flip Flop29. Clocked D Flip Flop30. Clocked JK Flip Flop31. Clocked T Flip Flop32. Analysis of Clocked Sequential Circuits33. State Reduction and Assignment34. Flip Flop Excitation tables35. Design Procedure36. Design of Counters37. Design with State Equations38. Introduction to Registers39. Shift Registers40. Ripple Counters41. Synchronous Counters42. Timing Sequences43. Memory Unit44. Random Access Memory45. Introduction to Programmable Logic Devices (CPLD, FPGA)46. Lab Assignments using tools such as Verilog HDL/VHDL, MultiSim47. Familiarization with Digital Electronic Trainer48. Logic gates operations49. Half Adder Operation50. Full Adder Operation51. Half Subtractor Operation52. Full Subtractor Operation53. 7-Segment Display Operation54. Decoder Operation55. BCD To 7-Segment Display56. Multiplexer Operation57. Using Multiplexer and Demultiplexer/Decoder58. Multiplexing 7-Segment Displays59. Comparator Operations60. D Latch and Flip-Flop Operation61. Latching BCD Data for Displaying On 7-Segment Display62. JK Flip-Flop Operation63. Random Access Memories
    CC-110›Multiplexing 7-Segment Displays
    Digital Logic DesignTopic 58 of 63

    Multiplexing 7-Segment Displays

    8 minread
    1,308words
    Intermediatelevel

    Multiplexing 7-Segment Displays

    Multiplexing 7-segment displays is a technique used to reduce the number of control lines needed to drive multiple 7-segment displays in a digital system. Rather than driving each segment of every display independently, multiplexing allows for the display of multiple digits on a single set of lines by rapidly switching between them. This approach reduces the number of connections and simplifies the design, especially when dealing with multiple 7-segment displays in devices like clocks, counters, and digital meters.


    How Multiplexing Works for 7-Segment Displays

    A 7-segment display consists of 7 LED segments arranged in a figure-eight pattern. Each of these segments (labeled a, b, c, d, e, f, g) can be turned on or off to display a digit (0-9).

    In a multiplexed system:

    1. Multiple displays share a common set of segment control lines (for the segments a-g).
    2. Each display is activated (or driven) one at a time, in rapid succession, to show a different digit.
    3. Persistence of vision makes it appear as if all the displays are showing their respective digits simultaneously, even though only one display is turned on at a time.

    Example: 2-Digit Display

    For a 2-digit display:

    • Two 7-segment displays are used.
    • Each display shares the same segment lines (a, b, c, d, e, f, g), but has its own common cathode or common anode control line to control which display is on at any moment.

    Basic Concepts in Multiplexing 7-Segment Displays

    1. Common Cathode vs. Common Anode:

      • Common Cathode: All the cathodes of the LED segments in a display are tied together, and each segment's anode is controlled by the microcontroller or circuit. A segment lights up when the corresponding control line is high.
      • Common Anode: All the anodes of the LED segments in a display are tied together, and each segment's cathode is controlled. A segment lights up when the corresponding control line is low.
    2. Scan Rate (Refresh Rate): The multiplexing involves switching between displays in a rapid sequence. For example, if there are two displays, the system will first display the number on the first display, then quickly switch to the second display. The time each display is on is short enough (milliseconds) to give the illusion that both displays are showing their respective digits at once.

      • Typically, a scan rate of around 50-100 Hz is used for multiplexing displays, which means each display is updated 50-100 times per second.
    3. Digit-to-7-Segment Mapping: Each of the digits (0-9) can be represented by a unique combination of segments turned on or off. For example:

      • Digit 0: Segments a, b, c, d, e, f are lit, and g is off.
      • Digit 1: Segments b, c are lit, and all others are off.
      • The rest of the digits follow a similar pattern, using a 7-segment display truth table.

    Steps to Multiplex 7-Segment Displays

    1. Segment Control: Use the same set of control lines for all 7-segment displays. This means controlling which segments (a, b, c, d, e, f, g) should be lit for each digit.

    2. Digit Selection: Each display (digit) needs to be turned on one at a time, so you need to have an additional control line (or set of control lines) to enable or disable each individual display. For example:

      • For a 2-digit display, you would have 7 segment control lines and 2 additional lines (one for each display) to enable or disable the specific digit.
    3. Timing: The displays are turned on in a sequence, with each display being activated for a brief period. For a 2-digit display, this could mean:

      • Turn on the first display, show the corresponding digit, then turn it off.
      • Turn on the second display, show the corresponding digit, then turn it off.
      • Repeat the process.
    4. Refresh Cycle: This process is repeated fast enough (typically 50-100 times per second) so that the human eye perceives both digits as being displayed simultaneously.


    Example: 2-Digit Display Multiplexing

    Let’s assume we are working with a 2-digit, 7-segment display using a common cathode configuration. Here’s a simple process to multiplex it:

    Hardware Setup:

    1. 7 Segment Control Lines: These lines control the segments (a-g) of the display.
    2. Display Enable Lines: These lines will control which of the two displays is active.
      • Digit 1 Enable: Controls the first 7-segment display.
      • Digit 2 Enable: Controls the second 7-segment display.

    Multiplexing Process:

    1. Turn on Display 1: Enable the first display and display the first digit. The first digit will be active for a very short time (e.g., 5 milliseconds).
    2. Turn off Display 1: Disable the first display.
    3. Turn on Display 2: Enable the second display and display the second digit. The second digit will be active for the same duration (e.g., 5 milliseconds).
    4. Turn off Display 2: Disable the second display.
    5. Repeat: Repeat the cycle for the next frame.

    Each display is turned on for the same amount of time, but because of the rapid switching, both digits will appear to be displayed at the same time.


    Example of Multiplexing 7-Segment Displays with Code

    Here is a simple pseudocode or algorithm for multiplexing a 2-digit 7-segment display:

    # Array to store digit-to-7-segment mapping
    digit_to_segment = [
        [1, 1, 1, 1, 1, 1, 0],  # Digit 0 (a, b, c, d, e, f, g)
        [0, 1, 1, 0, 0, 0, 0],  # Digit 1
        [1, 1, 0, 1, 1, 0, 1],  # Digit 2
        # Add the rest of the digits here...
    ]
    
    # Function to display digits
    def display_digit(digit, display_number):
        segments = digit_to_segment[digit]
        
        # Activate the appropriate display (0 for first display, 1 for second display)
        if display_number == 0:
            # Enable first display and set segments
            enable_display_1()
            set_segments(segments)
        else:
            # Enable second display and set segments
            enable_display_2()
            set_segments(segments)
        
        # Turn off the other display
        if display_number == 0:
            disable_display_2()
        else:
            disable_display_1()
    
    # Main multiplexing loop
    while True:
        for display_number in range(2):
            for digit in [first_digit, second_digit]:  # Replace with actual digits
                display_digit(digit, display_number)
                delay(5)  # Wait for 5 ms (time each digit stays on)
    

    In the above code:

    • digit_to_segment is an array where each index corresponds to the segments required to show a digit (0-9).
    • display_digit is a function that turns on a specific digit on one of the displays.
    • The displays are activated one at a time, and a delay function ensures each digit stays on for a short period before switching.

    Advantages of Multiplexing 7-Segment Displays

    1. Reduced Pin Usage: With multiplexing, multiple displays can share the same set of control lines for segments, saving many pins on the microcontroller or circuit.
    2. Cost-Effective: Multiplexing reduces the need for additional drivers or hardware for each display, making it a cost-effective solution.
    3. Simplicity in Design: Instead of wiring each display separately, multiplexing allows you to control multiple displays with fewer lines and components.

    Challenges in Multiplexing 7-Segment Displays

    1. Flickering: If the multiplexing speed (scan rate) is too low, the displays may flicker, which can be noticeable. A higher scan rate (e.g., 50-100 Hz) generally prevents this.
    2. Power Consumption: Since each display is rapidly turned on and off, the current flowing through the system can fluctuate. This can lead to power issues if not properly managed.

    Conclusion

    Multiplexing 7-segment displays is an efficient way to reduce the number of pins needed for controlling multiple displays. By rapidly switching between displays, the system creates the illusion that all the digits are being displayed at once. This technique is widely used in digital clocks, counters, and other devices requiring multiple digits, providing a cost-effective and simplified solution for controlling multiple displays.

    Previous topic 57
    Using Multiplexer and Demultiplexer/Decoder
    Next topic 59
    Comparator Operations

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time8 min
      Word count1,308
      Code examples0
      DifficultyIntermediate