📜 ⬆️ ⬇️

A fresh look at microcontrollers

This short post may slightly remind a certain market research on the theoretical note " Are microcontrollers outdated? ".


On the study of microcontrollers and ready-made boards pushed one of the small crafts, on which I am currently working. In particular, a rather compact controller with 20 I / Os is required, and allowing it to act as a slave USB device. First glance fell on the Teensy , rather compact, on the Atmega32U4 chip. I was confused only by the price, $ 24 for the device with the wired legs, plus shipping. Just a little less than half the price I paid, ordered in April and only Raspberry model B came in today (hooray!).
Prices for Arduino, Propeller also unpleasantly surprised.
Actually, the thought came to just put the chip itself on the PCB and not bother with a separate controller, but the Atmega32U is not cheap, about 4 euros per piece (32U2) 5.5 euros for 32U4, and the prices for them do not decrease, but, on the contrary, grow.

With the AVRs of the USB series (90USB, 8U. 16U. 32U), it’s even embarrassing that those trial firmware that I did in the examples took about 18KB, mostly occupied by the USB operation code (LUFA / some homegrown from Teensy ), and flash memory in half of these devices is already smaller. What is there with the consumption of RAM, generally hard to say, is there enough 1KB? Without any experience of optimizing the C code, I didn’t feel like climbing into these wilds.
')


And then suddenly I stumbled upon the announcement of a new line of XMC4000 processors based on the ARM M4F from Infineon with a projected price of $ 1.5 to $ 4, very impressive (relative to AVR) characteristics, like 120 MHz, 1 MB of flash memory and 160 KB of operational. MSP430 was a bit nervous.
And in the same place, on the page advertising the processors, there was such an amazing thing as a starter kit based on the older (XMC4500) of these processors, but for only 10 euros, including many charms such as USB, SPI, 3 x I2C, 3 x I2S, 3 x UART, 2 x CAN, 17 x 12 bits of the A / D converter, 2 x D / A converters, 31 x PWM. Much more than I need. On top of that, there are as many as two chips on the board, one of which can be used for debugging mode via the second USB port, or you can literally break it off from the board and use it in some other way. The inputs and outputs, of course, are less than the Arduino Mega, and the price is 4 times lower than the Arduino Due. For connoisseurs, there is an option with a wired Ethernet, a latch for SD cards and 4MB flash memory, but already more expensive, for 30 euros.

It turned out that the miracle device is not lonely, and then the board found the Freescale Freedom Board with a similar price of 10 euros, a Cortex M0 + based processor, and even compatible with Arduino pinouts, with some incredible pribluda, such as an accelerometer.

You shouldn’t leave out the attention of STM32F0DISCOVERY (Cortex M0) and STM32F3DISCOVERY (Cortex M4) boards with prices of 8 and 12 euros, from STM .

To all the charms of the processors on the Cortex M0 / M4 can be attributed to the fact that they are made not only in cases that can not be soldered by hand, there is even a DIP8 package.

Agree, it is worth much to think about the choice of the microcontroller in your next hand-assembled device.

PS For my project I took Teensy on ATMEGA32U4, for a compact size, and just in case Olimex LPC-P1343 .

Source: https://habr.com/ru/post/161407/


All Articles