Saturday, 3 March 2018

Arduino programming tool. ISP and IDE.

The big hifi pre-amp is on hold for a bit, as I await some parts to arrive.

In the interim, I've wanted to make a programming tool for ATMEGA328 chips, that will ease programming changes when using them in stand alone units. I've looked about on the net, and there's some solutions which are nearly what I want... but nothing quite hits the mark.

The idea is to have a ZIF (zero insertion force) socket into which the blank chip to be programmed is inserted. I want it to be able to program chips with the bootloader, as well as straight from the IDE.

The fitted micro is loaded with the "Arduino as ISP" sketch. The switch, S1 & S2 (actually 1 four-gang switch, I just didn't have a library for it!) is used to switch between ISP programming for bootloader, and IDE Programmer. LEDs indicate various functions. D1 is ISP heartbeat, to show it's OK, D2 is Error in ISP programming, D3 is ISP programming activity, D4 indicates ISP mode, D5 indicates IDE mode (also lights when in ISP mode, as I forgot about the steering diode D5), and D6 indicates slave activity during bootloading (ICP1).

...a simple board is designed and etched....

The keen-eyed amongst you will notice the steering diode, D5 is missing from the layout. I mounted it underneath the board, as I'd missed it...

... and it works a treat !

Oh yeah, a quick note on R2 and R7... both 1 megohm across the crystal. I've picked up this bad habit from the original Arduino design. It doesn't need to be there. It was originally to provide some bias for gate-based oscillators. The ATMEGA328 has bias provided internally. It's a waste of 1 meg resistors! Don't bother to fit it, and I promise never to include it again!!

No comments:

Post a Comment