Microcontroller Choice - Page 1
Forum section: electronics / beginners

author: Tandy
author_rank: Frequent Contributor
timestamp: June 25, 2015, 01:40:29 pm
content: In the dim distant past when I last worked with microcontollers it was using assembly with PIC.I figured there are a few projects that I should get my teeth into and start learning with a new up-to-date platform and toolchain. Now obviously people will have specific needs (and experience) that will direct them to a specific product or range but with so many to choose from I thought I would try and concentrate my efforts on one family.As I will essentially be starting agin from scratch I thought I'd skip the basic 8bit types and concentrate probably on an ARM based processor. Of course I appreciate that for most applications an ARM core is going to be overkill, but the cost is dropping all the time where I believe there will come a point where because ARM based microcontrollers represent the most widely used architecture that older types will actually end up costing more.I'm also quite keen on using an open toolchain where possible so that I can share the source for anything I make without someone having to install propriety software. Using a gcc compiler or similar would be ideal.So what are people using and why? Also what do you think might be a good place for me to start based on my requirements?

author: Wilksey
author_rank: Super Contributor
timestamp: June 25, 2015, 04:37:26 pm
content: Perhaps start with an ST Discovery board, M3 or M4 cortex, I personally use the Keil compiler, but you could look here:http://www.coocox.org/

author: rdl
author_rank: Super Contributor
timestamp: June 25, 2015, 08:00:45 pm
content: If you don't mind going slightly off the beaten path, take a look at the Parallax Propeller. It's pretty simple to get started with, powerful and flexible, and it would be hard to find a more open source microcontroller.https://www.parallax.com/microcontrollers/propeller-1-open-source

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: June 25, 2015, 08:11:36 pm
content: I did some project with the LPC Cortex M3 and M0+ µCs. E.g the LPC1768 (100pin/100MHz), the LPC812 (20Pin, 12MHz internal OSC) and my next stuff will use the LPC1549 (48 or 64 pins, ip to 72MHz).There is a cheap JTAG/SWD debugger available called LPC Link 2 and a free IDE called LPCXpresso. You can also use Coocox though and for my LPC1768 projects I actually did.

author: edavid
author_rank: Super Contributor
timestamp: June 25, 2015, 08:25:38 pm
content: There is a reason why Arduino (AVR version) is so popular. It's extremely cheap ($3 for an Uno clone) and easy (5 minute install to get the IDE/toolchain working).Really hard to beat that with any ARM platform.

author: bingo600
author_rank: Super Contributor
timestamp: June 25, 2015, 08:42:07 pm
content: Quote from: edavid on June 25, 2015, 08:25:38 pmWhile i agree an AVR is nice to get a brush up on MCU experience , as it's peripherials are much less complicated.You can get a maple mini ARM board for under 4.50$http://www.ebay.com/itm/141404280807http://leaflabs.com/docs/arduino-compatibility.htmlhttp://forum.arduino.cc/index.php?topic=265904.0I'd say its close to the same price as a "Nano 3.0"I'd recommend an AVR arduino for starter , because there are tonzzzz of libs and examples.But for those prices i might get a Maple Mini also.If you go for a maple - get a debugger/programmer at the same timehttp://www.ebay.com/itm/271699556039/Bingo

author: edavid
author_rank: Super Contributor
timestamp: June 25, 2015, 08:53:13 pm
content: Quote from: bingo600 on June 25, 2015, 08:42:07 pmUnfortunately, the Maple platform is dead, so I don't think it would be a good choice for the OP. For ARM, I think it makes more sense to go with mbed.org or Arduino Due, even though they are a little more expensive. But, I still think the OP should try Arduino AVR, at least initially.

