Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

7 Segment LED sketches

7 Segment LED sketches

Does anyone have a circuit and code for a simple countdown timer? It needs to count down from 2 hours 30 minutes and display on 3 or 4 7 segment displays.
Well, my shipping forecast timer has a BCD count up timer, and this sketch is a stripped down version that outputs the count on 7 segment LCD displays. It does nothing else. When reset, it starts counting up from 02:30.

In the diagram below, only two of the displays are shown. Connect 4 displays, with the segments in parallel. Each display is multiplexed, so only one display is on at a time.

If each segment is driven via a 470R resistor, then if all segments are on, then the common cathode current is about 70mA, so needs a transitor to boost the current, as the max current that the PIC can sink is about 25mA.

If its hfe is > 100, then the base current of 2 mA should be enough and can be driven by a 2K2 resistor.

If clocked at 4Mhz, instead of 32kHz, this is 125 faster, so the minute counts last 0.5 seconds and the display looks okay.

It has been tested to this extend. A PIC16F84 was programmed and an old LED calculator display was seen to count up, through the 24 hour clock.

I used BC182L transistors and resistor values of 820R, on my bread board.

I used a 4Mhz ceramic resonator as these are easy to connect.

Visit Here for more.







 

More Articles to Read

Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface

Top


Shares