i am trying to build a Homematic Phasecut-Dimmer (leading edge) with an Arduino Pro Mini. Examining the code, i stumbled over line 107 in PhaseCut.cpp:
TCCR2B |= (1 << WGM21) | (1 << CS20) | (1 << CS21) | (1 << CS22) ; // Enable/start CTC and set prescaler to 1024
the bit WGM21 is located in TCCR2A, not in TCCR2B. So, the CTC-Mode will not be enabled.
Is this a "cosmetic" bug :-)? Maybe the CTC-Mode ist not necessary for the comparematch to occure?
i am trying to build a Homematic Phasecut-Dimmer (leading edge) with an Arduino Pro Mini. Examining the code, i stumbled over line 107 in PhaseCut.cpp:
TCCR2B |= (1 << WGM21) | (1 << CS20) | (1 << CS21) | (1 << CS22) ; // Enable/start CTC and set prescaler to 1024
the bit WGM21 is located in TCCR2A, not in TCCR2B. So, the CTC-Mode will not be enabled. Is this a "cosmetic" bug :-)? Maybe the CTC-Mode ist not necessary for the comparematch to occure?