code for 7 segment display to display 0 to 999999

srija's picture

Offline

Joined: Jan 06, 2019

Replies: 0
code for 7 segment display to display 0 to 999999
January 6, 2019 - 11:23am

how to write a code for 0 to 999999 counter using 7 segment display( 6 ports) and Arduino?

Jayant's picture

Offline

Joined: May 19, 2015

Replies: 195
7 segment 6 digit display
January 7, 2019 - 11:37am

Hi srija,

The idea of using a 7-seg display to display numbers from 0 to 999999 is not a good one.

The reason is you will have to use 6 7-seg display units. Ofcourse it is possible to do it if your applications needs it.  I am not sure which MCU you are using but the concept remains the same.

You have to design a circuit using 6 7-seg displays, each display will have 7-pins connected to 7 I/O pins of the MCU and each dispay should be enabled by a switching device like transistor. Therefore we will have 6 switching pins connected to 6 I/O pins of the MCU. Then you can send the value to each display unit by turnign on its switching pin.

If you find it hard to understand this concept you should read the below article where a 4-digit 7-seg display is controlled. You can use the same technique to control upto 6 digits for your application.

https://circuitdigest.com/microcontroller-projects/7-segment-display-int...