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.

Problem with C code for ADC804 and 7 segment display as display is flickering

Status
Not open for further replies.

chanduchi

Junior Member level 2
Joined
Apr 15, 2006
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,479
Hi

Iam facing displays flickering problem since last 20 days.

Iam using delay but I am not able to salve it

Here iam using 74LS373(4) latches.

Iam sending the data through PORT 2 and enable the latches using PORT 3


Iam using ADC804+89c51+74LS373(4 numbers) +7 seven segment displays (4 numbers)

Please check my code given below and give me a proper ‘C’ code for this problem.

Thank you

Regards

Nari






This code i used in my project


sbit c1=P3^0;
sbit c2=P3^1;
sbit c3=P3^2;
Sbit C4=P4^3;


s1,s2,s3,s4=data;/* Example:data=4.943v.*/

while(1)
{

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

P2=s2; /* data=9*; '.'=constant */
c2=1;
Delay(100);
c2=0;

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

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


}


void Delay(unsigned int time)

{
unsigned int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
 

code

the display should be updated 25 or more times a second. what clock you are using.
 

Re: code

Thanks for your reply

Iam using 11.0592MHz clock

Regards

Nari
 

Re: code

Hi chanduchi:

It would be better you use a timer interrupt.
Every time you enter the interrupt you can change P2 at constant interval.
Remember you are reading de DAC then you spent time, then flickering can apear.

Hope this helps.
 

Re: code

Look for the chip enable line of ur displays and then check from where it is getting the interference...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top