Hello,
I am struck with my coding to store the data into the 24c02 and reading it.
Using this code i am only able to read and store the first digit (i.e k= a[0]), and getting random numbers for other digits like l=a[1].......
I am using proteus and HI-Tech compiler
for(i=0; i<4; i++)
{
a=ReadBYTE(0x01);
}
k=a[0]; tmpd1 = k; ///a[] is char type
l=a[1]; tmpd2 = l;
.......
while(1)
{
for(j=0;j<10;j++)
{ //units
if(!SW1)
{ delay(500);
while(!SW1){delay(10);}
k++;
commandsend(0xCF);
tmpd1++;
delay(10);
sendcount(str[k]);
WriteBYTE(0x001, k);
commandsend(0x8F);
}
}
//Tens place
if(tmpd1 >=10)
{
tmpd1 =0; k=0; l++, tmpd2++;
delay(10);
commandsend(0xCE);
delay(10);
sendcount(str[l]);
WriteBYTE(0x002, l);
commandsend(0x8E);
}
......................
}