Understanding 7 segment display Displays
The 7-segment is a very popular display we see on many electronic gadgets like digital clock, calculator, meters and many others. It’s a display that shows decimals and Hex. The display contains seven LEDs within a small rectangular shape. There are two types of 7-segment display called: Common Cathode (CC) and Common Anode (CA).
The Common Cathode means the LEDs within a segment has their entire negative terminal connected together while their positive terminals are separated. The opposite is the Common anode as all positive terminals are joined together internally while their negative terminals are separated.
In this project, we will learn how to display decimals on the segment display and also see how we can count from 0 to 9.
The sample code shows a simple way to write on segment using Ports to display only number 2.
In our code, we loaded 01011011 into Port1 to display number 2, it shows that only pin a, b, d, e and g is selected high.
To write from 0 – 9 on the segment display just write your value on the segment with your desired time delay (in our project we will be using one second). You can copy the code below into your project and modify it anyhow you want it.