My AVR programmer has a 2×3 connector which I needed to connect to my breadboard. So I had to make my own connector:
The lead on the programmer looks like this :
So to connect it to the breadboard, I had to create my own adapter.
The trick is to get a 3-lane wide piece of stripboard, get some header pins.
Score the board in the middle with a craft knife and ruler, across the copper lanes, then dig-out a narrow channel of copper between two rows of holes.
Take a 3-wide header strip, push all the pins so they are only showing out of the plastic at one end. (So the pins are longer). Then put them through the stripboard holes so they rise up from the copper-clad side of the board.
Two rows of them can be soldered in-place. One on each side of the channel you cut. That gives you the 3×2 “male” connector the programmer cable can mate with.
Then attach 3-pin headers at either end, so these can go into the breadboard.
And there we have my programmer-to-breadboard adapter
Wiring up your adapter to the ATMega168 is as follows :
Looking down onto my adapter, with the cable connected, and the sticky-out knob of plastic on the connector facing to the left, the pins are numbered
- top-left = MISO, connects to Pin18 of the ATMega168
- top-right=+5v
- middle-left (closet to the sticky-out knob of plastic) = SCK, connects to pin 19
- middle-right = MOSI, connects to pin 17
- bottom-left = Reset. Connect to Pin1 (reset)
- bottom-right=GND
Pins on the ATMega are numbered top-left = pin1 (top has the semi-circular cut-out shape), the pin beneath that on the left is pin2…etc all down the left side to pin14 inclusively. Then bottom-right is pin15, the one above that is pin16, and so-on back to the top-right which is pin 28.






Pingback: GameClockDuino : Game timer « Cobweb