Migrating from PIC18 to ARM: which MCU to choose?

We have a product based around the PIC18F6680 which is now becoming a rare and expensive part. Since it looks like ARM devices are winning the popularity war, the chips are cheap and plentiful. The question is, with so many vendors and parts to choose from which one should we go with? The main requirements for this application, in order of importance, are:

1) availability - having devices in stock at Digikey/Mouser is almost a necessity since we can't wait 12 weeks for backordered parts from some distributor; two weeks is probably the maximum 2) price - since our original PIC18 is now at $9.47 each (qty 100) pretty much any device that comes in under this price will be better 3) 64K FLASH - since ARM code is more compact than PIC18 this should be more than enough 4) 4K RAM 5) 128 bytes EEPROM 6) CAN controller 7) timers with 1 output compare and 2 input captures 8) SPI 9) 2 UARTs 10) 8-bit DAC (or PWM) 11) a DMA controller that works with the SPI would be nice but not essential 12) two comparators 13) 10-bit ADC 14) under 0.2 mA when stopped

Processing speed and power consumption aren't too critical. I've given up trying to find built-in comparators on any ARM device so I guess those will have to be external from now on. Low standby current is important, but I can always cut power to the whole device if required. I've found one (LPC2364) that has a built-in DAC but those seem to be rare. The only ones I've found with built-in EEPROM are the LPC2927/ LPC2929. I also can't decide between ARM7, ARM9, Cortex-M0 and Cortex- M3. Right now Cortex-M3 appears to be more popular and the three leading choices are: Texas Instruments - Stellaris NXP - LPC series ST - STM32 series Given the above criteria there are still dozens of devices to choose from that would fit most of the requirements. NXP seems to have the best pricing; other than that I'm lost. Any suggestions or are there any other choices that I've overlooked?

Reply to
Stimpy
Loading thread data ...

That's less of a problem.

That's more of a problem.

My suggestion (except for EEPROM):

The LM3S2110 microcontroller is based on the ARM Cortex-M3 controller core operating at 25 MHz, with 64 kB single-cycle flash, 16 kB single- cycle SRAM, CAN controller, Systick timer, three 32-bit or six 16-bit general purpose timers, watchdog timer, SSI / SPI controller, I2C interfaces, three analog comparators, UART, two motion-control Pulse Width Modulation (PWM) outputs, low drop-out voltage regulator, brown- out reset, power-on reset controller, and up to 40 GPIOs.

Reply to
linnix

Try Cypress PSoC5, which does have Comparator choices, and also EEPROM.

Cypress are frustratingly slow at releasing prices, but they do show CY8CKIT-014 PSoC=AE 5 FirstTouch=99 Starter Kit $49 in stock.

Freescale have announced a M4 version, sampling soon

formatting link
- but data is thin right now.

Or, I see the new Nuvoton series, have just flipped into Stock, at Nu Horizons

formatting link

NUC100LE3AN NUVOTON 128KF 16KR QFP48 $2.5250 NUC100RE3AN NUVOTON 128KF 16KR QFP64 $2.7875 NUC120LE3AN NUVOTON 128KF 16KR QFP48 USB $2.7875 NUC120RE3AN NUVOTON 128KF 16KR QFP64 USB $2.9625 NUC120VD2AN NUVOTON 64KF 8KR QFO100 USB $2.7875

These are 5V (wide supply range), and I see they do have Analog Comparators too :)

Eval PCBs look well priced too...

NUMICRO-SDK NUVOTON TECH CORP AMERICA Development Tools $43.7500 NUTINY-SDK-120 NUVOTON TECH CORP AMERICA Development Tools $19.0000

Signs of a product manager, who knows what they are doing ?

-jg

Reply to
-jg

Depending on how you are planning to use the EEPROM you might not need to let that restrict your choices. With the NXP LPCxxxx MCUs you can use IAP (In Application programming) to write to unused flash from within your program. If you only need 64K flash for your code you'll have more than enough left over to use for other purposes. That should give you many more devices to choose from.

If you are frequently writing a few bytes to various locations in EEPROM then IAP might not be suitable. However, if your updates are infrequent or you are just storing a block of data at the end of a run to be used at the start of the next run it might be a feasible solution.

The Cortex-M3 LPC1xxx devices are relatively new and haven't yet gone through the usual spate of revisions - OK if you like a sense of adventure. If you are a more conservative type the more stable LPC2xxx ARM7 series should be more to your taste.

Regards, Chris Burrows CFB Software Astrobe: LPC2xxx Oberon-07 Development System

formatting link

Reply to
Chris Burrows

Apart from leadtimes I think ST are a good bet - this is based on good experience with the STM32 range of parts. I have not used the NXP parts or looked at them in very great detail. The good things about the STM32s: big range of parts with good footprint compatibility and good peripherals, tick all your boxes except EEPROM.

