A simple AVR programmer using FTDI USB-serial module?

Last post
28 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would it be possible to build a simple programmer based around this USB-Serial module?

http://www.ftdichip.com/Products/EvaluationKits/UM232R.htm

I need to program an ATtiny chip for a project I'm working on and was wondering if this might work for that purpose.

If so, what would I need to consider in order to connect the two?

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes you may search for `avrusb500` programmer in google.

it's a project on tuxgraphics.

The most(est) best(erest) thing with this programmer is that solves the chicken-egg issue, it programs the atmega8 (programmer mcu) through usb so you don't need a programmer actually in the first place.

and most(erest) best(erest) does not use the linked converter but tha FT232BL or BM tranceiver making it cheeper to assembly.

and most(erest) best(erest) is self powered from usb

i built one and fried my ft232bl smd before testing it but it probably works, my linux kernel loaded the usb2serial module when connected it

also is stk500v2 compatible and supported by avrdude and all the standard programmers. the cost for me to build it was 3 (pcb) + 5 (ft232bl) + 3 (atmega8) + 2 (all the rest) = 13 euro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try http://www.matwei.de/doku.php?id=en:electronics:usbisp

I've built it myself, and it works great.

-- Thilo

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks so much, everyone. Nice to have multiple options to examine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Grab a Butterfly, and whack ButtLoad on it. Works great through the USB-RS232 FDTI bridge - Nard even made a complete package on his website here which you can use to customize it to show up as a "ButtLoad AVR Programmer" when plugged in. Since the Butterfly has its own Bootloader as well, there's no chicken-and-egg problem, or much wiring (none, if programming 3V parts) to do.

Butterflies are just getting back into stock, US$20 each.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This USB programmer is 28$
That includes delivery.
I'm not familiar with it
it's just the cheapest one
that a google search turned up.

http://stores.ebay.com/ekitszone

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gwen wrote:
This USB programmer is 28$
That includes delivery.
I'm not familiar with it
it's just the cheapest one
that a google search turned up.

http://stores.ebay.com/ekitszone

Loks like a Mega8/48/88 to me , and it even has a 12Mhz Xtal on
it ... (Thats what is required for making USB on a Mega)

More info here
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42628

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gwen style USB programmer - USBasp
http://www.fischl.de/usbasp/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Gwen style USB programmer

Yup, I like the looks of that :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys..
The problem with this usb programmers are the speed. I made a programmer with FT232BM using ponyprog and it works but it is too slow. So i still keep with my serial programmer.

What about others USB programmer, how they are, fast? Like the ICprog-AVR2.0, is it fast?

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The USB programmers are only slow if you don't have any "intelligence" built in to them. If you're just using a USB-RS232 converter chip with ponyprog to bit-bang out the ISP signals, you incur a HUGE penalty as each packet (pin twiddle) has the overhead of the USB bus.

USB programmers that include a microcontroller (AVRISP-MKII, BL-USB, the ones listed above) are able to receive large packets from the host containing a lot of programming information, then send that very quickly to the target. Unlike the bit-bang dongle above, these can program in speeds up to 2MHz and beyond.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i assume (and be able to tell in about two weeks) that the avrusb500 since is stk500v2 compatible it should be fast

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the USB500 is one of the "smart" programmers. I'm not sure of its maximum speed, but it should be at least 1MHz.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean i´m here to learn and to talk about the problens that we have. How you sad i didn´t put any "inteligence" in my programmer, was because i DIDN´T KNOW about this problem.

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I didn't mean YOU were silly/stupid in the construction of your programmer, I meant the programmer itself is not of the "intelligent" variety. It's a mis-communication.

"Dumb" programmers are simple dongles. They act as a bridge between an interface (serial, parallel or USB-Serial in your case) and all they do is level convert the interface's signals into what the AVR can understand. There is no processing of the information, thus they are of the "dumb" variety. All the intelligence is contained in software inside the computer, which simulates the SPI protocol through the dongle's interface.

"Dumb" dongles are slower as you have noticed and less useful than their smarter cousins. The USB bus is designed for transfers of large packets to connected devices, but in your dongle the computer has to "twiddle" each of the USB-RS232 converter IC's pins manually. This requires individual packets to be sent for each pin manipulation, which with the overhead of the USB bus is VERY slow.

"Intelligent" programmers contain a microcontroller internally. They act as a smart bridge between the computer's interface and the ISP system of the connected AVR. Instead of the computer simulating SPI through its interface, it sends large blocks of commands ("Program the connected AVR with the following data: 0xFF 0xA3 0x12...") to the programmer. This "intelligent" programmer then interprets these commands and sends the right ISP data to the target.

Because each transmission consists of large blocks of data instead of many, many individual packets of one byte each, these programmers are MUCH faster and less error prone (as error correction algorithms are built into the PC->Programmer protocol).

Sorry for the confusion.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok Dean, no problem about the confusion.

Dean could you advise an USB programmer to buy, a fast one?
Did you already try ICprog-AVR2.0?

