Try using decimal 255 in your formula instead of $100. The hex number $100 is equal to decimal 0001 0000 000. This might be a problem with your byte variable.

Robert