Thank you in advance
In my sketch (based in the Nick Gammon’s “Freq. Timer; Input Pin D2) I want to check the real value of some registers to check if its bits have the value I expect.
I started with:
CS10 in TCCR1B – Timer/Counter1 Control Register B, and also check the complete byte value of TCCR1B.
So , I write:,
Serial.print (" TCCR1B: ");
Serial.print (TCCR1B, BIN);
Serial.print (" CS10: ");
Serial.println (CS10, BIN);
Result were:
TCCR1B: 1
CS10: 0
Because I expected something like:
TCCR1B = 00000001
CS10: 1
I tried with another register:
TOV1 in TIFR1 – Timer/Counter1 Interrupt Flag Register, and TIFR1 itself, by writing:
Serial.print ("TIFR1: ");
Serial.print (TIFR1, BIN);
Serial.print ("TOV1: ");
Serial.print (TOV1);
Result are (closer to ones I expected):
TIFR1: 100110
TOV1: 0.
Q.- Why I cannot see TCCR1B (which includes CS10 at bit 0)?.