building an AVR programmer CABLE

I'm trying to build a parallel port AVR programmer cable.

Surprisingly, this is turning out to be the most complex part of programming my ATTiny13. (I already know I'm going to use WINAVR and AVRDUDE; the tough part for me is building the cable.)

I'm planning on building this:

formatting link

I bought a male DB25 from Radio Shack (a part I forgot to order from Mouser... but no way I'm paying an extra $6 for shipping just for a DB25!), and am planning on using parallel pins 1, 2, 11, 16, and 18.

I was planning on using a Cat5 cable for the wiring, and using the solid colors only: green, blue, orange, brown, and using the white striped wires for shielding to minimize crosstalk.

But wait... I need 5 wires. Cat5 (with shielding) only gives me 4.

So, I've got a few options:

1) completely strip the Cat5 wire, and run 5 wires parallel (ugly) to minimize crosstalk; 2) use one of the white striped wires for ground.

I'm leaning towards (2), but I'm trying to figure out what I can pair it up with.

What is the function of the RESET pin when programming an AVR? Does it pulse, or is it steady...? I'm guessing SCK, MOSI and MISO will be pulsing like crazy, and might introduce crosstalk...

Or am I worrying too much?

Advice requested.

Thanks,

Michael

Reply to
mrdarrett
Loading thread data ...

you can use the 'white' white for grounding AND shielding at the same time:

reset, clock mosi,miso to solid colours ground to all the four white wires

keep the wire[s] short

Reply to
mmm

RESET while programming is set to 0. In case of an error, RESET must be set to 1 for some CPU cycles and then the sequence of programming can continue, after re-enabling the serial programming. For more details take a look at the datasheet (it is for ATmega 16 but the programming method is the same, I think)

formatting link

Reply to
GM

You are! Just use ordinary stranded wire, it works for me with the similar SP12 programmer. Keep them short, of course.

Leon

Reply to
Leon

Ok, thanks, folks! Just wanted to make sure.

While I've got you guys on the line... what's the function of the 10k resistor between RESET and Vcc?

Michael

Reply to
mrdarrett

This is a pull-up resistor. It ensures you have a HIGH at your /RESET pin, when there is no signal from the programming socket

Reply to
GM

Ok, thanks everyone.

Reply to
mrdarrett

You might also want a small cap to bring up the reset line slowly.

Hey, you are stealing my ideas, part of it anyway.

I use USB to RJ-45 to pin headers for ISP and Jtag. I've done it for AT90USB162, AT90USB1287, ATmega169 and ATmega649. They works fine.

See:

formatting link

Reply to
linnix

Stealing your ideas, huh? I was just trying to find some way of getting 5 wires into my programmer... got a garage full of junk; used some old Cat5 wire that I'm not using anymore (and I discovered why I'm not using it anymore, too: it's stranded wire, not solid copper wire... yuck. Gotta solder it...)

It's my first uC project... once I get my blinky working, hoping to make it generate two square waves for me...

Michael

Reply to
mrdarrett

Just kiding, but RJ-45 cat5/6 are great for quick connect/disconnect setups, as long as you don't plug them in the ethernet jacks.

My cat5/6 wires are soild. If you are running long wires, make sure they are surge protected. I toasted many micros, some on very long wires.

Reply to
linnix

That cap is even recommended very strongly in the AVR datasheets, to prevent any accidental resets due to EMC issues.

Meindert

Reply to
Meindert Sprang

only three of them carry high speed data

the Atmel STK200 parallel programmer (which has a chip in it to do level conversion) works fine with a 3m ribbon cable. don't worry, the data rate is relatively low (10KbPS maybe) and pretty much any wire will do.

It's mostly steady.

SCK sees the most pulses, MOSI and MISO see almost as many, you'll find timing diagrams in the back of the data sheet.

way too much!

Bye. Jasen

Reply to
Jasen Betts

If your goal is to program AVRs, rather than to build a cable, you might want to check out an $18 USB programmer kit which got good reviews:

(I don't have any direct experience with this, I just came across it in my browsing.)

Of course, you're learning a lot more building your own, so if that's your goal, have fun.

--
David M. Palmer  dmpalmer@email.com (formerly @clark.net, @ematic.com)
Reply to
David M. Palmer

Did you mean this one?

formatting link

(The link you gave me was dead - at least when I tried it.)

Yep, learning as I go. Otherwise I'd just buy everything... then what's the point...? ;-)

Just last night I was proud of finishing my cable... even found a 5- pin header from an unused motherboard plug that I could plug into my breadboard, and soldered everything (while the kids were asleep - so they wouldn't breathe in the lead fumes).

Then I realized I switched the pinouts for my male DB25 plug... AAAHHH!!!

formatting link

Have to buy more solder...

Thanks all,

Michael

Reply to
mrdarrett

There's no lead in the fumes. The solder is barely hot enough to melt and nowhere near hot enough to vaporize.

Admittedly, the burnt rosin flux can be irritating.

But don't your children breathe almost as much air when asleep as when awake? :)

Reply to
mc

Ah, no lead? When I was a kid I thought solder was 70% lead. And this piece was from my dad's shop, probably a few years (decades?) old... I only had a few inches of solder.

I just came back from Wal-Mart and bought a new roll of solder; about $4.50 for 5 oz, 95% tin, 5% antimony. Wow... expensive.

Kids were in the bedroom, silly... I was soldering on the dining room table.

Michael

Reply to
mrdarrett

... snip ...

Back then, it was.

--
 
 
 Click to see the full signature
Reply to
CBFalconer

Solder is still commonly 63% lead. But the lead does not vaporize at soldering temperatures.

Yes; that is the new kind, harder to work with; be sure to get it hot enough. I still use leaded solder as much as I can because it works better.

I figured as much but couldn't resist giving you a hard time :)

Reply to
mc

With the Reduction of Hazardous Substances directive in Europe then pretty much all our solder has gone to the lead free kind. It is more expensive and harder to work with but at least we're not killing dolphins - or whatever it is that lead does.

Fortunately, the equipment we produce is instrumentation and thus exempt from the directive but I expect the goal-posts to move later next year to encompass our field so we've moved to RoHS compliance in preperation for that.

However, during development then I do tend toward leaded solder if it looks like I might have to remove a part again later. I find that soldering with the lead free stuff is fine (with a good hot iron) but desoldering is a real pain - the leaded stuff comes up so much more easily.

That's dangerous too. When I was little my dad once managed to singe the dining room table soldering and my even now my mother still him about it whenever he gets his iron out. And they've had three dining tables since!

Reply to
Tom Lucas

I sometimes wonder if whatever we save by implementing RoHS is not undone by the fact that we now have to solder at higher temperatures and therefore consume more energy.

Meindert

Reply to
Meindert Sprang

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.