Reading the delay out of the 5 most significant bits from the framedata variable frame.

This commit is contained in:
Kai Lauterbach 2011-12-21 18:11:56 +01:00
parent 53040bd56c
commit f68c38b625

View file

@ -73,7 +73,11 @@ ISR (TIMER1_COMPA_vect)
frmnum++;
}
}
delay = (frame & 0xf8000000) >> 24; // Just shift right by 24 instead of 27 to multiply the delay by 8.
// Just shift right by 24 instead of 27 to multiply the delay by 8.
// Possible delays are 8 16 24 32 and so on. A zero delay isn't possible.
// Zero means that a delay of 255 happens because the delay variable was decreased first before testing
// it's is zero value.
delay = (frame & 0xf8000000) >> 24;
}
// PORTD = __, 9, C, B, A,D+,D-,__