Commit 07def5c0588b7f9d502ad1bd0a489ae7a3ce2a1a
authorAustin Roach <ahroach@gmail.com>
Sat, 30 Dec 2017 01:10:01 +0000 (20:10 -0500)
committerMichel Pollet <github.com@pollet.net>
Tue, 9 Jan 2018 09:01:19 +0000 (09:01 +0000)
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.

simavr/cores/sim_megax8.h

index c4e19946c45003cf98cec0c8edcdd06d278aa53e..3bd65cbee1750585d29292625033c2503a19908d 100644 (file)
@@ -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
                },