Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: SmAsH on April 01, 2009, 04:39:21 AM

Title: home made parallel port programmer wiring
Post by: SmAsH on April 01, 2009, 04:39:21 AM
this is how ive got my programmer wired. ive seen a few different schems posted on here and it kinda confused me. does this wiring look right? i just want to make sure because i dont want to fry my only atmega8.
1---sck
2---mosi
11---miso
16---reset
18---gnd
ive attached pics of a little $50 board but without a power supply. it needs external +5V. i know theyre not too good but i only have an okayish camera. please no "go get teh f***kin neh camzz denz take teh photo" comments. :D
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 08:21:59 AM
This reminds me some of the first AVR I played with. I built is as an all-in-one unit, though. I used a PC board like the one you used, but forced the D-25 connector onto the edge of the board. I wired from there to the AVR.

It was an easy way to experiment with AVRs for the first time.
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 08:40:32 AM
Here is the second programmer I made. It is a 10-pin programmer, but that isn't too difficult to translate to 6-pin.

The 3 resistors were 330 ohm.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 01, 2009, 01:29:57 PM
gearmotion, does yours work?
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 02:16:54 PM
gearmotion, does yours work?

Yes. But I'll be darned if I remember what software I used with it. It looks to have obvious pin differences from your version.

I want to think that I used PonyProg. And that this is compatible with STK200/300 programmers. I don't have my notes, anymore.

You have to use a real parallel port. USB parallel ports do not work.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 01, 2009, 02:21:06 PM
is a real parellel port one in the back of your pc?
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 02:26:32 PM
is a real parellel port one in the back of your pc?

:-) Yes.

A parallel port on the motherboard of the PC (or on a card if they still make them that way) supports programmatically "wiggling" the parallel ports lines. A programmer/program then can make the parallel port act like the ISP signals that program the AVR.

A USB parallel port is only a printer interface.

I have to step away from my PC soon, but feel free to PM me and I'll try to get you set up.


Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 01, 2009, 02:38:55 PM
ok thanks gearmotion!
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 08:14:17 PM
This is the schematic I used for this programmer. But I can't locate the software I had used. It was programming software that supported the STK200.

Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 01, 2009, 08:17:01 PM
Might be best to just duplicate this: http://www.lancos.com/prog.html#avrisp (http://www.lancos.com/prog.html#avrisp)
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 01, 2009, 11:18:56 PM
well thanks, ill give the top one a try and prey i don't fry my port. and for the resistors do they have to be exact? also can it harm my atmega8 if i connect the wires wrong?
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 02, 2009, 07:47:11 AM
well thanks, ill give the top one a try and prey i don't fry my port. and for the resistors do they have to be exact? also can it harm my atmega8 if i connect the wires wrong?

The idea behind the series resistors is to protect the AVR and the parallel port if there is contention. A value from 220 ohm minimum to about 1k maximum should do OK.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 02, 2009, 02:02:15 PM
yep, i had a bag of 330ohm left over from my $50 boards.
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 03, 2009, 12:53:22 PM
Apparently there are several ways to wire the parallel port.

This is one (1):

1 - SCK
2 - MOSI
11 - MISO
16 - Reset
18-25 - Ground

This is another (2):

2 - MOSI
4 - Reset
5 - SCK
11 - MISO
18-25 - Ground

This is a third (3):

6 - SCK
7 - MOSI
9 - Reset
10 - MISO
18-25 - Ground

This is a fourth (4):
7 - Reset         
8 - SCK
9 - MOSI
10 - MISO
18-28 - Ground


I think #1 is used with WinAVR programming/development environment.

I used #2. It is called "STK200" as it duplicated a wiring design for the Atmel STK200 development kit. The software I used was a BASIC for the AVR. A company called Kanda will supposedly let you download programming software if you register with them.

The #3 circuit is compatible with the PonyProg AVR programming software. In PonyProg you select a parallel interface: "AVR ISP I/O".

#4 Is used with AVRDude. (Used on Linux)

As I mentioned, use series resistors to protect the AVR and parallel port.

So ultimately you should pick the hardware circuit based on the programming software that you have or can obtain.

Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 03, 2009, 02:28:36 PM
well i have now built 1 and 2 and i have winavr so i might take a look at the other one from the company 'kanda'. also, great post gearmotion! this will help tonnes of people :)
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 03, 2009, 02:34:03 PM
well i have now built 1 and 2 and i have winavr so i might take a look at the other one from the company 'kanda'. also, great post gearmotion! this will help tonnes of people :)

Thanks. Yup my whole goal in life now is to get the little "Helpful?" count up. Even eating and breathing come second...

:-P I'm really just glad to help. It was an unanswered question in my mind: Just what parallel port wiring goes with what program. So I did a little research.
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 04, 2009, 02:46:07 PM
SmAsH:

Take a look here at a quick blog I put together:

http://circuitgizmos.com/wordpress/?p=272 (http://circuitgizmos.com/wordpress/?p=272)


Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 04, 2009, 03:05:15 PM
wow thanks man, thats a really easy and clear blog to understand! ;D
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 04, 2009, 03:08:05 PM
wow thanks man, thats a really easy and clear blog to understand! ;D

