|
@@ -740,7 +740,13 @@ void st_init()
|
740
|
740
|
// output mode = 00 (disconnected)
|
741
|
741
|
TCCR1A &= ~(3<<COM1A0);
|
742
|
742
|
TCCR1A &= ~(3<<COM1B0);
|
743
|
|
- TCCR1B = (TCCR1B & ~(0x07<<CS10)) | (2<<CS10); // 2MHz timer
|
|
743
|
+
|
|
744
|
+ // Set the timer pre-scaler
|
|
745
|
+ // Generally we use a divider of 8, resulting in a 2MHz timer
|
|
746
|
+ // frequency on a 16MHz MCU. If you are going to change this, be
|
|
747
|
+ // sure to regenerate speed_lookuptable.h with
|
|
748
|
+ // create_speed_lookuptable.py
|
|
749
|
+ TCCR1B = (TCCR1B & ~(0x07<<CS10)) | (2<<CS10);
|
744
|
750
|
|
745
|
751
|
OCR1A = 0x4000;
|
746
|
752
|
TCNT1 = 0;
|