author: Howardlong
author_rank: Super Contributor
timestamp: June 25, 2015, 09:06:29 pm
content: I use PIC, TI ARM and NXP ARM extensively.I use PIC in real products across almost the entire range from 10F to 32MX (32MZ dictates use of a new framework which is too buggy and over engineered for sensible consideration, I fear Microchip have seriously lost their way with the 32MZ and the Harmony framework). The Microchip toolchain is free but to switch on size and speed optimisations on the compilers is expensive with both an up front and subscription buy if you go that route. Even worse there are separate licenses for XC8, XC16 and XC32 too if you want those optimisations: Pro versions are £645+£129pa for each compiler, standard versions are half that. Many Microchip dev boards include onboard debuggers, or, in increasing cost you can use the PICkit3, ICD 3 or Real ICE. PICkit2 is cheap but isn't well supported for newer chips. Their MPLAB X IDE is based on NetBeans. Old farts like me prefer to use the old MPLAB 8.xx IDE because it's faster and more robust than MPLAB X although it has its own quirks. More recently Microchip have stopped producing compiler updates that will work with the old MPLAB 8.xx IDE. Unlike TI and NXP, Microchip still offer a chip simulator, although apart from for trivial things it's of limited use in the real world.TI again has a free and fairly robust toolchain (Code Composer Studio based on Eclipse) that has no restrictions unless you want to use more serious debuggers than the onboard ones on some dev boards or the basic XDS100 series ($495 to unlock). The toolchain cost is when you use more performant debuggers. I use their Cortex M4 devices namely TM4C123, TM4C129X and CC3200. TI has the best wireless integration. The documentation for TI is daunting though, there's so much of it it's difficult to know where to start.For NXP almost exclusively I only the top end LPC4300 M4F devices. For this I use an LPClink2 as a debugger, and for prototype development I often use an LPClink2 as a target too as it has an LPC4370 on it. The LPClink2 is either a debugger or a target, it cannot be both at the same time (unless you have two). Some boards have their own debuggers on board. Toolchain (LPCxpresso) is Eclipse based but the integration with NXP specific value-adds is a bit wishy washy with loosely integrated bolt ons, and is flaky particularly with respect to the debugger which crashes sometimes if you don't do things in precisely the right order. TI's CCS is much better in this respect, but NXP's M4 offerings are more advanced than TI's. The only compiler restriction is a 256KB image, which is quite a lot in an MCU! Like TI, $495 to unlock the restriction.NetBeans and Eclipse, both being Java based tools, suffer from performance particularly in the compile-program-debug sequence when compared with other often older native-based IDEs. This appears to be the mix of loosely coupled external components and possibly the overhead of Java's JNI allowing Java to access real hardware like USB based debuggers. Personally I find it really interferes with my workflow, particularly on NXP's LPCxpresso IDE.So I use PICs for quick stuff because I've been using them for a couple of decades now and know them pretty well as a result, TI for wireless based devices and NXP for higher end stuff.Edit: one other thing, I'd also consider if the devices are available in at least some form in DIP packages. You can do an awful lot with DIP devices on a breadboard these days before you even pick up the hot pointy thing.

author: LabSpokane
author_rank: Super Contributor
timestamp: June 25, 2015, 09:20:02 pm
content: Have you considered Zapta's ARM Pro Mini?It uses an NXP LCP11 series. All the necessary info is on Github:https://github.com/zapta/arm/tree/master/pro-miniIt has the nice features of an easy toolchain, drag and drop firmware installation, and it's ARM.

author: Tandy
author_rank: Frequent Contributor
timestamp: June 25, 2015, 09:44:03 pm
content: Thanks for the suggestions so far, I appreciate that the AVR is very popular due to its use in the Arduino and that the Arduino IDE and libraries make things simpler. However I don't think that 'wiring' library etc is necessary, I'm happy to set registers for pin functions manually etc.Since posting this I have been looking a bit closer at ST STM32 and the Ti ARM processors a bit closer, I particularly like the look of the CC2538 wireless system on a chip for one project I have in mind. The NXP LPC seems to have more community support than I expected and it does come in some convenient packages like TSSOP-16 that are easy to hand place and small enough to include in basic projects.The TI and ST parts though seem to start with a much higher pin count. Price wise they all seem to start at around the $1 price point so no big deal there. I'm not doing any large scale product design where saving 20c would be a big deal on the BOM.If anyone is interested one of the first projects I would like to tackle is a range of sensors such as spectrally selective light sensor. It is a bit more complicated than just using an A to D as I need to forward bias the photo diode to warm it, measure voltage across it to determine the junction temperature and then take the reading. I would use the micro controller to act as an i2c slave so that I can address it from a master micro or something like a raspberry Pi. I would have for example a Red and an Infrared sensor and be able to address them over i2c.

