A 7 segment display is a very common component used in electronic circuits to display digits from 0-9. It has 7 LED segments that can be selectively lit up to form the desired digits. To interface such a display to a microcontroller, we need an additional component called a 7 segment display driver IC. These driver ICs take a 4-bit binary input from the microcontroller and convert it to appropriate signals to light up the correct segments to display the digit. Some popular 7 segment driver ICs are:
- 7447
- 7448
- 74HC595
- MAX7219
In this article, we will explore how to crack or decode different types of 7 segment driver ICs by reverse engineering them.
Steps to Crack a 7 Segment Driver IC
The basic steps involved are:
1. Identify the IC and its pinout
- The first step is to identify the IC number and package details like DIP, SOIC etc. This gives the pin mapping of the IC.
- Refer to the datasheet to find out the pin functions – inputs, outputs, power supply pins etc.
2. Connect test circuit
- Wire up the IC on a breadboard or PCB with its minimum connections – VCC, GND, input pins and segment output pins.
- Connect LEDs to the segment pins to visually see which segments light up.
- Connect microcontroller/logic circuits to provide binary input combinations.
3. Test with all input combinations
- Write a simple program to generate all 16 binary input combinations from 0000 to 1111.
- Observe the 7 segment display for each input value.
- Note down which segments light up for each input digit. This gives the segment decoding logic.
4. Derive the segment logic
- Tabulate the input binary values and corresponding segment connections.
- Analyze the pattern and derive logic equations for each segment.
- For example, Segment A may be lit when Input D is 1. So the logic is A = D.
5. Verify results with datasheet
- Compare the derived segment logic with IC datasheet schematic/truth table.
- Verify that the decoding matches expected functionality.
- If any discrepancy, repeat tests to find the error.
Example of Cracking 7447 IC
Let’s go through an example of decoding the popular 7447 7 segment driver IC.
7447 Pinout
<img src=”https://imgur.com/oX4wdO9.png” alt=”7447 pinout” width=”500″>
It is a 16 pin DIP IC. Inputs are 4 bits D0 to D3. Outputs are 7 segment pins a to g.
Test Circuit
<img src=”https://imgur.com/Ji6gnpq.png” alt=”7447 test circuit” width=”400″>
4 bit binary counter provides input combinations from 0000 to 1111 to 7447 IC. LEDs connected to segment pins help visualize the outputs.
Input/Output Observations
<img src=”https://imgur.com/iIrzs3p.png” alt=”7447 truth table” width=”700″>
The above truth table shows the input values and corresponding segment outputs noted during testing.
Derived Segment Logic
By analyzing the truth table, following logic equations can be derived:
- a = D3
- b = D2
- c = D1
- d = D0
- e = D1 AND D3
- f = D0 AND D1
- g = D0 AND D3
Matching with Datasheet
The derived logic matches with 7447 datasheet specifications. So we have successfully cracked the 7447 IC functionality.
Cracking 74HC595 Shift Register
The 74HC595 is a serial-in parallel-out 8-bit shift register IC. It contains an on-chip 8 bit latch that can be used to drive an 8 digit 7 segment display. Let’s see how to decode its 7 segment drive capability.
74HC595 Pinout
<img src=”https://imgur.com/pk1nIR0.png” alt=”74HC595 pinout” width=”500″>
It has a serial input, clock, latch pins and 8 output pins.
Test Circuit
<img src=”https://imgur.com/WLP05p5.png” alt=”74HC595 test circuit” width=”600″>
Arduino generates binary counting pattern 0 to 255 which is fed serially to 74HC595. The latch pin is pulsed to transfer data to outputs.
Testing and Logic Derivation
By testing with all 256 input combinations, following logic is derived:
- Segment a is lit when Q0 is 1
- Segment b is lit when Q1 is 1
- And so on up to g mapped to Q6
- Decimal point DP is lit when Q7 is 1
Match with Datasheet
This matches the way 74HC595’s 8 bit latch can drive an 8 digit 7 segment display as per the datasheet.
Cracking MAX7219 Led Matrix Driver
The MAX7219 is an LED matrix display driver IC. It can be used to control an 8×8 matrix of LEDs. Let’s try decoding it’s internal logic.
MAX7219 Pinout
<img src=”https://imgur.com/pBUvyMf.png” alt=”MAX7219 pinout”>
It has a 3-wire SPI interface. Important pins are DIN, CLK, CS and matrix row/column outputs.
Test Circuit
<img src=”https://imgur.com/L5YCB3p.png” alt=”MAX7219 test circuit”>
Arduino is used to send data serially via SPI interface to MAX7219 IC. The 8×8 LED matrix displays visualized output.
Testing and Derivation
By sending different byte patterns and observing LED behavior, following is derived:
- Each row/column is mapped to one of the 8 bits of the data byte.
- Row 0 -> Bit 0
- Row 1 -> Bit 1
- And so on till Row 7 -> Bit 7
- To light a LED, corresponding row bit and column bit should be 1.
Verify with Datasheet
ThisMatches the SPI interface based matrix LED driving specified in MAX7219 datasheet.
So the IC is successfully cracked!
Frequently Asked Questions
1. What tools are required for cracking 7 segment driver ICs?
Some commonly required tools and instruments are:
- Breadboard and jumper wires for prototype circuit.
- Basic electronics components like LEDs, resistors, capacitors etc.
- Logic IC test boards or development boards with microcontrollers like Arduino.
- Oscilloscopes, logic analyzers and multimeters for signal measurements.
- Digital probe station may be required for SMD ICs.
2. How do you identify an unknown 7 segment driver IC?
Some ways to identify an unmarked 7 segment driver IC are:
- Count total pins. 7 segment ICs commonly come in 14, 16, 18 pin packages.
- Look for input pins typically in groups or binary weights like 1,2,4,8 etc.
- See if there are 7 or 8 output pins that could drive display segments.
- Match the pinout diagrams with common ICs like 7447, 7448, 74HC595 etc.
- Search online databases with IC package photos to identify.
3. What is the difference between 7447 and 7448 ICs?
- 7447 is a BCD to 7 segment decoder while 7448 is a 7 segment encoder.
- 7447 takes 4 bit BCD input and drives 7 segments. 7448 takes 7 segment inputs and encodes to BCD.
- Pinouts are essentially reversed between the two ICs.
4. How do you test a 7 segment driver IC with a damaged segment?
- Visually inspect the IC under magnification for any internal damage.
- Check current draw on damaged segment pin using multimeter.
- Apply heat or cooling spray and see if segment starts working intermittently.
- Use an electron microscope to acquire detailed chip die images.
- If damaged beyond repair, replace with new IC.
5. What precautions should be taken while testing ICs?
Some precautions include:
- Follow ESD safety procedures to avoid static damage.
- Make sure power supplies are of correct voltage and properly regulated.
- Use current limiting resistors when connecting LEDs or other loads.
- Disconnect power before changing connections to avoid shorts.
- Keep flammable chemicals away and provide fire safety equipment.
- Use components rated for the correct voltage/current to avoid failures.
- Work systematically with careful observation at each step.