Thanks, and sorry again for the confusion.

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have several realistic options for "smart" programmers:

1) Butterfly ($20) + ButtLoad (free!) + Misc Parts (~$10)
2) AVRISP-MKII ($30)
3) Dragon ($50)
4) STK500 ($90)

Buttload works as well as the AVRISP-MKII, but works out to be about the same cost and requires some assembly. As a pro it allows for code storage and remote programming, but you probably don't really need that.

The AVRISP-MKII is the official ISP programmer for AVRs. It's cheap, pretty hard to destroy and works on all targets. If you want a bare bones programmer, go for this one.

The Dragon is $50, but is VERY useful - VERY VERY VERY. Not only can it program all AVRs via ISP, but you can also program via Parallel programming too. If you use AVRs than have 32KB or less flash memory, the Dragon allows you to program/debug via dW and JTAG - allowing you to debug your code while it runs in the real hardware. If you have the cash, go for this!

The STK500 is the most expensive, but the most versatile. Unlike the Dragon it cannot debug via JTAG or dW natively, however it does have LEDs and buttons on board, as well target sockets for easy programming. Allows for parallel and ISP programming.

The downside to the Dragon at the moment is that it has limited device support - it's a new platform. I'd go for the AVRISP-MKII for now, as it will program most AVRs and is cheap and fast.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Dean.

Is good to have some explanation for one that have experince with those programmers.

I'm looking for a programmer, now i'm looking for AVR Dragon, how you said this is VERY useful.

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to suggest Olimex USB Jtag
http://www.olimex.com/dev/index.html

Costs only $50
http://www.sparkfun.com/commerce/product_info.php?products_id=12

I use it regularly with Mega128. I am quite happy. drop-in replacement of AVR-JTAGICE.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Dragon is currently hampered slightly by a small compatibility list. Currently the only devices supported are:

    MEGA128 MEGA16
    MEGA168
    MEGA169
    MEGA32
    MEGA3250P
    MEGA325P
    MEGA3290P
    MEGA329P
    MEGA48
    MEGA88
    TINY13
    TINY2313
    TINY25
    TINY45
    TINY85

This is slowly getting larger with each AVRStudio service pack. If your devices are supported, then I'd recommend this above all the others. Not that while it will be able to program the MEGA128 like all the others, you cannot use the JTAG or dW debug interfaces on it as it has more than 32KB of flash memory (a limitation of the Dragon). Other than that, you're getting essentially the functionality of a STK500 combined with a JTAG-MKII in one very cheap official platform.

kpsundar: I wouldn't recommend that unless the OP needs to debug the MEGA128 via JTAG. Those clones are based off the JTAK-MKI firmware, which is no longer being maintained. It does not have ISP or Parallel Programming functionality - a must for fixing fuse mistakes, and it costs the same amount as the Dragon. It only supports the following devices (which unlike the Dragon will NOT change in the future):

    CAN128 MEGA128
    MEGA16
    MEGA162
    MEGA169
    MEGA32
    MEGA323
    MEGA64

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Dean. I suppose eventually Dragon can debug Mega128 also.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kpsundar wrote:
Thanks Dean. I suppose eventually Dragon can debug Mega128 also.

No, Atmel have explicitly stated that it won't. The 32KB limitation is actually partly a hardware limitation - the on-board external shared SRAM is of a smaller size than in the JTAG-MKII. I believe this was intentional so that customers needing the larger AVR units would purchase the more expensive JTAG-MKII.

The Dragon is nevertheless EXTREMELY good value for money, and very useful!

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean, you have read my mind ! I wanted to ask if there is any hardware limitation in Dragon in my previous post itself. You post settles everything.

Well, now the choice is very clear !!
Thanks a lot.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A final clarification - the limitation affects DEBUGGING (dW and JTAG) only. ISP and parallel programming methods work just fine on large flash micros when they are supported.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean,

Can you give additional information about how you setup a Butterfly with USB for programming? Do you have doc or link?

Jeff

Jeff Dombach, JLD Systems
"We do the stuff behind the buttons!"
Your source for embedded solutions with a 100% Guarantee.
http://www.jldsystems.com
Phone 717.892.1100

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, you could hack an STK500, remove the RS232 converter and stick an FTDI USB --> TTL converter on the board.

Or, you could simply buy an ATAVRISP-MK2 for $40.00 and save yourself a lot of headache.

Carl W. Livingston, KC5OTL
microcarl@roadrunner.com

"There are only two ways to sleep well at night... be ignorant or be prepared."

The original Dragon Slayer !

Long live the AVR!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jeff,

If you want to use ButtLoad on your Butterfly to program other boards, then just load it in via the bootloader and add in the optional circuitry.

As for converting it to USB, Nard made a complete package here with instructions, schematics, the works.

Above package will be included with the (final) ButtLoad V2.1 when it's done. I've had some major trouble chasing up a bug for the last few months, so that might be a while away. I've lost my enthusiasm due to all the wasted time but I hope to go back to it, fix it and release soon so I can choose a new project.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!