author: Muxr
author_rank: Super Contributor
timestamp: June 26, 2015, 12:14:43 am
content: Quote from: edavid on June 25, 2015, 08:53:13 pmMaple project might be dead, but there seem to be a healthy support which sprung up in its wake:https://github.com/rogerclarkmelbourne/Arduino_STM32I haven't had time to mess with it yet, but it's certainly what I plan on trying at some point. STM32 MCUs are very affordable, and it's the main reason why it's so compelling to me, as well as the Arduino support.The project I am working on currently requires Wifi so I am using esp8266 (reason I haven't had time to mess with STM32). Arduino support for esp8266 (the project is very active):https://github.com/esp8266/ArduinoI've had good luck with it so far, so it's another option. So you can basically go between AVR (Arduino vanilla), STM32 to esp8266 with very little learning curve between them. Imo for someone new I think it's the way to go.So if you're just getting into MCU development, get yourself an Arduino board, and mess with AVR, and if it's too limited for whatever reason, you have two 32bit upgrade paths, stm32 or esp8266 with wifi. There is also the Teensy Arduino..

author: Tandy
author_rank: Frequent Contributor
timestamp: June 26, 2015, 12:21:01 pm
content: Further digging and I found ARM CMSIS that aims to provide a set of libraries to enable code portability across multiple ARM microcontrollers. So I think I'm going to have a go at getting set-up with the STM32 and CMSIS.

author: macboy
author_rank: Super Contributor
timestamp: June 26, 2015, 12:52:03 pm
content: Quote from: rdl on June 25, 2015, 08:00:45 pmI haven't seen someone plug Parallax on here before. I used to like the Parallax SX (*) micros due in part to their similarity with PICs. By similarity I mean a blatant copy that resulted in lawsuits. The SX was unique in one respect: It could do 100 MIPS ... fifteen years ago. Another unique feature was its lack of features, or peripherals to be exact. You got a few timers and nothing else. USB? Laughable. No UART, no PWM, nothing. The 'feature' part of this is that you could use the high speed to emulate any peripheral in software. Actually thePropelleris the same in that respect - you are expected to use the high computational speed (8 cores at 20 MIPS each) to implement all peripherals in software. That is fine if you can find good quality peripherals pre-written, but if you have to write them from scratch, then the development time skyrockets.

author: VEGETA
author_rank: Super Contributor
timestamp: June 26, 2015, 06:52:52 pm
content: I am also interested in other MCUs than PIC. Meaning, an ARM one. I will start learning STM32 using a discovery board that has a TFT screen. It is very cheap! this is the benefit of ST stuff. I am interested in Renesas MCUs too, but they are hard to deal with and pricey.Can someone give us any good book/tutorials/... to start with ARM MCUs?

author: Tandy
author_rank: Frequent Contributor
timestamp: June 26, 2015, 07:15:52 pm
content: I found this introduction book for the STM32 that may helphttp://www.cs.indiana.edu/~geobrown/book.pdf

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: June 26, 2015, 07:22:11 pm
content: i used PIC alot but now am totally for STM32 for any kind of application, there is always more hardware integrated stuff than you can possibly need , programming it a bit annoying at first but not as difficult once you get used to it, and support is available through forumsfor the compiler you can start with the free version of IAR or keil for a limited firmware or i recently tried OpenSTM , an eclipse package that do the job and totally free, work totally fine when you start developing with known hardware ( Discovery board or other ) but can be tricky when you try to define your own hardware.

author: zapta
author_rank: Super Contributor
timestamp: June 26, 2015, 07:26:50 pm
content: Quote from: LabSpokane on June 25, 2015, 09:20:02 pmAnother nice and easy to use ARM board is the Neutrinohttps://www.eevblog.com/forum/oshw/the-neutrino/My preference in general is for minimal, intuitive and open source boards so I can later incarcerate the same design in my own custom boards.The ARM PRO MINI has the advantage that it also supported by the mbed libraries. Not sure about the Neutrino.

