Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 asm digital clock

Status
Not open for further replies.

Medtronic

Full Member level 5
Full Member level 5
Joined
May 19, 2005
Messages
246
Helped
29
Reputation
58
Reaction score
16
Trophy points
1,318
Location
Egypt
medtronic2050.blogspot.com
Activity points
2,717
Dear all my friends

i make a digital 7 segment clock without rtc ...by only timer0 ..... i can count the seconds minutes hours with no problem .... but this values is binary
how can i display this values .... only hours and minutes at the display ... please help

My program by assembly

best regards

MedTronic
 

You just need to do a binary to 7 segment conversion.

Now depending on your the way you have the display attached to the microcontroller, you can either multiplex the displayed data, or display the whole thing at once.

Multiplexing the display allows you to use a minimum numbers of pins, 7 for the segments plus a few for the digits. The disadvantage is that at any given time only one digit must display data (only one digit is ON at any given time). by using a fast enough refresh rate, the human eye will see the whole display as ON.

Multiple sequence is like this:
- select digit 1 as ON, all others are off;
- put 7 segment data to the digit;
- wait a bit;
- select digit 2 as on, all others are off;
- put 7 segment data to the digit;
- wait a bit;
... until you have reached the last digit, then you go to digit 1 and repeat.

The refresh rate mus be high enough so that the human eye will not notice the flicker, say 60Hz or more. As an example for a 4 digit display and a refresh rate of 75Hz you get a digit_change_clock_rate of 300Hz, which means that at every 3.33 ms you will change to a new digit and display the required data on it.

Examples, with source code and a much better explanation, can be found on google, just search for "7 segment multiplex".

The other way to display the data is to tie each LED to a microcontroller pin, and power the digits all the time. This has the advantage of flicker free and high brightness display, but need lots of I/O and drains a lot of power.
 

thanks very much for your replay ... other question .... is the frequency of the scanned 7 segment affect the 7 segment bright ? ..... or is a frequency of 300 hz rate is different bright than 3000 hz ?
 

Brightness is affected mostly by the duty cycle of the control signal.

Higher frequencies tend to have a brighter display than lower frequencies, because of the human eye perception, however LEDs won't provide as much light when you increase the frequency.

There is always a trade off. The brightest display is when all LEDs are lit continuously, then it depends on a lot of factors (switching frequency and duty cycle in particular).

You can always increase the LED current a bit, say 20mA or even 30mA per LED, because they will have time to cool off. Some LED displays can go as high as 50mA (needs testing) and can give the sensation of a brighter display then in continuous lit mode.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top