Author Topic: Favorite budget USB MCUs  (Read 20091 times)

0 Members and 1 Guest are viewing this topic.

Offline theatrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Favorite budget USB MCUs
« on: May 27, 2014, 02:12:58 am »
I'm looking for simple (small flash, low pin, low performance) USB capable MCUs, with a good software stack for HID or VCP applications (basic control stuff).

In the past I've ended up with both ATmega8Us and the LPC1343, but feel I'm missing some other contenders. I personally haven't dabbled in PICs, and haven't really explored the rest of the CM3 space (sadly, every vendor has a different USB stack of wildly differing quality). What gems am I missing?
Software by day, hardware by night; blueAcro.com
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Favorite budget USB MCUs
« Reply #1 on: May 27, 2014, 03:58:26 am »
Get the MSP430F5529 Launchpad. The F5529 has USB including a built-in bootloader, and is a relatively simple processor. No low pin count versions, but there are physically small packages.

http://www.ti.com/tool/msp-exp430f5529lp
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Favorite budget USB MCUs
« Reply #2 on: May 28, 2014, 05:24:45 am »
ATxmegas. LUFA (http://www.fourwalledcubicle.com/LUFA.php) supports ATxmegas and it just is one of the best frameworks I've ever seen. Pleasure to use and very professionally made. You can implement pretty much any possible USB profile with it.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26757
  • Country: nl
    • NCT Developments
Re: Favorite budget USB MCUs
« Reply #3 on: May 28, 2014, 10:18:40 am »
NXP also provides LUFA for their ARM controllers. They gave it a different name but it is LUFA.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nl
Re: Favorite budget USB MCUs
« Reply #4 on: May 28, 2014, 10:40:28 am »
If you're not into PICs then, let me name a few for you:

PIC16F1454 / 55; 14-pin device with 1k RAM and 8Kword flash or so. 54 has no A/D, 55 has a 10-bit one. It has 1 UART and 1 "MSSP" (I2C or SPI). Available for ~1 euro.. ridiculously cheap&small.
PIC16F1457; 20-pin edition
PIC18F25k50; 28-pin chip, 2k RAM, 16kword flash, 1UART/SPI/I2C
PIC18F26J50; 28-pin chip, 3.8K RAM, 32kword flash, 2UART/SPI/etc.
PIC24FJ64GB002; 28-pin 16-bit chip; 16 MIPS; 8K RAM, 64KB flash, remappable I/O, 2SPI/I2C/UARTs
PIC32MX250F128B; 28-pin 32-bit chip; 40/50MIPS; 32kB RAM; 128kB FLASH; similar I/O to PIC24 but not as flexible.

Note all these chips (maybe not the PIC32?) have internal oscillators accurate enough for at least low speed USB. I think it may vary, but maybe high-speed works as well (as the oscillators are often 12MHz +/- 0.25% or so)

One (big)downside; I doubt the quality of Microchips USB stack code. And their trouble with open source software (if that matters; but you can't re-distribute their stack under your project source download) is in general a PITA.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #5 on: May 28, 2014, 11:24:30 am »
Rumor has it that certain non-USB STM8/32 chips are identical to their USB-capable counterparts.
================================
https://dannyelectronics.wordpress.com/
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Favorite budget USB MCUs
« Reply #6 on: May 28, 2014, 12:48:24 pm »
Anything with a soft-USB firmware. I don't think there's widely available 6/8-pin devices with hardware USB.
 

Offline Zeta

  • Contributor
  • Posts: 49
Re: Favorite budget USB MCUs
« Reply #7 on: May 28, 2014, 03:06:59 pm »
A bit old. But I've always used the JS16 from freescale. there is a version that comes with usb bootloader in room and small packages. Great usb library
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #8 on: May 28, 2014, 04:24:09 pm »
Quote
ATxmegas

I would be cautious investing into that family of chips. I don't think they have much staying power.
================================
https://dannyelectronics.wordpress.com/
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Favorite budget USB MCUs
« Reply #9 on: May 29, 2014, 11:08:22 am »
I would be cautious investing into that family of chips. I don't think they have much staying power.

Why would you say that? Atmel is the 3rd largest MCU manufacturer in the world and the XMEGA line is their primary 8 bit platform. They have been going from strength to strength with new models being released regularly. At work we have been given 10 year availability guarantees, with compatible replacements for at least 15 years. What a bizarre thing to say.

Yeah. I recommend the atxmegas mainly cause they just are so super nice to use. The event system is very nice, the datasheets are very consistent and concise. Just overall almost flawless little microcontrollers (and I wouldn't say that lightly about anything!).

All ARMs I've used seem to be much more inconsistent, ports have weird amount of pins (PB3 and PB9 here, PA1, 4 and 6 over here and PA3 somewhere totally elsewhere etc.) and have crappier datasheets. Just my experience.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #10 on: May 29, 2014, 11:14:22 am »
Quote
I recommend the atxmegas mainly cause they just are so super nice to use.

I would be surprised if there is any future for those chips (put in their AVR32 - the homebrew version, and PIC32. The jury is still out on STM8). I think those chips are introduced to delay the inevitable - that AVR users will migrate to 32-bit chips.

There is simply no compelling reason to use those chips.
================================
https://dannyelectronics.wordpress.com/
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Favorite budget USB MCUs
« Reply #11 on: May 29, 2014, 04:04:11 pm »
Quote
I recommend the atxmegas mainly cause they just are so super nice to use.

I would be surprised if there is any future for those chips (put in their AVR32 - the homebrew version, and PIC32. The jury is still out on STM8). I think those chips are introduced to delay the inevitable - that AVR users will migrate to 32-bit chips.

There is simply no compelling reason to use those chips.

Might very well be. But it's not gonna happen fast. But I would not worry about that unless you're designing for some really long lifetime applications.

Btw. For example Microchip still manufactures each and every one of it microcontrollers it has ever introduced.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #12 on: May 29, 2014, 04:38:26 pm »
Quote
But it's not gonna happen fast.

Probably but I would be surprised if those chips are still in material shipment 5 - 10 years from now.

Quote
Btw. For example Microchip still manufactures each and every one of it microcontrollers it has ever introduced.

For every Microchip that's doing that, you can find 10 Microchips that are no longer in business.
================================
https://dannyelectronics.wordpress.com/
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #13 on: May 29, 2014, 05:03:56 pm »
Yeah. I recommend the atxmegas mainly cause they just are so super nice to use.

They lost a lot of good will over the introduction of those controllers.

For a long time the xmegeas were not available at all, while Atmel was lying through their teeth and marketing them as available and buying themselves awards for those non-existing MCUs. Then the disastrous silicon errors when they were finally available. Accompanied with a new disastrous IDE, a disastrous library, and expensive new programmers required.

Many of the originally announced xmegas never shipped. Leaving people in the cold who trusted Atmel and started development on a smaller xmega or one missing a critical feature, believing they could soon get the right one.

Worst of all, Atmel refused to acknowledge the problems and to talk about them. The xmega disaster was what ultimately drove us away from Atmel. They lost all our trust.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26757
  • Country: nl
    • NCT Developments
Re: Favorite budget USB MCUs
« Reply #14 on: May 29, 2014, 05:14:27 pm »
Btw. For example Microchip still manufactures each and every one of it microcontrollers it has ever introduced.
Look at the prices you pay for vintage chips. Usually brokers stock old parts and sell them for a huge profit but it seems Microchip is doing the stocking themselves. The problem with old chips is that these take older processes/factories to produce. So either the designs must be shrunk so they can be produced in modern factories or they must keep old (obsolete) factories open.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #15 on: May 30, 2014, 12:08:35 pm »
Interesting spin on events.

It is not a spin. The xmegas were announced in February 2008 as immediate available, but you couldn't get one. In the same year Atmel bought themselves some awards for the non-existing MCU, the EDN China Innovation Award and the 2008 Product of the Year Award by Electronic Products Magazine. Mind you, for an MCU no one could get.

In 2009 Atmel showed some eval board, which you couldn't get then. Not for love or money.

In 2010, two years after the immediate available announcement you could occasionally get an engineering sample.  Around 2011, maybe late 2010 you could buy the dreadful rev G silicon and a little bit later the still very much broken rev H silicon.

In the meantime announced xmegas just silently disappeared. E.g. the A1 family was announced containing not only the 128A1 and 64A1, but also 192A1, 256A1 and 384A1. So in theory you could start with the 128A1 and later on in your project do some rightsizing. In practice the 64A1 appeared very late, and the others never materialized. The D4 (or was it D3?) series had a similar faith.

People were not just confused about the ADC or other new periphery. The errata, after Atmel finally came clean, listed some really horrible things. The ADC broken, the DAC broken (just something like 200 LSB off in some mode ...), the BOD self-enabling and locking you out of the chip in some cases, I2C timing broken, part of the clock system broken. And a few nastinesses that never made it into the errata, but were present. Like Atmel couldn't be bothered to perform the specified factory calibration. 

A lot of what made these new MCUs interesting was broken. And that after people waited more than two years to finally get some. Oh, also famous on some series was the error that you couldn't write to the EEPROM without completely holding the MCU clock.

And that joke of a library was indeed called ASF. You could spend a lot of time debugging the library. It was as if the ones writing the library had no access to the real silicon and never tested their code. But Atmel was pushing the library very hard. And you could only use it with Atmel's horror IDE. The IDE that refused to install, refused to start, refused to properly communicate with its own debugging backend and refused to work with Atmel's very own programmers. Not to mention that Atmel promised a cross-platform development environment and instead delivered a Windows-only PoS. 

The xmegas were shitty to work with, and for a long time Atmel denied there were problems. It was Atmel's behavior that finally broke the camel's back. Just too many broken promises.

I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Favorite budget USB MCUs
« Reply #16 on: May 30, 2014, 07:26:35 pm »
All ARMs I've used seem to be much more inconsistent, ports have weird amount of pins (PB3 and PB9 here, PA1, 4 and 6 over here and PA3 somewhere totally elsewhere etc.)

I've noticed that too.  Is there a reason for it?  Seems like it would make routing parallel buses an ugly PITA.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Favorite budget USB MCUs
« Reply #17 on: May 30, 2014, 07:33:44 pm »
Quote
Is there a reason for it?

"ARM chip" is a misnomer in that it doesn't exist as a chip. Instead, it is a standard core (provided by ARM) married to peripherals provided by chip vendors (NXP / ST / TI ...).

So while there is 100% standardization on the instructions, there is zero standardization on the peripherals and how they work.

Thus, books like "the definitive guide to arm" have very limited value for people who program those chips. It is the datasheets that matter.
================================
https://dannyelectronics.wordpress.com/
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Favorite budget USB MCUs
« Reply #18 on: May 30, 2014, 08:46:56 pm »
I'm not quite sure what you're getting at.  Neither I nor Dago referred to ARM as "a chip".  My question was why certain implementations (or in Dago's case, all he's used) seem to have the consecutive port pins spread all willy-nilly across the package.  Is there method to the madness?  Are silicon designers just masochists, or particularly hate PCB designers and want to make them cry?  Maybe this isn't even universally true.  I don't know, I haven't looked at all that many ARM(-based) MCUs.  But on the ones I have looked at, it was a rather crazy pin order.  Ironically, many of the other peripherals are physically clustered together.  (Though certainly not all.)

As to the book, I get your position there, although I kinda feel like it's akin to saying "all PCs are Intel or AMD chips wrapped in custom motherboards with various peripherals, so why bother reading about the x86?"  I figure the material's relevance strongly coincides with what you do and how you do it.

In terms of the ARM core in particular, I noticed that many in the M-series lack a division instruction.  While I did happen upon that factoid in a datasheet, I'm sure there are hundreds of similar useful little tidbits in a book focused on the generic core architecture.  Does it matter to a C programmer?  Maybe.  I'm sure the compiler will take my "x = y / z;" statement and Do The Right Thing, but if I know in advance that it's a soft implementation, I might be more careful to avoid division in my algorithms where I can.  So it's still potentially quite useful to know.

Just my 2c.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26757
  • Country: nl
    • NCT Developments
Re: Favorite budget USB MCUs
« Reply #19 on: May 30, 2014, 09:26:06 pm »
Why is the pin order important? Usually the pins are grouped by peripheral so you have related pins close to eachother. Needing a parallel bus is really uncommon nowadays. If you really want an ARM with the port pins in sequential order look at the LPC1200 series from NXP.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Favorite budget USB MCUs
« Reply #20 on: May 30, 2014, 09:50:45 pm »
Don't need it, just curious.

The times I've used a parallel bus in the past were to interface to (e.g.) a WizNet Ethernet controller (although there are plenty of micros with built-in Ethernet), to interface with external memory (can use dedicated memory interfaces instead), or to control clusters of devices (LEDs, etc.) in physical order without having to do PCB gymnastics or waste cycles shifting data around first (I suppose you could just use a shift register instead).

It's not a deal-breaker or anything, but if you're a manufacturer laying out a die, what's the point of moving those port pins all over the place?  Is there a reason you can't have ports in consecutive order, and their alternate peripheral functions also aligned thusly?  Is there something inherent to the core, or some other tangible benefit, that makes it desirable?  Maybe it's just an opportunity to play Where's Waldo with P0.7?
 

Offline nicknml

  • Contributor
  • Posts: 10
Re: Favorite budget USB MCUs
« Reply #21 on: May 31, 2014, 02:24:53 am »
Very easy to breadboard and cheap.
http://www.ti.com/tool/msp-exp430g2


I also like the good old ATmega328 as you can sink/source a considerable amount of current on the i/o pins compared with a lot of the newer mcu's.

I would love to see TI  make a DIP version of the MSP430F5529.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: Favorite budget USB MCUs
« Reply #22 on: May 31, 2014, 03:20:46 am »
Quote
Very easy to breadboard and cheap.
But NOT "usb"; let's please stay on-topic, because once you branch out into "what's your favorite microprocessor" you never get anywhere.

XMEGA-wise, You can count me as one of the disappointed.   I don't think the smaller A-series chips (ATxmega64a4, for example) ever showed up for real.  (they didn't have USB either, so they're also off-topic.  The USB versions of the same chip were somewhat heralded as the first xMegas that were fully usable, IIRC, and people interested in a 64a4 were encouraged to just move on the 64a4u.)
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Favorite budget USB MCUs
« Reply #23 on: May 31, 2014, 06:05:52 am »
Why is the pin order important? Usually the pins are grouped by peripheral so you have related pins close to eachother. Needing a parallel bus is really uncommon nowadays. If you really want an ARM with the port pins in sequential order look at the LPC1200 series from NXP.

It's not essential of course but sometimes you do need to make a parallel bus or have other uses where you'd like to have a bunch of pins next to each other on the same port.

It also makes layout cleaner, makes using the part much simpler (you do not have to check the datasheet every single time you lay a pin since you know there's no missing pins like in atxmegas). Also makes code simpler.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Favorite budget USB MCUs
« Reply #24 on: May 31, 2014, 08:44:23 am »
Why would you use an XMega when you can have an STM32F10x or STM32F30x for essentially the same money? You can get a 32bit chip with a lot more power and hardware than 8bit XMega. Furthermore, you don't need to depend on Atmel-proprietary debuggers and programmers, any SWD or JTAG adaptor works with the ST chips.

Someone mentioned "free compiler and IDE" - well, GCC works with every ARM in existence and Eclipse is just fine for an IDE, thank you very much. A lot of functionality works even better than in the Visual Studio (e.g. the Intellisense crap).

I have always been an Atmel guy, but it makes little economical sense to use XMegas for me.

E.g. (Digikey prices, only stocked parts):
Cheapest USB-enabled XMega:
ATXMEGA16A4U-AUR (16kB Flash, TQFP44) $3.62

Cheapest STM32F10x:
STM32F102R4T6A (16kB Flash, LQFP64) $4.41

RadioSpares here in France:
ATXMEGA192C3-AU (32MHz,192o Flash,TQFP64 - that's the cheapest USB-enabled they have here) 3,81€
STM32F102C4T6A (16kB Flash, QFP48) 2.56€
STM32F102CBT6 (128kB Flash, QFP48) 4,11€

If you want to go even cheaper, then Microchip has the new 18F14k50 PICs, those cost like 2€ each in singles, but programming USB on them is a bit more tricky - both because of the architecture, small amount of RAM and the Microchip's compiler woes (well documented elsewhere on this forum) :(


« Last Edit: May 31, 2014, 09:02:02 am by janoc »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf