Having problem in Interfacing Two multiplexed seven segment with 8051
my code is
can't figure out what is the problem here, counting up to 99 is happening but seven segment is getting on and off... sorry for the bad english
my code is
Rich (BB code):
#include<reg51.h>
sbit a=P3^0;
sbit b=P3^1;
void main()
{
unsigned char ar[]={0x3F,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
unsigned int i,j,k;
while(1)
{
for(i=0;i<100;i++)
{
a=0;
b=1;
P2=ar[i/10];
for(k=0;k<35000;k++); // delay
a=1;
b=0;
P2=ar[i%10];
for(k=0;k<35000;k++);
}
}
}
Last edited by a moderator: