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.

Code for 5 digit counter

Status
Not open for further replies.

vicky29

Member level 4
Joined
Feb 5, 2005
Messages
75
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
750
hi,
i am designing a counter in which i'm using 7 segment displays connected to micrcontroller(a---g) and common anodes through bc557, my displays flicker a lot what can i do?
 

How about modify your hardware? I have ever made 5 digit counter with seven segment too and i use 74HC595 to latch the data and the result is not bad. Maybe you can try it too. It is easier than mantaining your delay.
 

hi
thanks but i have ten displays and i cant go on using 10 latch ics in my project as it will increase my project cost. i want some simpler technique so that my system works well and is economical. i want software method.
 

Multiplexing will avoid flicker if the time for each digit is not greater than 4 mS.

Cheers

Ravi
 

Hi

Iam facing displays flickering problam in my project.

Here iam using 74LS373 latches. Iam useing same hardware what vicky19 used .

Instated of Bc547 iam using data latches.

This code i used in my project


sbit c1=P3^0;
sbit c2=P3^1;
sbit c3=P3^2;


s1,s2,s3=data; /*Example:voltage=4.57v*/

while(1)
{

P2=s1; /*P2=4*/
c1=1; /* Latch enable*/
Delay(100);
c1=0; /* Latch disable*/

P2=s2; /*P2=5*/
c2=1;
Delay(100);
c2=0;

P2=s3; /*P2=7*/
c3=1;
Delay(100);
c3=0;

}


In the first loop it is showing correct values but in the second time loop it showing
interchanged values on the display.
Iam using ADC804+89c51+74LS373(3 numbers)
+7 seven segment displays(3 numbers)
thank you

regards
nari
 

hai

if the display flickers means then the refreshing rate is too low
decrease the delay used for refreshing
it will clears your problem
 

Try to use 4553 it is three seven segments counter.
 

you should add some switching delays to settle the latch events
and register load events low high delay
that ttl and cmos has will take time also allowing a little for this is good

i tried your code and it worked ok untill i used added glitch factors the ttl has
then it gave issues
this code below fixed this

the added transitional delay you should use is anything above 500us
but not too high {like me} then youll see stepping and flicker

while(1)
{

P2=s1; /*P2=4*/
Delay(5); // added transistional delays
c1=1; /* Latch enable*/
Delay(100);
c1=0; /* Latch disable*/
Delay(5);

P2=s2; /*P2=5*/
Delay(5);
c2=1;
Delay(100);
c2=0;
Delay(5);


P2=s3; /*P2=7*/
Delay(5);
c3=1;
Delay(100);
c3=0;
Delay(5);

}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top