Upload without FTDI...

Hello folks, one curious question: Why the Arduino's boards projects did not use the Digispark ATtiny85 way to do upload programs using USB without any FTDI ?

Other methods were chosen instead.

But that other methods chosen have some aditional hardware and costs such FT232RL IC and few other components. I really did not see any advantages since that interface is used basically to upload & monitor function...

The software USB implementation (as used on the DigiSpark) has some limitations:

  1. It supports low speed USB only.
  2. It is not actually all the conformant with the USB specification; some newer PCs (with USB3 and/or newer USB chipsets) are starting to have problems with the SW USB implementations.)
  3. It's "upload only", and doesn't support communications between the sketch and the PC (ie "Serial.print()" and etc.) Since an early goal of the Arduino project was to add physical computing elements (buttons, knobs, lights) to PC-based art projects, a SW USB implementation would have been unacceptable. (also, Serial.print() and etc are pretty essential for debugging. Given a "real" arduino, you can write code and debug using serial.print(), and then move your code to a digiSpark-like system when it's working. But having only a non-debuggable digispark would be ... painful.)
  4. The very first Arduino used an rs232 serial port, and connected to a hardware serial port on your PC. Moving to a hardware USB/Serial conversion chip allowed the original code (and boards) to continue to work without any additional code requirements for the new boards.
  5. getting SW USB drivers working across multiple hosts (Windows, Mac, Linux) was a lot easier when you could just download drivers from FTDI. Likewise USB membership/licensing issues.

There was at least one Arduino variant (out of India, I think), that used two ATmega8 chips - one for Arduino code, and one (running SW USB) to do the USB communications. I think they were operating under some severe inabilities to get less common chips.

Great explanation westfw. Thanks a lot. Anyway I think would be a good idea to have a kind of script for whom eventually wants to do uploads using a software USB solution, specially for mass production of products. For prototyping and development the hardware solution is perfect. Thanks again.

I think SW USB is an abomination that should die a quick death in the face of cheap microcontrollers that include a hardware USB controller, like the SAMD21 STM32f1xx, and PSoC4. (A SAMD21 chip with HW USB and 64kB of flash has a list price somewhat lower than JUST the ATmega328p used on the Uno.) (I think Leonardo, with the ATmega32u4, was supposed to be a step in this direction, but it doesn't seem to have gained in popularity or lowered in price the way we would have liked.) (Unfortunately, the core Arduino team does not seem very motivated to produced boards with a price point lower than Uno/Leonardo. There are probably very good business reasons for that, too.)

AntonioTesta:
Anyway I think would be a good idea to have a kind of script for whom eventually wants to do uploads using a software USB solution, specially for mass production of products. For prototyping and development the hardware solution is perfect.

If I were doing mass production of products, I would not want to rely on USB for the programming. Far too flakey in my experience.

I would much prefer to use the microcontrollers native built in hardware programming interface.

But if you think a 'script' for doing uploads with soft USB is a good idea, then develop away and let us know how you get on.

Well... maybe I should agree with you guys enthusiastic for hardware solutions... Actually the hardware costs is ridiculous now a days. Therefore I am disapointed do to 32U4 microprocessor did not became a popular one like his brother AtMegaxx8, dispite 32U4 has a native HW USB incorporated...

I bet there would have been more acceptance (at least in the hobbyist/arduino world) if there had been a USB-HW-capable AVR in a DIP package. There are very few chips that support HW USB that aren't in SMT packages :frowning:

I would just use these CH340G
There cheap and they work don't need alot of parts to use them I've used them alot.

"Anyway I think would be a good idea to have a kind of script for whom eventually wants to do uploads using a software USB solution, specially for mass production of products."

Depending on what you intend to be mass produced, chips would be pre-programmed before putting them on boards, and perhaps an interface would be made available to plug on a USB/Serial adapter (not likely if they weren't intended to be user servicable) or access provided to the SPI pins for reprogramming if needed (also not made readily obvious, perhaps just pads that Pogo pins could be pressed against).

The CH340G is not carried by reputable US distributors. Digikey. Mouser. Arrow. Avnet. JameCo. Newark/Farnell. Allied Electronic.

Only source is e-bay. It won't be designed into any of my boards.

Regardless, the CH340g is "just another USB/Serial converter" and not the "single chip solution" we'd like...

On the third hand, the nice thing about an external USB/Serial chip is that you can't make it stop working by writing bad code in your sketch. I suspect that ultimately, that was the downfall of Leonardo. (I've managed to "brick" my Sparkfun SAMD21 board, too. I'll probably be able to recover it eventually, because I've got an Atmel ICE, and a JTAG ICE 3, either of which should be able to fix it. But the default JI3 connector doesn't work for SWD, so my initial attempts didn't work. So it's being a bit of a PITA. A beginner would just be dead-in-the-water and frustrated.)

So it looks like the adafruit trinket Pro is what you originally asked for - an atmega328 CPU connected directly to the USB connector, with USB implemented in sw.
At $10, pretty cheap. About $3 less that the metro mini that is similar but has a separate USB chip.

Yessss... Exactly !!! ... 30% less is not so bad, is not it ? I will buy one to evaluate and see if it upload with no problem and works well at all... Despite the hw costs is not so much significative hopefully someone else is thinking about alternative upload solutions too...