So have you had success with programming?
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 04, 2009, 03:15:34 PM
ahhh im still scared to put my chip into the socket and try :'( but i will try today as its only $6 next time im getting the 8kb version as its only $3. but yea i hope to give it a try today. just one question. does it matter if i made the casing of the parallel port gnd? is there something else connected to it? im just very busy right now. ive got 5 assignments due next week (two of them monday) and i have yet to start them :o
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 04, 2009, 03:19:43 PM
ahhh im still scared to put my chip into the socket and try :'( but i will try today as its only $6 next time im getting the 8kb version as its only $3. but yea i hope to give it a try today. just one question. does it matter if i made the casing of the parallel port gnd? is there something else connected to it? im just very busy right now. ive got 5 assignments due next week (two of them monday) and i have yet to start them :o

Take the plunge!

The case/shell does not have to be grounded.

Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 04, 2009, 03:24:33 PM
The case/shell does not have to be grounded.
i know but after about 10mins of trying to make solder bridges i got bored. will it screw anything up?
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 04, 2009, 03:27:08 PM
Not likely.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 04, 2009, 03:29:45 PM
ok thanks gearmotion ;D ill try to fit it in somewhere today.
EDIT: nope didnt work :( i guess i might spend the $30 on the parallel one from sparkfun :-\
Title: Re: home made parallel port programmer wiring
Post by: noobinator on April 05, 2009, 12:38:48 AM
$30? i thought people were saying its like 12.95?
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 05, 2009, 01:11:05 AM
nonono, i live in australia and with the current exchange rate it comes to like $30 with shipping. thats 12.95us because most of the users on here are american.
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 05, 2009, 09:03:58 AM
ok thanks gearmotion ;D ill try to fit it in somewhere today.
EDIT: nope didnt work :( i guess i might spend the $30 on the parallel one from sparkfun :-\

You are using a parallel port on the motherboard, right? NOT USB?

Another thing to try is to look at the settings in your PC BIOS and set the parallel port to be "standard", not ECP.

Oh, and third - new OSes like Vista might be a problem. I forgot to warn about that.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 05, 2009, 01:46:24 PM
im running xp, its a port in the back of my pc that this connector fits into snugly and how do i check my bios settings?
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on April 05, 2009, 02:03:26 PM
im running xp, its a port in the back of my pc that this connector fits into snugly and how do i check my bios settings?


When you power up your PC from being off, you have an opportunity to get into your bios setup. They are all different, but often you press the F2 key when you get the first visual text on your screen (before XP loads) to get into setup. Usually there is a selection in setup for on-board peripherals and a parallel port selection that allows for "standard" port. Wish I could be more exact, but it is all different for different PCs.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 05, 2009, 02:08:26 PM
well thanks for that! ill try it soon
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on April 05, 2009, 02:28:14 PM
ok, so it was set to bi-directional so i changed it to normal. i will try it when i get home today.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on November 05, 2009, 02:17:53 AM
So, for a small update on my programmer situation...
I went to finish soldering the programmer today only to find out my soldering iron is dead.
Therefore i came up with the idea to solder using my gas stove, holding the iron tip with pliers... 3 hours later...

Anyhoo... The circuit gearmotion posted does indeed work well with ponyprong... Thank god!
Title: Re: home made parallel port programmer wiring
Post by: Joker94 on November 05, 2009, 04:59:27 AM
I went to finish soldering the programmer today only to find out my soldering iron is dead.
Therefore i came up with the idea to solder using my gas stove, holding the iron tip with pliers... 3 hours later...

A very innovative idea in the circumstances.

I teel you what, i got a small butane torch from bunnings for 9.50 and i tell you what it is a very handy little thing and i think it is worth having one in your work shop. The flame is only small but it is all i need. the butane is cheaper from Dick smiths. It would have worked like your kitchen stove but i think it would have been much easier.

I'll post a pic if you want.

It may be that you already have a butane torch.Or something similar.
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on November 05, 2009, 05:11:41 AM
Nah, im picking up another soldering iron tomorrow...
If i ever find myself in that situation again... I think ill just use the schools soldering stations... ;D

About the butane torch, are they like the jet fuel lighters? I'm scared of those things after i got a bad burn from
a brazing iron at my school about two weeks ago :-\
Title: Re: home made parallel port programmer wiring
Post by: GearMotion on November 05, 2009, 02:26:34 PM
Anyhoo... The circuit gearmotion posted does indeed work well with ponyprong... Thank god!

Woot! Good!
Title: Re: home made parallel port programmer wiring
Post by: SmAsH on November 05, 2009, 03:08:14 PM
Yeah, although the results were good... I think im gonna get the usb programmer ;D
Its just too much trouble pulling out my whole pc tray to get to the parallel port :-\
Title: Re: home made parallel port programmer wiring
Post by: Joker94 on November 06, 2009, 03:33:54 AM
it is similar to braizing torch but much smaller, i'll post a pic tomorrow.