author: smgvbest
author_rank: Unknown
timestamp: June 27, 2015, 02:14:13 am
content: Another one is the .NET Gadgeteer boardshttps://www.ghielectronics.com/catalog/category/265These are ARM boards that run Micro .net framework and are programmed in C# and Visual Basic. Both compilers are free and the boards range from very inexpensive (but not as inexpensive as the arduino) to higher end onesA FEZ Cerberus Mainboard is $24.95 for a 168 Mhz 32-bit Cortex-M4or a FEZ Raptor Mainboard is $99.95 for a 400 MHz 32-bit ARM 9the base models are down to $14.95

author: VEGETA
author_rank: Super Contributor
timestamp: June 27, 2015, 10:45:45 pm
content: Quote from: hamdi.tn on June 26, 2015, 07:22:11 pmcan you please tell me what are the hardware tools that you use? I intend to buy a discovery board that has a TFT screen to be my gateway to learn ARM MCUs. However, what are the tools you must use to work with STM32 MCUs without dev boards (like when putting it on a breadboard and do other stuff manually, or designing a commercial product).best software package and toolchain?-----------------------------16132243591449--------161322435914490Content-Disposition: form-data; name="message_mode"0

author: Tandy
author_rank: Frequent Contributor
timestamp: June 27, 2015, 11:22:41 pm
content: VEGATA, If you pick up a Nucleo board from ST it has an onboard programmer that you can snap-off, you can then use it to program the processor on your own circuit. I believe also that there is a UART bootloader included on the microcontrollers so in theory a USB to UART adaptor could also work.By all means get the a discovery with LCD but you may as well pick up a Nucleo for US$10.

author: Howardlong
author_rank: Super Contributor
timestamp: June 27, 2015, 11:51:54 pm
content: One thing I would be wary of is inadvertently tying yourself in to third party hardware that require third party hardware and software tools. While there are a lot of them about, in general in my experience, in the medium and long term vendor prescribed tools reduce the risk of hardware tool lock in compared to those of a third party.A typical example is MikroElektronika who, while having some excellent boards and tools, effectively lock you in to their offerings and make it difficult to escape. This is particularly the case when a new device comes out and you have to wait for third party tools to catch up, if indeed they ever do. CCS Inc are similar in this respect in the PIC world.While I certainly wouldn't discount third parties entirely, I would remain wary for any longer term plans you may have.

author: dadler
author_rank: Unknown
timestamp: June 28, 2015, 12:09:25 am
content: Quote from: zapta on June 26, 2015, 07:26:50 pmI pre-ordered a couple of Neutrinos to try out. Is your ARM PRO MINI available by any other manufacturers yet? I read your GitHub page but didn't know if there is more recent info available.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: June 28, 2015, 12:46:22 am
content: Quote from: VEGETA on June 27, 2015, 10:45:45 pmwell i don't think the tft board is the one to start with, stm32f429 is a much packed with stuff you will be lost, an stm32f407 discovery board can be more acceptable as first experience board, i have both and i often use the 407 one to develop quick multi purpose things.what you need to have to be able to use the mcu without a dev board ... well just keep in mind that most of those chip are LQFP or bga so breadboard my not be useful i think you buy the proper dev board corresponding to the mcu you willing to use, than you will no need more than any other tool you normally use for your project; some small adapter board are usable but again doesn't make your life much easier.for software, i vote IAR but you can try them all , they all have a free limited version , and fix a choice, you may not like the windows 98 looking style of iar user interface

author: VEGETA
author_rank: Super Contributor
timestamp: June 28, 2015, 12:57:08 am
content: so is this the best neucleo to start with:http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419?

author: kwass
author_rank: Frequent Contributor
timestamp: June 28, 2015, 02:42:44 am
content: Quote from: macboy on June 26, 2015, 12:52:03 pmI loved the SX. Yes, 100 MIPs compared to the best 16F series PICs today at 64 Mhz -- really 16 MIPs. The fact that it doens't have all the peripherals included makes it a really great way to learn micros without spending days reading 1000 page datasheets. It's a shame it's EOL and Parallax lost the ability to keep/expand the line, there's really nothing like it for speed and simplicity.

