|
@@ -1399,7 +1399,12 @@ void Temperature::set_current_temp_raw() {
|
1399
|
1399
|
}
|
1400
|
1400
|
|
1401
|
1401
|
/**
|
1402
|
|
- * Timer 0 is shared with millies
|
|
1402
|
+ * Timer 0 is shared with millies so don't change the prescaler.
|
|
1403
|
+ *
|
|
1404
|
+ * This ISR uses the compare method so it runs at the base
|
|
1405
|
+ * frequency (16 MHz / 256 = 62500 Hz), but at the TCNT0 set
|
|
1406
|
+ * in OCR0B above (128 or halfway between OVFs).
|
|
1407
|
+ *
|
1403
|
1408
|
* - Manage PWM to all the heaters and fan
|
1404
|
1409
|
* - Update the raw temperature values
|
1405
|
1410
|
* - Check new temperature values for MIN/MAX errors
|
|
@@ -1515,6 +1520,7 @@ void Temperature::isr() {
|
1515
|
1520
|
#endif
|
1516
|
1521
|
#endif
|
1517
|
1522
|
|
|
1523
|
+ // 488.28 Hz (or 1:976.56, 2:1953.12, 3:3906.25, 4:7812.5, 5:7812.5 6:15625, 6:15625 7:31250)
|
1518
|
1524
|
pwm_count += _BV(SOFT_PWM_SCALE);
|
1519
|
1525
|
pwm_count &= 0x7f;
|
1520
|
1526
|
|
|
@@ -1523,7 +1529,7 @@ void Temperature::isr() {
|
1523
|
1529
|
/**
|
1524
|
1530
|
* SLOW PWM HEATERS
|
1525
|
1531
|
*
|
1526
|
|
- * for heaters drived by relay
|
|
1532
|
+ * For relay-driven heaters
|
1527
|
1533
|
*/
|
1528
|
1534
|
#ifndef MIN_STATE_TIME
|
1529
|
1535
|
#define MIN_STATE_TIME 16 // MIN_STATE_TIME * 65.5 = time in milliseconds
|