Grumpy_Mike:
but bit 6 is a mask bit so if i set bit6 high i get B01010001(dec83), which totally changes my original 17.
Yes it will. The number 17 is only one way of interpreting what is after all only a pattern of bits. But if you set bit 6 then all the other bits remain the same and that is what matters if I understand your context correctly.
ya but the clock then runs with "83" (or whatever 83 converts to from bcd).
lloyddean:
Untested but something along the line of -#define setBit(VALUE, BIT) ((VALUE) |= (1 << BIT))
#define clearBit(VALUE, BIT) ((VALUE) &= ~(1 << BIT))
im gonna give this a shot. thank you.