Info
Content

Arduino custom frequency PWM

How to adjust Arduino PWM frequencies

 

millis() and delay() may be affected

Find what pin has what timer on Google

TCCR0B = TCCR0B & 0b11111000 | <setting>;

Setting Divisor Frequency
0x01 1 62500
0x02 8 7812.5
0x03 64 976.5625
0x04 256 244.140625
0x05 1024 61.03515625


TCCR1B = TCCR1B & 0b11111000 | <setting>;

Setting Divisor Frequency
0x01 1 31250
0x02 8 3906.25
0x03 64 488.28125
0x04 256 122.0703125
0x05 1024 30.517578125


TCCR2B = TCCR2B & 0b11111000 | <setting>;

Setting Divisor Frequency
0x01 1 31250
0x02 8 3906.25
0x03 32 976.5625
0x04 64 488.28125
0x05 128 244.140625
0x06 256 122.0703125
0x07 1024 30.517578125




No Comments
Back to top