author: RacerX
author_rank: Contributor
timestamp: June 28, 2015, 03:23:56 am
content: 8051

author: miguelvp
author_rank: Super Contributor
timestamp: June 28, 2015, 05:28:25 am
content: My new favorite is the PSoC 5LP, $10 for the prototype board:http://www.cypress.com/?rid=108038Cortex M3 so no DSP and floating point like some Cortex M4s but I can make it drive a CGA and a VGA monitor, mostly by hardware (programmable digital blocks) so the actual MCU is mostly idle and I haven't even touched the Analog blocks yet.https://www.eevblog.com/forum/projects/make-use-of-an-old-cga-monitor/45/Still working on the communication part to change the video modes and deciding if I want to use UART, SPI, I2C, HID or even MIDI to control and change what it's displayed.I'm not even at 20% total usage of the chip in most assets.Edit: for the 8051 aficionados the PSoC 3 uses that as the core.

author: Kjelt
author_rank: Super Contributor
timestamp: June 28, 2015, 08:19:34 am
content: All info thus far has numerous times been shared on this forum before. If you use the search option you.ll find a ton of info to go through and you can make your questions more specific.

author: Tandy
author_rank: Frequent Contributor
timestamp: June 28, 2015, 11:16:57 am
content: Quote from: VEGETA on June 28, 2015, 12:57:08 amHere is how I would suggest you choose the right Nucleo Board.1. Decide if you are happy with the regular STM32F type processor or are planning on ultra low power designs such as items that will need to run for a very long time on a small battery. If you need the low power option choose between...NUCLEO-L053R8, Low end M0+ based controller with 64K flash. You have the option of developing on this with the option of using a small LQFP32 version in your own projects if you are looking for one with a small number of pins.NUCLEO-L152RE, Higher end M4 based with flash options up-to 512K. If your projects are going to be somewhat more demanding and you need the extra clock speed, flash & peripherals then this would be the better choice.2. If you are happy with the regular F series then decide what family you would like to work with, some suggested options.NUCLEO-F030R8This is based on the older M0 core but has package options all the way down to a TSSOP 20 that makes hand soldering simple and allows you to use it as a cost effective replacement for an 8bit processor starting at about US $1 in small quantities.NUCLEO-F303RESimilar to the above but using the newer M4 core, higher clock speed and more peripherals including D to A and op-amps. Being a higher spec microcontroller there is no TSSOP option but there is a LQFP32, obviously these are a bit more expensive than the F03 range.NUCLEO-F411REIf you want something with all the bells and whistles as well as high performance and plenty of flash then this is the board to get. However it many not be the best place to start.M0 & M4 based chips seem to be the sweet spot in the sense that they established with good support in the software tools etc

author: Psi
author_rank: Super Contributor
timestamp: June 28, 2015, 12:00:02 pm
content: STM32 + emBlocks IDE works well. (it uses gcc)and the STM32 discovery boards are pretty cheap, like $10, and are supported out of the box by emBlocks.The discovery boards also have a debugger on board, which is also supported by emBlocks. The debugger can be cut away from the main MCU half of the PCB and used as a debugger/programmer on its own.There's a good range of STM32 too.From the STM32F0, which is quite cheap (like $2 in one-off) and kicks the pants off a 8bit ATMega or PICTo the jaw dropping STM32F7 which has more power/features than you will know what to do with. (Reading the datasheet may make you week in the knees)

author: macboy
author_rank: Super Contributor
timestamp: June 29, 2015, 05:02:59 pm
content: Quote from: miguelvp on June 28, 2015, 05:28:25 amI've seen this one too and I plan to pick up a couple of those nice dev boards. The economy of those dev boards is high. You get a "free" USB programmer/debugger that can also do UART/I2C comms with your project, plus all I/O is broken out into a DIP compatible format. And it's just $10 including the PSOC5 that by itself normally costs twice that much. That's not to mention the additional lesser PSOC5 on the programmer/debugger side of the board. Figure that one out.The similar PSOC4 dev kits are also a good deal at $4 even though that micro is only ~$1 itself.