Society of Robots - Robot Forum
Electronics => Electronics => Topic started 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
-
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.
-
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.
-
gearmotion, does yours work?
-
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.
-
is a real parellel port one in the back of your pc?
-
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.
-
ok thanks gearmotion!
-
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.
-
Might be best to just duplicate this: http://www.lancos.com/prog.html#avrisp (http://www.lancos.com/prog.html#avrisp)
-
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?
-
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.
-
yep, i had a bag of 330ohm left over from my $50 boards.
-
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.
-
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 :)
-
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.
-
SmAsH:
Take a look here at a quick blog I put together:
http://circuitgizmos.com/wordpress/?p=272 (http://circuitgizmos.com/wordpress/?p=272)
-
wow thanks man, thats a really easy and clear blog to understand! ;D
-
wow thanks man, thats a really easy and clear blog to understand! ;D
So have you had success with programming?
-
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
-
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.
-
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?
-
Not likely.
-
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 :-\
-
$30? i thought people were saying its like 12.95?
-
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.
-
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.
-
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?
-
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.
-
well thanks for that! ill try it soon
-
ok, so it was set to bi-directional so i changed it to normal. i will try it when i get home today.
-
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!
-
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.
-
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 :-\
-
Anyhoo... The circuit gearmotion posted does indeed work well with ponyprong... Thank god!
Woot! Good!
-
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 :-\
-
it is similar to braizing torch but much smaller, i'll post a pic tomorrow.