

Do Small-RAM Devices Have a Future? (2011) - luu
http://blog.regehr.org/archives/541

======
userbinator
It's 2 years after that article was written, and I don't see 8-bit MCUs and
their accompanying tiny amounts of RAM going away anytime soon - although ARM
seems to have had a lot of publicity, architectures like the 8051, with its
256 bytes of RAM (and up to 64K of external RAM, not present on all models),
are still alive and well; for every chip containing an ARM core that's been
shipped, there's probably several times more with 8051 or other 8-bit cores. I
singled out 8051 because unlike PIC/AVR which are only single-sourced, and ARM
which is not free, it's both produced by many manufacturers, and AFAIK it's
free to implement.

In fact I wish the trend of making "smart" devices with grossly overpowered
processors that were likely chosen just so they could run a fully bloated
Linux distro - only to poke a few GPIOs based on some very simple input events
- would stop. Running a full OS when only a tiny fraction of the functionality
is used is not only wasteful, it adds to the security risk because of
increased attack area.

~~~
nezza-_-
The problem is: A lot of the 'native' libraries and even the open-source
embedded RT OSs really suck.

And if you use a vendor's library you are very locked in: Let's say you use a
TI chip for your prototype but then someone who knows stuff about designing
hardware tells you that now it has to run on an Atmel processor because
$profits... you will have to reimplement a lot of your stuff which costs
(quite a huge amount) of time and might even require an entire rewrite..

~~~
minthd
you could always use something like the mbed or arduino , and have the ability
to change chips ,but if you want to access the full capabilities of chips
,you'll cant have portability ,because you lose something when abstracting.

~~~
EpicEng
Am Arduino is not a production solution. It's great for prototyping, but to
expensive for mass production. You go with something as small and cheap as
possible.

~~~
TD-Linux
You can totally use the Arduino in production, and it's happened quite often.
The core of the Arduino is just the ATMega8 micro, which is only a few dollars
- Arduino is just a nice programming environment and set of libraries for it.

~~~
neohaven
Can you? Sure.

Should you? Oh, sure, if you want a _very_ expensive piece of hardware in your
product.

------
rasz_pl
Article and comments below show lack of domain knowledge (even for 2011).

Most of the price of the smallest (1KB ram) micros today is in packaging,
shipping, handling and both manufacturer and distributor margin. Price of
silicon is almost irrelevant. Micros that go into memory cards cost 1c each
and are shipped as bare dies.

> if a 1kB MCU were to cost ~$0.01 I think you would see it going into things
> like watches simple calculators and even flashlights

they do and they are

>I sure the heck don’t need linux or android running my washing machine.

its not about your need, its about marketing. If someone can make a fridge
with embedded android tablet (~$10 bom) and differentiate this way from
competition they will, even if its a shitty useless embedded system. Its not a
question of why, its a question of why not :) Smart TVs are a perfect example,
it doesnt cost anything to make TV "smart". Difference between bare lcd
controller TSUMV29LU and one full of hardware decoders TSUMV59XU (mp3,
MPEG1/2/4, DivXˈ, H.264, RV8, RV9, RV10, Xvid, jpeg, mjpeg) is ~one dollar.
Its the same with ram, at this point small amounts of ram are basically FREE,
differences you see in datasheets and in price listings are dictated by
politics and market segmentation.

8051 was ~60K transistors (same ballpark as Cortex M4), 1KB ram is 1000
transistors, <2%. There really is no difference between selling you 128 bytes
or 2KB ram chip, other than trying to create virtual segments and artificial
price brackets.

~~~
TD-Linux
Right. The real jump from small to large RAM devices is the presence or
absence of DRAM.

Large SRAMs get costly and power hungry quick - the largest RAM Cortex-M4
devices have about 192KiB of SRAM, but cost $6-10. The jump to DRAM, however,
is very expensive, because DRAM is fabricated on a different process and needs
to be installed as a separate die or package. It is also too high latency to
use as the only RAM, so a SRAM cache is still necessary.

The market currently segregates a lot of other features based on the RAM
interface. Cortex-M series cores, sold as "microcontrollers", almost never
have DRAM, only support Thumb-2, and have no MMU. Cortex-A series are sold as
"application processors", have external DRAM interfaces, and include a MMU. A
similar divide is visible with the MIPS architecture.

