From: Austin Roach Date: Sat, 30 Dec 2017 01:10:01 +0000 (-0500) Subject: Correct x8 ADC mux modes X-Git-Tag: v1.6~3 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=07def5c0588b7f9d502ad1bd0a489ae7a3ce2a1a;p=sx%2Fsimavr.git Correct x8 ADC mux modes In all of the datasheets for ATmega44/88/168/328 devices that I've seen, there are 8 channels of ADC selected with MUX modes 0000-0111, and the temperature sensor is selected with MUX mode 1000. --- diff --git a/simavr/cores/sim_megax8.h b/simavr/cores/sim_megax8.h index c4e1994..3bd65cb 100644 --- a/simavr/cores/sim_megax8.h +++ b/simavr/cores/sim_megax8.h @@ -179,7 +179,8 @@ const struct mcu_t SIM_CORENAME = { [0] = AVR_ADC_SINGLE(0), [1] = AVR_ADC_SINGLE(1), [2] = AVR_ADC_SINGLE(2), [3] = AVR_ADC_SINGLE(3), [4] = AVR_ADC_SINGLE(4), [5] = AVR_ADC_SINGLE(5), - [6] = AVR_ADC_SINGLE(6), [7] = AVR_ADC_TEMP(), + [6] = AVR_ADC_SINGLE(6), [7] = AVR_ADC_SINGLE(7), + [8] = AVR_ADC_TEMP(), [14] = AVR_ADC_REF(1100), // 1.1V [15] = AVR_ADC_REF(0), // GND },