you can use the loop :
for I=1 to 7
Pulsein Ir_pulse(i) , Pind , 2 , 0
Next I
new loop :
for i=0 to 6 '
Pulsein Ir_pulse(i+1) , Pind , 2 , 0
If Ir_pulse(I) < 100 Then
Dbyte.I = 0
end if
next
this way you can remove the other code where you set the bit.
↧