Be very careful with any supplier about availability - if you don't have the parts in your stores don't count on them being in stock. ST and others have parts on 1 year leadtimes so desperate users will buy up all the distributor stock if they can.

Michael Kellett

Reply to
Michael Kellett

The OP posting from google is killfiled but the question is interesting.

My advice would be to pick an ARM part which like the PIC18F6680 he will still be able to buy when it is 7 years old. Anyone know which ones they are?

Does anyone think these cheap (= low profit) parts with many vendors (= lots of competition) are all still going to be around in 3 or 4 years?

Reply to
nospam

If ST can't even supply Nissan, causing a multimillion plant shutdown,what hope does the avarage user have....?

formatting link

Reply to
Mike Harrison

or

=3D

The ARM7 parts from NXP (21xx) and Atmel (SAM7) are all still available, no? That's already more than four years I believe with no sign of being discontinued. Now that Luminary is part of TI, I wouldn't have any hesitation to design in their newer parts.

Commercial parts are always gamble if you need a long production life. I would pick a part that has only been out for a year or two and then try to pick one that seems to be pretty popular. The best way to tell that is to ask the vendor I think. But good luck getting an answer.

Rick

Reply to
rickman

In message , Mike Harrison writes

Red herring. That is not because they discontinued the (custom) part but due to FAB capacity and gambling on restarting FAB's (always a very expensive game). They did not restart a mothballed fab and increase capacity in time. After all there is a recession and people stopped buying cars....

It is a minor supply and demand glitch of a custom part. Not discontinuation of a standard part.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris H

I almost forgot about the PSOC5. They were supposed to be out end of Q2, but then they have been missing deadlines on this part for over two years!!! I'm actually getting concerned that the chip will be obsolete by the time it is orderable.

kinetis

To say "thin" is quite an understatement! I can't find anything remotely like a data sheet or any indication of when the parts will be available. On the other hand, it does look like a pretty good part. I'm going to start designing it into my vaporware right now!

rial...

0
5

Sort of interesting, I hadn't heard of them before. A lot of their parts are only in sampling stutas[sic]. But their prices are right! I'm not sure I believe all their claims of parts in production. Checking the NUC120LC1AN I can't even find it listed at either NuHo or Arrow. You can buy the SDK, but I can't even find a brochure on it! Technically speaking, I see that the I/Os are only 5 volt tolerant when powered by 5 volts. The power consumption is not so great either. It will be interesting to see what application these parts find.

Rick

Reply to
rickman

Thanks to everyone for all the good advice. After doing more digging, here's where I'm at:

Luminary Micro (Texas Instruments) Stellaris LM3S2110: analog comparators are nice, but the timer seems to be lacking the output compare feature. I really need the set-on-match and clear-on-match functions (with interrupt) to generate a pulse train with accurate timing. I really don't want to bit-bang this since the timing requirements are fairly tight. Unless there's a way to do this that's not obvious from my quick glance at the datasheet, I don't think I can use this part. All the Stellaris 2000, 5000, and 8000 seem to share the same crippled timer peripheral.

Cypress PSoC5: the built-in PLD would be nice to offload some of the pulse generation stuff but otherwise it looks like overkill for this product. Pricing and availability seem questionable as well. I'd also be a little worried designing in such a specialized part, especially from a single source. It would certainly save a bunch of PCB space right now but having to substitute this later on would be a nightmare.

Freescale Kinetis: doesn't appear to be available yet.

Nuvoton: Pricing is excellent! But to get the CAN controller I would need the NUC130 which isn't in production yet. The Canadian distributor (Arrow) doesn't show ANY NUC1xx parts in their catalog either. As an aside, Nuvoton appears to be a division of Winbond and I still have a bad aftertaste in my mouth from Winbond's buggy IO controllers in the early 90s.

STM32: The STM32F105R8 looks really good, it even has a DAC and the DMA can work on both the SPI and the DAC! The 20mA sink current on the IO ports is nice too. I'm almost sold on this one but one year lead time?? Please tell me that was a joke.

NXP LPC1700 series: Fewer features than the STM32 but slightly lower price and probably better availability.

Regarding the lack of EEPROM on these devices, I realize I can use part of the FLASH to hold data but typical usage requires 5-10 writes per day and I'm not sure about the endurance on the FLASH; the PIC's EEPROM is rated at 100K writes minimum. Also this product doesn't have a battery and it can (and does) get unplugged at any time. On the PIC, a write is only 4ms and losing power during a write will only lose one byte which is not a big deal. Losing an entire sector of FLASH would be catastrophic. An external EEPROM is not an issue, since they now come in SOT-23 packages for pennies each.

I guess it's really come down to STM32 vs. LPC1700.

Has anybody had any experience with either or both in terms of development, integration, and availability?

Reply to
Stimpy

u

strial...

250
875
5
5
5

Only some part numbers are released (I think 5?)

Where did you find the 'only 5V tolerant' IO specs on the MUC1xx family ?

