Программирование Atmega16L с помощью ArduinoISP
Код который нужно добавить в boards.txt
############################################################## # Additional definitions for Arduino # Author: Sudar <http://hardwarefun.com> ############################################################## # Definitions for ATmega 8MHz ############################################################## atmega16-8.name=Atmega16 (internal 8MHz clock) atmega16-8.upload.protocol=stk500v1 atmega16-8.upload.maximum_size=14336 atmega16-8.upload.speed=19200 atmega16-8.bootloader.low_fuses=0x84 atmega16-8.bootloader.high_fuses=0x99 atmega16-8.build.mcu=atmega16 atmega16-8.build.f_cpu=8000000L atmega16-8.build.core=arduino:arduino atmega16-8.build.variant=mega16 ############################################################## # TODO: Add definitions for ATmega external clock
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 2; // the setup routine runs once when you press reset: void setup() { Serial.begin(9600); // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(100); // wait for a second Serial.println("Hello World"); }
// +-\/-+ // (D 8) PB0 1| |40 PA0 (AI 0) // (D 9) PB1 2| |39 PA1 (AI 1) // (D 10) PB2 3| |38 PA2 (AI 2) // PWM (D 11) PB3 4| |37 PA3 (AI 3) // (D 12) PB4 5| |36 PA4 (AI 4) // (D 13) PB5 6| |35 PA5 (AI 5) // (D 14) PB6 7| |34 PA6 (AI 6) // (D 15) PB7 8| |33 PA7 (AI 7) // RESET 9| |32 AREF // VCC 10| |31 GND // GND 11| |30 AVCC // XTAL2 12| |29 PB7 (D 23) // XTAL1 13| |28 PC6 (D 22) // (D 0) PD0 14| |27 PC5 (D 21) // (D 1) PD1 15| |26 PC4 (D 20) // (D 2) PD2 16| |25 PC3 (D 19) // (D 3) PD3 17| |24 PC2 (D 18) // PWM (D 4) PD4 18| |23 PC1 (D 17) // PWM (D 5) PD5 19| |22 PC0 (D 16) // (D 6) PD6 20| |21 PD7 (D 7) PWM // +----+