lgeorge123
Full Member level 2
i have the following code from somewhere and tried to transfer to pic18f452 so i have to understand the code first.
void WriteByte()
{
uchar k;
for(k=0;k<8;k++)
{
dat=dat<<1;
R1=CY;
R2=1;
CLK=0;
CLK=1;
}
}
I guess the code is transfer the 7th bit of dat to R1 until all of the dat is done , am I correct ????
void WriteByte()
{
uchar k;
for(k=0;k<8;k++)
{
dat=dat<<1;
R1=CY;
R2=1;
CLK=0;
CLK=1;
}
}
I guess the code is transfer the 7th bit of dat to R1 until all of the dat is done , am I correct ????