Introduction: Save 2.7K of Flash Memory on an Adafruit Trinket
The boot loader on the Adafruit trinket takes up 2.7K of the 8K of program memory on the Attiny85 chip. It also has to be using some of the 512 bytes of RAM for buffers and variables. By using an In Circuit Serial Programmer (ICSP) it is possible to load a program without the need for the boot loader.
I will be using the Sparkfun Tiny AVR Programmer available here: https://www.sparkfun.com/products/11801
Follow this link for instructions on how to add the Attiny85 definitions to the Arduino IDE: https://learn.sparkfun.com/tutorials/tiny-avr-pro...
If you have already installed the Trinket definitions you will want to back them up. They are in a file named "boards.txt". On Linux machines it is located in /home/[USERNAME]/sketchbook/hardware/attiny/. On Windows and Macintosh machines the folder is named "Arduino". It is located in your Documents folder. Rename the file to "boards.txt.bak and move it to a safe place.
If you want to use a different programmer, or build your own, that is okay too. There many alternatives, just search instructables for "attiny".
You will also need:
6 jumper wires.
Step 1: Connectintg the Programmer
Place the Trinket on the breadboard.
All pin numbers on the programmer are physical pin numbers.
Connect the following pins:
Programmer Trinket 1 Rst 4 GND 5 #0 6 #1 7 #2 8 BAT
Using the Programmer:
- Open the Arduine IDE.
- Click on Tools=>Board and select "ATtiny85 (internal 8 MHz clock)"
- Click on Tools=>Programmer and select "USBtinyISP".
- Load you program into the Arduino IDE and click the upload button.