Nice MCU for small jobs

Sep 03, 2018 96 Replies

LPC804: 15 MHz Cortex M0+, 32kB flash, 4k RAM, 12-bit 2 us ADC with 1 LSB DNL, 10-bit DAC, the usual serial stuff, 20-TSSOP: 67 cents in reels, dev board $27.



We're using it for a super-quiet diode laser controller where it will run the temperature control and automatic power control loops. I'll never use another ATmega. ;)



Cheers



Phil Hobbs


Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

Resource-rich enough that maybe I can toss a template or two into the C++ without anyone freaking out. OMG!

Phil, What is your preferred development software and debug environment? John

mandag den 3. september 2018 kl. 19.25.06 UTC+2 skrev Phil Hobbs:

STM has a similar cortex-m0 that does 48MHz for the same price at digikey

the dev board with debugger is something like ~$10

indeed, about the only reason to use an AVR is if you absolutely must have 5V cortex is faster and cheaper with more memory

I tried an ST Cortex M3 about five years ago, and the difference in library and tool quality was startling. I've stuck with NXP subsequently, with uniformly good results.

If ST has cleaned up their act, I'd certainly be willing to have another go.

Cheers

Phil Hobbs

We really like the Code Red tool chain and the LPCXpresso dev boards. Makes it super easy to get stuff working in a hurry.

We'll try out the ex-Freescale Kinetis parts soon, just to see if their price/performance is enougb better to worry about.

The LPC M4s are cheaper than their M3s, and have more interesting package options

Cheers

Phil Hobbs

the question I'm unsure of is whether you can use those NXP ARMs with the toolchain of your choice or if they lock you in to their LXCNEXpressor C-only/128k limit toolchain (for the free version) somehow.

One of the most useful tools imaginable for embedded development is Compiler Explorer which lets you look at a selected compiler's ASM output in real-time for your chosen build flags, which unfortunately wouldn't be possible with that toolchain as it seems they use a proprietary fork of GCC. :(

ARM is ARM, just use GCC

Ok great as it seems they want one to pay some fee to enable C++/unlimited binary size in their bespoke IDE which is silly-talk.

Sure, unless you need any peripherals or documentation. ;)

Cheers

Phil Hobbs

The Code Red tools are modern C++ (g++) and are free up to 256k.IIRC the full version is another $256, gasp.

NXP supplies sample code for Keil and IAR as well.

Cheers

Phil Hobbs

I see, is that how they gitcha? The datasheet doesn't seem to actually tell you all the magic steps/registers/memory locations you need to write bits to to configure the peripherals as you like, it's built-in to their compiler. So it'd be difficult to just say whip up some asm by hand and drop the binary on it and have it actually do anything.

I've gotten spoiled using IDE plug-in for the OSS compilers that compile on-the-fly and show you errors and warnings as you type, the actual asm that will be generated highlighted and line-by-line cross referenced to your high-level code, and immediate cycle count estimates for functions

I'm partial to the Atmel ATSAMD21, a 48MHz M0+, in a 32TQFP package. I like 0.8mm instead of 0.65mm lead spacing, 40 rather 67 cents in reels.

Thanks, - Win

$0.55

A Pic with hardware PID controllers sounds like a winner for this application.

that is almost never in the datasheet for MCUs, you need the usermanual

formatting link

tirsdag den 4. september 2018 kl. 03.31.47 UTC+2 skrev snipped-for-privacy@notreal.com:

that only has half the flash

The SAM D21 is a lot more expensive in Hobbs' quantities. I prefer the QFN package over the TQFP, though.

How much is needed? Let me guess. You're a programmer? ;-)

I can see why one might want to pay for the macros.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required