Change ARCH and MCU settings to match chip signature

This commit is contained in:
2024-09-30 22:18:36 +02:00
parent ac7cd8a96b
commit b0f08967c7
3 changed files with 5 additions and 17 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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