lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



PIC chips are popular partly because they are available with
interesting peripherals (USB, PWM, Ethernet MAC & PHY,  etc) at low
pin counts (e.g. 28 pins) with DIP and larger SMT packages (SOP

This is indeed nice, but I don't think there is any DIP uC on the market that can run eLua right now (due to lack of proper resources), and I suspect it will never be. All the "high end" uCs come in SMD packages (and there are good reasons for this as far as their manufacturers are concerned).

The PIC32 chips use a MIPS32 core.  There are instructions on the
internet for building gcc for PIC24/dsPIC, but I haven't tried them.
Max memory seems to be 32K RAM, 512K flash, with no external buses, so
not a good choice for Lua.

Actually, with my LTR patch (also part of the incoming 0.6), 32k is not at all that bad for many applications. And I have more ideas about how to make Lua more "RAM-friendly", but there are too vague at this point.
 
AVR8 does go up to 32K RAM, 384K flash (ATxmega384, ~$10 in 100
units), but I believe it's just sampling now, and for that price
you're better off with 32-bits.

Some XMEGAs have support for extenal memories though (SDRAM included), so eLua might run on them at some point in the future. More like a proof of concept though, since at that price you're indeed much better off with 32-bit chips. Which are already at the same price level as some regular "high-end" 8-bit chips (AVRs for example, not to mention XMEGAs which are even more expensive). AVRs are arguably easier to work with (especially for people without experience in embedded programming), and I'm guessing this is why they keep the price so high. On Mouser, for example, the AT91SAM7X256 chip (32-bit ARM7TDMI with 256k internal Flash/64k internal RAM running at >50MHz) is listed at $13.12 in small quantities, while the ATMega256 chip (8bit AVR Hardvard architecture, 256k internal Flash/8k internal RAM running at 16MHz) is listed at $15.91 in small quantities, and keep in mind that the SAM7 exports both Ethernet and USB interfaces. I know this comparison is shallow and incomplete, but still it illustrates the point quite nicely.

ARM MCUs with >= 64K RAM and 256K flash are common, and a number have
96K or more, including the already mentioned AT91SAM7X512, the NXP
LPC238x, the NXP LPC24xx, and the ST STR9xx.  The LPC2478, for
example, has 98K SRAM, 512K flash, external memory interface, LCD
controller, Ethernet MAC, USB OTG,  2 CAN, 4 UARTS, and more for about
$12 (100's).

The LPC2468/LPC2478 chips are the best I could find in today's market in terms of price/performance&peripherals ratio (and no, this is not advertising, just my own thoughts). It comes at a price though: they're very large (LQFP208 or BGA) thus it's quite hard to prototype with them, or even design a PCB.
Also, the STR912 chips from ST are quite interesting (ARM9@96MHz with 512k/96k internal memory, external interface and a lot of peripherals).
 
STM32 has at least one quirk: you can't use the USB and CAN ports at
the same time, which doesn't work for me.

And they also don't have Ethernet :( I'd really, really like to have a chip that is either a LM3S (Luminary) with external memory interface, or a STM32 (ST) with Ethernet :) There are rumors that Luminary is preparing some chips with external memory interface, so the future might look bright after all :)
 
It shouldn't be too hard to design an "eLua Stamp" using a MCU (or SoC
if you prefer) - in fact, there's no reason why there shouldn't be
several designs.  For a digital guy, I'd say the hardest part is
figuring out the voltage regulators.  My guess is that Bogdan & co
will get a working design finished first.

We're trying :) A bit short on resources on the hardware part, but we're trying anyway :)
 
Finally, before I get back to playing with servo drives, I'll say that
the work the eLua team (and Ralph with pbLua) has done looks very
impressive -- it's certainly not easy to find time to do this work
after doing a regular job.

Thanks! :)

Best,
Bogdan