Added HEATERS_PARALLEL (Request from reifsnyderb)

This allows a hot end with two heaters and a FET for each heater. This is useful if the FET is not capable of heating two heaters.
This commit is contained in:
Erik van der Zalm
2013-11-17 13:29:02 +01:00
parent 48a185d004
commit 69af392554
2 changed files with 20 additions and 3 deletions

View File

@ -1040,7 +1040,7 @@ ISR(TIMER0_COMPB_vect)
static unsigned char temp_state = 0;
static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
static unsigned char soft_pwm_0;
#if EXTRUDERS > 1
#if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
static unsigned char soft_pwm_1;
#endif
#if EXTRUDERS > 2
@ -1052,7 +1052,12 @@ ISR(TIMER0_COMPB_vect)
if(pwm_count == 0){
soft_pwm_0 = soft_pwm[0];
if(soft_pwm_0 > 0) WRITE(HEATER_0_PIN,1);
if(soft_pwm_0 > 0) {
WRITE(HEATER_0_PIN,1);
#ifdef HEATERS_PARALLEL
WRITE(HEATER_1_PIN,1);
#endif
}
#if EXTRUDERS > 1
soft_pwm_1 = soft_pwm[1];
if(soft_pwm_1 > 0) WRITE(HEATER_1_PIN,1);
@ -1070,7 +1075,12 @@ ISR(TIMER0_COMPB_vect)
if(soft_pwm_fan > 0) WRITE(FAN_PIN,1);
#endif
}
if(soft_pwm_0 <= pwm_count) WRITE(HEATER_0_PIN,0);
if(soft_pwm_0 <= pwm_count) {
WRITE(HEATER_0_PIN,0);
#ifdef HEATERS_PARALLEL
WRITE(HEATER_1_PIN,0);
#endif
}
#if EXTRUDERS > 1
if(soft_pwm_1 <= pwm_count) WRITE(HEATER_1_PIN,0);
#endif