~~~
monocasa
I'm starting to see more and more Cortex-Ms with DRAM interfaces. STM32F427s
added them to their FSMC peripheral (their new discovery board has 32MB of
DRAM actually).

~~~
joezydeco
NXP's LPC line of microcontrollers are M3 or M4-based and have external SDRAM
interfaces that work pretty well (no high-speed layout necessary). They've
been around for a while.

------
minthd
Even assuming it would be possible to build ram that takes almost no
power(which is a scarce resource in many systems), still memory is the biggest
tool vendors use today to differentiate prices between chips and to optimize
profitability and this fits with product makers since more memory generally
means more complex and expensive product.

but we also see a shift towards low-cost chips with lots of memory,for example
a new NXP dual-core $2 chip with 108k ram .

What's extra nice about this chip is that it let's you use( in theory ) a
garbage collected language ,or even a scripting language in one core and c in
another core for your realtime stuff,thus enabling you to mostly write high
level code while still having a realtime system.

~~~
homer-simpson
Which "new NXP dual-core $2 chip" are you referring to? I skimmed through the
NXP micro-controller website but could not find anything close to this.

~~~
minthd
[http://www.eetimes.com/document.asp?doc_id=1324539](http://www.eetimes.com/document.asp?doc_id=1324539)

~~~
Sanddancer
Looking around, the cheapest I found was $2.62, if you buy a reel of 3000 of
them [1]. It's definitely a nice price, but saying something costs two bucks
implies maybe up to two and a quarter each, not when it's closer to three.

[1]
[http://www.findchips.com/search/lpc54101j256uk49](http://www.findchips.com/search/lpc54101j256uk49)

~~~
desdiv
_The LPC54100 series will be available... in the first quarter of 2015, with
pricing starting at USD $1.99 in 10K quantities._

If you came from the future to inform us that NXP lied about their chips
costing $1.99 in 10K quantities in 2015, then your beef is with the NXP
marketing department, not minthd.

minthd is just relaying a number he read in a news article, which in turn
relayed it from a NXP press release.

~~~
Sanddancer
I completely missed that in my reading over the article, which was why I ended
up searching for and linking to an aggregator that shows retail pricing.

------
FigBug
I think they do. One one hand, for building complex embedded systems it sure
is nice to be able to get an Arm processor, Linux a high level language etc.
Getting all that setup takes time, but it's worth it since it since the rest
of the development goes so much faster.

But, I still use a ton of AVRs and similar small memory micros. For each big
micro I use, they have a few small micros in support. It's so much easier to
do hard real time without an OS, or pipelines, etc. When you can just count
instructions and know the timing.

As the bigger micros continue to move down market, the small ones will get
even smaller and lower power and open up new markets.

~~~
minthd
there are already quite a few multi-core microcontrollers available ,why not
use them instead?

~~~
VLM
A stereotypical answer FigBug didn't mention was interrupt latency is much
faster and jitter in the interrupt latency sometimes doesn't even exist.

Also, closely related to above, simplicity and modularity. Don't want to be
the guy debugging why the antilock brakes occasionally miss an encoder
transition when the engine RPM fuel injector routine is just perfectly the
wrong interrupt rate. Its very much unix vs windows philosophy WRT monolithic-
ness.

~~~
minthd
I think multi-core mcu's have interrupt independence per core.

------
justincormack
I went to a talk the other day [1] that argued that the really low end were
too small to do crypto so their use cases were limited by that to non
networked applications. Mid range eggs Cortex can though.

[1] [http://www.slideshare.net/mobile/CohesiveFT/chris-swans-
pres...](http://www.slideshare.net/mobile/CohesiveFT/chris-swans-presentation-
for-thing-monk-security-protocols-in-constrained-environments)

------
Nursie
Been working on a device with 128k of RAM and 256K flash (for program and file
storage) this year. They ain't gone yet!

~~~
ghshephard
If I read the article correctly, "Small Ram Devices" can refer to devices with
< 16 bytes of memory and < 128 bytes (the first two categories) - from that
perspective, 128 kbytes is 1000x to 8000x larger.

~~~
Nursie
I _think_ 128k was still in the category as he mentions the idea that
processors with megabytes of on-chip RAM may become the minimum spec.

But sure, 128k is masses compared to some others!

