void sen_data(unsigned char c)
{
unsigned char i,k;
LATCH =0;
SCK = 0;
for(i=0;i<8;i++)
{
DI = ( C & 0x80)?1:0;
SCK = 1;
c = c << 1;
SCK = 0;
}
LATCH = 1;
DI = ( C & 0x80)?1:0; what does this line do .. can u explain please and c = c << 1; will shift data from msb .... i suppose we have to shift data from lsb to Msb ...i am confused
c = c << 1 will shift data to left 0100 0000 << 1 will be 1000 0000 ... and wit uc data transfer we want to transfer the lsb and then shift ... I am confused .
Also DI = ( C & 0x80)?1:0; what does this line do
data in c will be anded with 0x80 so what does ?1:0