Tutorial: 7-Segment Display
Last updated
Was this helpful?
Last updated
Was this helpful?
Display decimal number (0~9) on a 7-segment display
Inputs: 4-bit numbers (D C B A) // (00001111)
Output:
7-segment decoder: 7-bit numbers ( a to g)
7-segment display: decimal number 0~9
7-segment display: common anode (5101ASR)
7-segment decoder:
Hardware
Detail information about 7 segment display -
Common anode: (common pin is connected to VCC)
Giving ‘LOW’ to the pin -> LED ON
Needs a load resistor for each pin
Please check the difference between the common cathode and common anode.
We will use common anode.
All output pins are active low
Creating 7-segment decoder (without using decoder chip)
Model:
Tutorial code : "TU_GPIO_LED_7segment_student.c"
If you want to use 7-segment decoder chip: