Attiny85, Attiny84 and Atmega328 Programming Boards for Use With SparkFun AVR Programmer.

by CScientific in Circuits > Electronics

1447 Views, 17 Favorites, 0 Comments

Attiny85, Attiny84 and Atmega328 Programming Boards for Use With SparkFun AVR Programmer.

20210710_135650.jpg

I saw there were a lot of AVR programming boards already on Instructables. I debated on whether or not to add 'yet another one'. I decided to do so because this one was different in a couple of ways. One, it uses the SparkFun AVR programmer to program an 8pin attiny85, a 14pin attiny84 and a 28pin atmega328*. The second way it is different is that each microprocessor type (8pin, 14pin and 28pin) is given it's own board.

To start I soldered a 6pin JST-XH connector on the two AVR programmers that I have. I originally used dupont connectors on one of them, but those aren't 'polarized'. I blew out a chip plugging it in backwards. The JST-XH connectors only go one way, but they are a lot harder to disconnect (this can be either an advantage or disadvantage).

*I found some atmega328p on amazon for half the price of an attiny84 there, crazy.

Bare Boards and Sockets.

20210708_191727.jpg
20210708_191715.jpg
20210708_191707.jpg

ElectroCookie solderable breadboard PCB and components laid out.

The larger board has +/- rails all the way around.

I ended up not using the green screw terminals. They were intended to be used as an alternate source of power for the board allowing it to run disconnected from the AVR programmer. They could always be added in. For now I'll accomplish the same by using +/- 5V pins inserted into the power rail sockets.

Bare Boards Backsides.

20210709_140822.jpg
20210709_140833.jpg
20210709_140839.jpg

Backside of the board that shows where the pads are connected.

Boards After Soldering.

20210709_223808.jpg
20210709_223920.jpg
20210710_140516.jpg

Front and back of the soldered boards.

I used 22awg solid wire for the 'traces'.

For the SPI interface to each chip pin. (please double check these on your own).

          attiny85  attiny84  atmega328
RESET -> 1 4 1
MOSI -> 5 7 17
MISO -> 6 8 18
5V -> 8 1 7
SCK -> 7 9 19
GND -> 4 14 8 & 22

To program the atmega328 I found that I had to add a 10k pull-up resistor from pin 1 (RESET) to the positive rail. For those just starting with electronics, a pull-up resistor is used to establish the 'on' or '1' or '+' state on a pin as a default. It will always go to positive. A pull-down resistor does the opposite, it establishes the 'off' or '0' or '-' state on a pin and it will always go to negative.

I started from RESET (top of the JST-XH connector in the picture) and worked my way down. This allowed for easier and neater laying of the connecting wires. I trimmed a few mm off of a piece of wire, then laid it down along the path then cut each piece to length with an additional few mm to trim off of the other end.

I also added a 10uF capacitor across the +/- rail of each board. They are commonly referenced as decoupling or bypass capacitors. I find the terms a little confusing for this case though. In this usage the capacitor serves as a mini-uninterruptible power supply.

Testing Each Board.

20210714_134334.jpg
20210710_160157.jpg
20210710_153223.jpg

Testing the programmer on each chip by turning on a few pins to illuminate some leds.

I already had experience getting the attiny85 and attiny84 to work.

The atmega328 was a bit more of a challenge, it was the real reason I embarked on this whole project.

The SparkFun website has some excellent tutorials on getting the SparkFun AVR Programmer working (among many other excellent tutorials).

Another inspiration was 'Make: AVR Programming' by Elliot Williams. He primarily focuses on the atmega168 in the book. But all of the 28pin atmega chips (48, 88, 168 and 328) have the same pin arrangement I believe. So the same board should work for all of them.

Crimper and Led Test Tool.

20210710_135841.jpg
20210710_140054.jpg

I used some six conductor cable to make the wire from the AVR programmer to the boards. The cable end pins should be straight through. That is the wire on RESET on the AVR programmer is on the same pin on the boards. None are flipped. I didn't use the smaller cable in the picture, it was too thin a gauge and kept breaking when I'd try to extract the JST-XH connector. The larger cable gauge was almost too thick, it took some effort to get a bit of the insulation in when making the crimp, but it is holding up well. I've found a simple IC extractor tool is a useful aid to disconnect the JST-XH connectors.

I included a picture of the led test tool I use as well. It's handy for testing these small microprocessors. It uses a 330 ohm 9pin resistor array with three banks of three red, yellow, green leds suitable for ~5V.

Thanks for having a look.

Any questions, feel free to inquire.

Project Built With Programmer.

halloweenPrototype.jpg

Atmega328 Halloween Sound Effects Prototype:

https://www.instructables.com/AVR-ATmega328p-Ardui...