LCD display flickrign problem. Urgent help required.

Status
Not open for further replies.
please also tell me how much delay will this routine produce with 12MHz crystal?

Code:
#include <reg51.h>
				   
sbit led=P0^0;

void delay(msec)
{
int i,j;
	for (i=0;i<msec;i++)
		for (j=0; j<1275; j++);

}

void main()
{
led=1;
delay(100);
led=0;
delay(100);

}
 
each iteration is about 9mS so with a delay(100) approx 900 mS...

We have been here before.... j<142 = 1ms... the j loop took 7 cycles... 7 * 143 = 994uS + the i loop take another 7 cycles .. 1001uS
 
With VREF+ being connected directly to Vcc any ripple or noise on the Vcc rail will affect the A/D conversion. VREF+ requires decoupling from Vcc by RC filtering components.
The LED drive transistors should each have a resistor (say 10k) between base and emitter to ensure they turn off completely.
 

hi alec,
This image shows what the d/s says about Vref decoupling.

E.
 
Thanks, Eric. That discusses decoupling the analogue inputs and Vref/2 pin. Can't see any Vref/2 pin on the schematic. Is it the same as VREF+ ?
 
plz check my this routine... i want to select one output at a time. just like rotation of 4 bit data (1000B). but it is giving random selection; with interrupt signal all bits goes high and then any one bit got selected randomly.... i dont know what acctually the problem is???????
Code:
#define select P3

 sbit v28=select^4;
 sbit v14=select^6;
 sbit v7=select^5;
 sbit off=select^7;


	void switching() interrupt 0
		   {

					if(count==0)
						{
							 off=0;  v7=1; v28=0; v14=0;
							 count++;
						}
					else	
					if(count==1)	
						{ 
							v7=0; v14=1; v28=0; off=0; 
							count++;
						}
					else
					if(count==2)
					    {
							v14=0; v28=1; v7=0;  off=0; 
							 count++;
						}

					else
						{ 
						
							count=v28=v14=v7=0; off=1; 
							
						}



		   		/*  if(v28==0 && v14==0 && v7==0 && off==1)
				  		{ off=0;  v7=1; v28=0; v14=0; }
					
				    else
                        if(v28==0 && v14==0 && v7==1 && off==0)
                              { v7=0; v14=1; v28=0; off=0; }
					
					else
						if(v28==0 && v14==1 && v7==0 && off==0)
						      { v14=0; v28=1; v7=0;  off=0; }
					
					else
					   { v28=v14=v7=0; off=1; }	 */
						
		   
		   }

and here is the immage of my circuit.

View attachment 62237
 
Last edited:
any help about my prevous post please??
during interrupt all the bits of port 3 got high and after interrupt it selects any one of the bit High Randomly.. not according to coad..... ... how to solve this problem..???
 
Last edited:
the problem is solved

the problem was with the interrupt.. we must force the interrupt to go high in order to disable it.. so it will be able to select the required pin correctly....

i am very thank ful to all who help me.

best regards
Qaisar azeemi
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…