Connect with us

building an AVR programmer CABLE

Discussion in 'Electronic Basics' started by [email protected], Jul 3, 2007.

Scroll to continue with content
  1. Guest

    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:

    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.


  2. linnix

    linnix Guest

    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.

  3. Guest

    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...

  4. linnix

    linnix Guest

    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
  5. That cap is even recommended very strongly in the AVR datasheets, to prevent
    any accidental resets due to EMC issues.

  6. Jasen Betts

    Jasen Betts Guest

    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!

  7. 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
    (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.
  8. Guest

    Did you mean this one?

    (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...

    Have to buy more solder...

    Thanks all,

  9. mc

    mc Guest

    Just last night I was proud of finishing my cable... even found a 5-
    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? :)
  10. Guest

    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

  11. mc

    mc Guest

    There's no lead in the fumes. The solder is barely hot enough to melt
    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 :)
  12. Tom Lucas

    Tom Lucas Guest

    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

    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
  13. 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.

  14. Tom Lucas

    Tom Lucas Guest

    Or the fact that many older lead parts will never get sold and end up in
    landfills rather than used in products which won't get thrown away.
  15. Prezactly!

  16. As far as the parts go, that price has to be paid at some point or
    else, if no price is to be ever paid, there never will be any change
    at all. So I suppose that's just a barrier to climb over and not look
    back on -- or else do nothing.

    I don't know about the higher temperatures used and the associated
    aggregate energy costs over time... but frankly I consider many
    electronics products to be of "very high utility value," which makes
    their energy use well worth the environmental costs.

    For example, acute respiratory infections (ARI) kill more than 2
    million children every year. It's the larger cause of child mortality
    and kills more than HIV/AIDS plus malaria plus measles, combined. It
    can become pneumonia and studies show that timely treatment reduce
    those mortalities by about half. Pulse oximeters actually help reduce
    mis-diagnoses by a large factor (I think I've read somewhere, by a
    factor of 8 or something similarly fantastic from my point of view)
    and have helped us achieve a successful diagnosis rate, where pulse
    oximeters are applied, of about 99% in these pneumonic ARI cases.

    Frankly, any energy cost we pay for a pulse-ox in the right place and
    time is probably worth it.

    Of course, that's not all we do with electronics. They also save
    lives in industrial situations (for example, recognizing early when a
    saw mill's motor driving a saw blade may be nearer to a destructive
    wear out event.) Or they may simply help reduce energy costs in
    otherwise seriously wasteful situations (glass, aluminum, and steel
    mills, for example.) But that is some of it. Perhaps those kinds of
    benefits make RoHS energy costs pale, in comparison. Just a thought.

  17. mc

    mc Guest

    Or even recognizing when the blade is cutting material with the wrong
    elasticity, which might be a finger or an arm rather than a block of wood!
    At least, I've heard of this being done.
  18. Nice idea in principle, but it has a major flaw. There's no such thing
    as a product that won't get thrown away. It'll just get thrown away a
    bit later.
  19. CBFalconer

    CBFalconer Guest

    Some actually get recycled :)
  20. Guest

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day