====== ATtiny85 ====== ===== Specs ===== {{composants:attiny85-pins.jpg}} ===== Programming ====== You need an Arduino to act as ISP to flash programs to the ATtiny. Also, the ATtiny85 runs by default at 1MHz so if you want it to run at 8MHz you need to burn the bootloader into it after having selected the appropriate frequency. **Note :** Arduino in the past did not support ATtiny by default and additional libs had to be provided. Sooner or later this might not be the case anymore. The Arduino UNO should be flashed with the ISP program : File > Examples > ArduinoISP ==== Wiring ==== {{composants:programming-attiny85.jpg?480}} //**Note : **The SCK, MISO and MOSI pins can be directly wired to the Arduino's ICSP/SPI header pins. There is a 10μF electrolytic capacitor between RESET and GND (anode in GND) to avoid being auto-reset when we flash programs to the ATtiny// Set Arduino to ISP, usually located in the IDE in Tools > Programmer > Arduino as ISP You can add Heartbeat, Error, Programming LEDs (choose your colors) respectively on 9, 8, 7. ===== Ressources ===== *[[https://forum.arduino.cc/index.php?topic=342977.0|Forum post on the 'avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01' error. Possibly related to the absence of a capacitor between RESET and GND on linux]] *[[https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829|Basic programming tutorial]] *[[https://www.re-innovation.co.uk/docs/sleep-modes-on-attiny85/|Sleep Mode tutorial]]