The Data sheet I'm reading, gives Ioh at 5V/2.7V/2.5V and whilst it does not have a I-V graph, itt looks like I'd expect a

5V-driven port to behave ? Port SCH shows VDD to the MOSFETS.

NUC1xx Data sheets are here

formatting link

Development tools are here (I see now with photos, and Buy-links.)

formatting link

-jg

Reply to
-jg

I agree. This is very interesting to watch, several months from now.

You get this joke from many companies for at least some of their parts.

Perhaps you can slave a small PIC or AVR for the EEPROM and timers. They are more established for such functions.

SO, it's M3 (STM32) vs. M0 (LPC1700). I think M0 would be more popular down the line.

Reply to
linnix

Sorry, my bad. LPC17XX is M3. NUC120 is M0.

Reply to
linnix

I can only talk about STM32 - I've just never used the NXP ARMs.

Tools: I use the fully paid for Keil toolset but for small projects (

Reply to
Michael Kellett

I have the Luminary Micro (LM3s811) with Keil and the LPCXpresso (LPC1114) with Code_Red (Gcc-arm port). But I am not too happy with both build-in USB debugging links. In the process of separating the LPC1114 (I need to try a LPC1111), I blew-up the board. I was going to get the LPCXpresso with LPC1343 (USB enabled), but the NUC120 seems more interesting. The separate USB-SWD Nuvoton link is more appropriate for my development.

LPC1343 is around $2.50 in 1Ku (1800 available at Digikey) NUC120 could be below $2 in 1Ku (too early to tell)

We will stock at least 6 months of supply anyway, once we decide to use the chip.

I have no connection with any chip manufacturer. I just use whatever is appropriate (usually, most cost effective one).

Reply to
linnix

I didn't realize Nuvoton is a part of Winbond. My customer is having to discontinue a board because the Winbond CODEC part is being discontinued. Of course that happens to any company, but I get the impression this was not expected. Of course this is working out for me, but I wouldn't design in any of their parts just because they don't give me any reason to have confidence in their supply channels. Who are their distys anyway, anyone major?

BTW, I don't see Atmel in this list. They are a major ARM vendor and should not be discounted. The SAM7 parts are still very viable devices and the SAM3 parts are the hot, new products in their ARM lineup.

I was very glad to learn about the Kinetis. It looks like a great chip even if it is a bit early to get details on. The low power may be the best on the market for a process with these capabilities, the analog sounds excellent and it has fantastic comms with USB On-The-Go Full speed and up to six UARTs not to mention a wide variety of packages. An M4 core (with DSP instructions) may make it the fastest Cortex MCU on the market when it arrives. But that all depends on when it arrives. Of course, the cost is another issue we won't know about for some time too. "The first five general-purpose Kinetis MCU families are expected to sample in the second half of 2010 with production planned for early 2011" I don't have a calibration on Freescale. This could mean design in parts for production Jan 1 (Lattice model) or it could mean wait for 12 more months before even bothering to ask about them (Cypress model).

I will say, goofy name... "Kinetis". But at least you won't have a lot of false hits in Google...

Rick

Reply to
rickman

You might want to factor in the bragging rights bantam-posturing going on between NXP and Freescale.

Both have M4's coming, and so both Marketing Depts are trying to claim to be first.

NXP demo'd early silicon, then Freescale release partial info, and real hard info on production dates will not be real, until the errata on the engineering samples is out... Then there is the errata on the core itself ;)

-jg

Reply to
-jg

You're right, I completely forgot about Atmel. The SAM3 looks quite good, it also has the DAC and DMA and SPI and probably the most flexible timer / waveform generator that I've seen so far. The butilt- in ROM bootloader is nice too, although not very useful for this product. Now I've checked Digikey, Mouser, Arrow, Future, Farnell and other than the development kit, no parts in stock anywhere. Are these things actually available yet? If not, then I think I'll go with the STM32.

Now the question is which toolchain/JTAG to go with. I don't really feel like mucking around with the DIY Eclipse/GCC/GDB/OpenOCD/Wiggler solution and things like Keil, IAR, Greenhills, and Tasking are well outside the budget. This leaves me with one of the "packaged" GCC offerings like Rowley, Raisonance, Hitex, iSystem, Atollic, Aiji. Does anybody have any experience with any of those? After reading a few past discussions on here it looks like Rowley is a good choice, Raisonance is OK but slow, and the Hitex IDE isn't all that great.

Reply to
Stimpy

Code_red for NXP is good.

We have been discussing my specs in another thread. Since you want CAN and I don't, we might end up with different chips. However, many of the issues are common between us. Regarding programming tool chains. NXP LPC is the best with USB Mass Storage emulation. Namely, flash appears as USB drive. The chip would be real simple to program. USB to SWD bridges are available to most; so, it is the second best.

My spec: 30 I/O

Reply to
linnix

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.