ATtiny85 programming using Mega2560 as ISP

I’ve been burning sketches to an ATtiny85-20PU and burning bootloaders to ATmega328P-PU’s today.

The pinouts below are for the physical pins on the ATtiny85/ATmega328P, and the Arduino pins for the Mega2560:

	TINY	MEGA    328P
MISO	6	50      18
MOSI	5	51      17
SCK	7	52      19
RESET	1	53      1
VCC	8	5V      7
GND	4	GND     8

After uploading the ArduinoISP sketch to the Mega2560, add the 10uF capacitor between RESET and GND on the 2560 and upload sketches normally (select “ATtiny85 8MHz internal” as Board) or “Burn Bootloader”.

To upload a sketch to an ATmega328P-PU on a breadboard, you must use “Upload using programmer” (with “Uno” as Board) or use the CP2102 directly instead of the Mega2560 as an ISP.

These show the Arduino pins:

I also tried to get ATtiny85 uploading working from a Makefile (I made a Debian package of 10.5 from Git) but it seems it still needs some work.

ARDUINO_DIR   = /usr/share/arduino
ARDMK_DIR     = /usr
AVR_TOOLS_DIR = /usr
ARDUINO_PORT  = /dev/ttyACM0
BOARD_TAG        = attiny85-8
ISP_PORT         = /dev/ttyACM0
ISP_PROG         = -c stk500v1
ARDUINO_VAR_PATH = /home/user/arduino/hardware/attiny-master/variants
BOARDS_TXT       = /home/user/arduino/hardware/attiny-master/boards.txt

include /usr/share/arduino/Arduino.mk