Writing an library to shiftregister...continued

Now the code has been cut down to less that 30 lines. here is a part of the code...

do{
if(input(pin_a0))
{
test = 0b11011011;
}
else if(input(pin_a1))
{
test = 0b10011001;
}

for(i=0;i<8;i++)
{
value = bit_test(test,i);

output_low(S_CLK);
output_low(L_CLK);

if(value==1)
{
output_bit(Data,1);
output_bit(S_CLK,value);
output_bit(Data,0);
}
else if(value==0)
{
output_bit(S_CLK,1);
output_bit(S_CLK,0);
}
Post a Comment

Popular Posts