So I finally got my AVR programmer and I wanted to program my ATtiny85 MCU, to act as an RFID tag.
I got the code for the ATtiny85 RFID emulator from
here and you can read more about that project
there.
Since I have never programmed an AVR before, I had to read a lot to figure out how simple it is to hook up an AVR to the programmer on a breadboard.
This blog post might be helpful to those who want to just get their AVR programmed right away.
Parts needed:
- AVR-ISP programmer
- ATtiny85 MCU
- Breadboard
- 3 x 1.5v Battery box with 3 x 1.5v batteries - I was able to find only a 4 x 1.5v battery box, so I soldered a wire instead of one battery.
- 40pin Breakaway header - picture shows the 12 pins I have left, after using a bunch already...
- 6 Breadboard wires
Steps:
-------
- Mark the breadboard wires like so: VCC, GND, RST, MISO, MOSI, SCK - I used a white duct tape, cut a little piece, stick it to a cable and write the letters on it with a pen.
- Break two pieces of 3 pins from the 40pin breakaway header
- On one 3 pins header, using pliers, bend the long legs on a 90 degrees angle, then again - to give you a shape like so:
- Place the two 3 pin headers next to each other but on different sides of the breadboard - this allows for connecting a separate wire on each of the ISP connector's pins.
- Plug the ATtiny85 MCU in parallel to the "ISP header"
- Wire the pins according to the datasheet
- Connect the ISP connector to the 2x3 connector - make sure the ISP connector's pin 1 is connected to the MISO marked wire and connect battery pack to the ATtiny85's VCC and GND pins
- Done. You can now program the ATtiny85 with avrdude which is included in
winavr