Microchip’s USB parts
Need an MCU with on-board USB controller? Microchip has upped the ante by lowering the cost and form factor.
I didn’t have enough time to see much of the ESC show floor in Boston last month, being tied up in talks and meetings. ST was giving out their STM32 F3 evaluation board (based on the ARM Cortex M3), which includes a MEMS gryo and compass. I’m dying to give this a whirl and will report on it later.
It seemed that most of the semi vendors were promoting Cortex M-series parts. If you’re not familiar with these devices, look into them. They’ve become very important, and offer a nice range of performance. The M0 and M0+ are low-end 32 bitters, while the most powerful of the family, the M4, even includes limited (the four arithmetic functions and sqrt) hardware floating point.
But while vendors touted their 32 bit parts Microchip introduced 15 more additions to their dizzying array of eight-bit PIC parts. Normally it’s hard to get interested in a few more MCUs, but these are a bit different.
All have an USB controller built-in, and all are targeted at applications that need this communications protocol. By itself, on-board USB is hardly unique. But there are a few interesting twists.
For instance, like so many MCUs today these devices can run from a whole smorgasbord of clock sources, including an internal oscillator adjusted at Microchip’s factory. You know how drifty these crystal-free oscillators are.
Here’s the cool part: to achieve the 0.25% accuracy needed by USB communications there’s an Active Clock Tuning (ACT) mode which watches USB transmissions from the host computer to continuously retune the MCU’s oscillator. Essentially they shift the timing burden to the host. That saves some money and PCB real estate, which can be important in the low-end applications that these parts enable.
Though available in a variety of packages running to 100 pins, some of the parts are offered in 14 pin TSSOP pinouts. (They are one of the few companies to continue to sell MCUs in DIP form, and a 14 pin DIP is available). Or, select a 16 lead QFN to shrink your entire processor cum USB to 4 x 4 mm. That opens a host of interesting applications: devices where space rules, where the entire product might live within the USB connector. Or even disposable devices.
The company makes a complete USB stack available for free. It eats about 6 KB of flash.
Of course there are gobs of peripherals and memory configurations depending on the selected part. The datasheet that describes these for the lowest-end variant is a scary 418 pages long.
Who sells the lowest-power microcontroller? Comparisons are tough to make since companies use different metrics, but my take is that Microchip’s XLP (eXtreme Low Power) parts are ahead of the pack. Sucking only 20 nA in sleep mode and 35 uA/MHz when active, the company claims these processors can run for two decades (!) on a single CR2032.
That’s a long time. If the CPU were asleep essentially all of the time the 20 nA it consumes is equivalent to a 150 Megohm resistor at the CR2032’s nominal 3 volts. An article Embedded.com claims that PCBs which are well-cleaned can still exhibit leakages of 10 nA to “nearby” (whatever that means) nodes.
Back in the pre-micro days the place I worked as an electronics technician made an instrument that held a voltage in a cap in an op-amp’s feedback loop. We found that if the cap itself were not cleaned it leaked terribly. And even the type of solvent used to clean the cap and board could worsen leakage by an order of magnitude. So, tying this somewhat anecdotal evidence together, that 10 nA leakage might be 100 nA or so, five times worse than the 20 nA the MCU needs.
The moral: for decades of power on a single battery count on cleaning the board, and probably even the battery, carefully and with the right solvent. (I won’t make any recommendations as there are a lot of laws regulating these today. But consumer-style alcohol won’t do it). Keep the system away from dirt and humidity. It’s hard to imagine a 4 x 4 mm USB solution. But I suspect even more unimaginable applications will result.
Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges. Contact him at firstname.lastname@example.org. His website is www.ganssle.com.