diff --git a/Makefile b/Makefile index 9c3d331..c854174 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ # ============================================================================== VERBOSE := false -ARCH := m1284p +ARCH := m1284 #FREQ := 18432000UL FREQ := 8000000UL -MCU := atmega1284p +MCU := atmega1284 ASP := usbasp CC := avr-gcc LD := $(CC) diff --git a/src/bus/pwm.c b/src/bus/pwm.c index d1bf1ba..7b60a9d 100644 --- a/src/bus/pwm.c +++ b/src/bus/pwm.c @@ -59,7 +59,6 @@ int PWM_Init(void) // Register, these bits control the counting sequence of // the counter, the source for maximum (TOP) counter // value, and what type of waveform generation to be used. - // See page 115 of the ATMega32A data sheet for all modes. // Mode WGM13 WGM12 WGM11 WGM10 Timer Mode TOP // 14 1 1 1 0 Fast PWM ICR1 diff --git a/src/main.c b/src/main.c index 18ffd34..a9a01d3 100644 --- a/src/main.c +++ b/src/main.c @@ -12,7 +12,6 @@ // TODO: Config header for chip specifics like EEPROM size. // TODO: Check thermistor conversion results /w thermometer. // TODO: Implement primary state machine for update loop. -// TODO: Migrate to ATMega 1284P-PU for 2nd 16-bit timer. // TODO: Use 18.432MHz quarz crystal, burn required fuses. // TODO: Implement optional CRC8 sensor measurement check. // TODO: Proper error handling and recovery (after testing). @@ -108,19 +107,9 @@ static int Init(void) // MOS_Enable(MOS01); // Peltier // MOS_Disable(MOS02); // Heating - // Only FAN01 and FAN02 are receiving the correct - // frequency (25 KHz) right now. The 16-bit timer on - // the ATMega32A has two outputs so it would require - // software PWM to have a variable frequency on PD7. - - // A simple implementation will take up around 30-50 - // percent of CPU time. Faster approaches are quite - // complicated so it might be worth it to switch to - // something like an ATmega328PB. - - PWM_SetValue(FAN01, 50); // Fan Peltier Hot side - PWM_SetValue(FAN02, 50); // Fan Peltier Cold Side - // PWM_SetValue(FAN03, 20); // Fan Heating + PWM_SetValue(FAN01, 50); // Fan Peltier Hot side + PWM_SetValue(FAN02, 50); // Fan Peltier Cold Side + PWM_SetValue(FAN03, 50); // Fan Heating // The I2C_SetChannel command changes the channel // setting of the PCA9546 I2C multiplexer. Any