Hi - I followed the steps from here and other tutorials to add an ATMega 16 to the boards in the IDE.
(I downloaded the binary (exported compiled binary) using an AVR ISPMkii programmer under Atmel Studio) - (The Arduino compiler is much friendlier for coding.)
I managed to program a blink sketch, but am trying to understand why Digital 6, is physical pin 20, according to the article at the above url. (it does work that way if I run the code.
The pin file is from here.
This file has these initial definitions:
static const uint8_t SS = 12;
static const uint8_t MOSI = 13;
static const uint8_t MISO = 14;
static const uint8_t SCK = 15;
static const uint8_t SDA = 17;
static const uint8_t SCL = 16;
static const uint8_t LED_BUILTIN = 13; // We don't have a built-in LED, but still ..
static const uint8_t A0 = 24;
static const uint8_t A1 = 25;
static const uint8_t A2 = 26;
static const uint8_t A3 = 27;
static const uint8_t A4 = 28;
static const uint8_t A5 = 29;
static const uint8_t A6 = 30;
static const uint8_t A7 = 31;
But these don't seem to agree with any atmega16 package. Further down the dip package pins are drawn graphically correctly. (I am using the Dip package)
I do see that physical pin 20 = PD6 (hence, I suppose digital 6), but I can't quite decode this from the pin file.
Thanks and regards
Russell