Hitting the 2k program space, I looked to improve the code size. Realizing that using a 16bit value for bit-masks is quiet inefficient on a 8bit avr. Because I don’t store a value larger then 8bit in there, I split the 16bit variable into 2x8bit variables. This saves allot of cycles moving stuff unneeded around. read more