0% found this document useful (0 votes)
17 views4 pages

2 Lesson 2 SSD PDF File

This document provides a datasheet for 7-segment displays, detailing their operation, types (Common Cathode and Common Anode), and wiring instructions for use with Arduino. It includes a truth table for segment activation corresponding to each digit, as well as sample Arduino code for displaying numbers. Additional notes emphasize the importance of using resistors and potential components for multi-digit displays.

Uploaded by

K'c Baylon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

2 Lesson 2 SSD PDF File

This document provides a datasheet for 7-segment displays, detailing their operation, types (Common Cathode and Common Anode), and wiring instructions for use with Arduino. It includes a truth table for segment activation corresponding to each digit, as well as sample Arduino code for displaying numbers. Additional notes emphasize the importance of using resistors and potential components for multi-digit displays.

Uploaded by

K'c Baylon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

7- Segment Display Datasheet (Generic)

1. Overview
 A 7-segment LED display is commonly used to display numeric values in electronic circuits. Each
segment is an individual LED, and by controlling which segments light up, different numbers can
be displayed.
 An SSD or Seven-Segment Display is a form of electronic display device for displaying decimal
numerals that is an alternative to the more complex dot matrix displays

Two Types of Segment


 Common Cathode (CC) – All cathodes are connected to GND, and each segment lights up
when its corresponding anode is HIGH.
 Example: If segment A is connected to Arduino pin 2, setting digitalWrite(2, HIGH); will
turn it ON.
 Common Anode (CA) – All anodes are connected to VCC (+5V), and each segment lights up
when its corresponding cathode is LOW.
 Example: If segment A is connected to Arduino pin 2, setting digitalWrite(2, LOW); will
turn it ON.

2. Truth Table (Which Segments to Light Up for Each Number)


3. Wiring Example for Arduino (Common Cathode)

Additional Notes:
 Always use 220Ω - 470Ω resistors for each segment to prevent burning out the LEDs.
 If using multiple digits, consider using a multiplexer or a shift register like the 74HC595.
 For a 4-digit display, you can use a driver like MAX7219.
Activity 1
7- Segment Display Datasheet

Materials:
 Arduino Uno/Nano/Mega (or any compatible board)
 Seven-segment display (Common Anode or Common Cathode)
 Resistors (220Ω - 470Ω, 8 pieces)
 Jumper wires
 Breadboard

Identify the Seven-Segment Display Pins


A 7-segment display has 10 pins (for a single-digit display), with:
 8 segment control pins (a, b, c, d, e, f, g, and dp for the decimal point)
 2 common pins (Common Anode or Common Cathode)

Use the datasheet of your specific seven-segment display model to confirm the pin configuration.

Connect the Seven-Segment Display to the Arduino


For a Common Cathode Display:
1. Connect the common cathode pins (pin
3 and pin 7) to GND on Arduino.
2. Connect segment pins (a to g and dp) to
Arduino digital pins through 220Ω resistors
to limit current and prevent LED damage.
For a Common Anode Display:
1. Connect the common anode pins (pin 3
and pin 7) to +5V on Arduino.
2. Connect segment pins (a to g and dp) to
Arduino digital pins through 220Ω resistors,
but in this case, set the pin LOW to turn on
a segment.

int digits[10][7]
 int → This specifies that the array stores integer values.
 digits → The name of the array.
 [10] → The first dimension indicates there are 10 rows (0 to 9),
which typically represent the digits 0 to 9.
 [7] → The second dimension indicates there are 7 columns, which
represent the 7 segments (A, B, C, D, E, F, G) of a seven-segment
display
Arduino Code
// Define segment pins
int A = 2, B = 3, C = 4, D = 5, E = 6, F = 7, G = 8, DP = 9;
int digits[10][7] = {
{1,1,1,1,1,1,0}, // 0
{0,1,1,0,0,0,0}, // 1
{1,1,0,1,1,0,1}, // 2
{1,1,1,1,0,0,1}, // 3
{0,1,1,0,0,1,1}, // 4
{1,0,1,1,0,1,1}, // 5
{1,0,1,1,1,1,1}, // 6
{1,1,1,0,0,0,0}, // 7
{1,1,1,1,1,1,1}, // 8
{1,1,1,0,0,1,1} // 9
};

void setup() {
// Set segment pins as OUTPUT
for (int i = 2; i <= 8; i++) {
pinMode(i, OUTPUT);
}
}

void loop() {
for (int num = 0; num <= 9; num++) {
displayNumber(num);
delay(1000); // Display each number for 1 second
}
}

void displayNumber(int num) {


for (int i = 0; i < 7; i++) {
digitalWrite(2 + i, digits[num][i]); // Turn ON/OFF segment
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy