Too many microcontroller to choose from! HELP!
March 21, 2006 11:26 AM   Subscribe

Which company should I go with for microcontrollers?

I learned how to program in assembly with Microchip microcontroller when I was in school. I loved the functionality of their microcontrollers but hated the assembly.

Now I'm in the work force and I am wanting to apply microcontrollers to various projects I'm working on. I'm looking for general purpose microcontrollers. There is such a large range of brands out there that I'm not sure which one to choose.

I would like to find one that is relativly cheap and easy to get various size LCD's to work.

Should I go with Microchip? So many choices I'm really overwhelmed.

I'd prefer to write my applications in C and not assembly. I would also like it if there were a lot of libraries of code for doing things like I2C communication and LCD control. It would also be nice if there were a wide range of products to chose from.

The last application I was needing a microcontroller for was a voltage indicator for a capacitive discharge welder we use to weld our thermocouples. A basic microcontroller w/ analog input and a small LCD is all I need for something like that.

Another application would be a data logger. I'd also like to be able to plug into a CAT5 10/100 network or bluetooth wireless.

I'm working at a test facility. We don't do product production, so discounts in quantity don't help us much. I handle single-one-time-application projects and need to find a good chip provider for that.

What do you use? HELP!
posted by nickerbocker to Technology (9 answers total)
A lot of people still use Pics, but that's a little too oldschool for me :)
I'd suggest the Atmel AVR or the TI MSP430. They're low power, pretty simple, microcontrollers and both have a lot of code available out there. They come in flavors with LCD drivers built in (I know that Atmel's AT91 series comes with Ethernet drivers built in too, not sure about the AVR or MSP430). If the quantity is really going to be that low, you might even be able to subsist on their free samples alone.
The toolchains aren't super-expensive, and there's always the GCC option available if you run out of free trial time.
posted by pantsrobot at 12:39 PM on March 21, 2006

I'm an old EE currently masquerading as a patent attorney, but I just got back to my roots by putting together an embedded development environment to program ARM-based microcontrollers. You can get cheap & powerful systems at SparkFun. They also have PICs and AVRs, a bunch of cool chips, modules, and other stuff. Plus they operate a low-volume PCB fab service that I've used a couple of times. Fun, indeed.

(No relation, except as a satisfied customer.)
posted by spacewrench at 1:08 PM on March 21, 2006

If your only problem is the fact that you don't like to program in assembly langue, you can still use Microchip. There are various C compilers available for Microchip controllers.
posted by koenie at 1:14 PM on March 21, 2006

CCS has a PIC C compiler for $125; Hi-Tech Software has a free, limited feature version.

I've used PICs a fair bit and so would be curious to hear how some of these other controllers compare.
posted by pombe at 1:30 PM on March 21, 2006

AVR is nice. There are free compilers based on the great "GCC". AVR is the first microcontroller I used. I've done stuff like LCD displays, stepper motor controllers, and even a little B&W video generation.

I recently got an ARM STAMP, also programmable with Free tools, but I haven't done anything substantial with it. The higher clock speeds and larger RAM (actually only 16K in the model I bought, but that's a lot compared to 128 bytes in the AVR I've used the most.

I really recommend choosing a chip that you can use a high-quality "C" compiler on, rather than using assembly language. That depends what you're most comfortable with, though. I'd really rather use a HLL like Python, but microcontrollers aren't quite there yet.
posted by jepler at 1:38 PM on March 21, 2006

Another you might consider is the old standby Zilog. They have a wide range of microcontrollers from simple to complex with built in SRAM and Flash memory. Interfaces include analog converters, I2C, SPI and UARTs. They also have a large library of application code.

The best thing is that they have incredibly cheap development systems. You get a working development board with microcontroller, ANSI C compiler, debugger with debug hardware, and power supply for about 40 bucks. If you buy the kit from Digikey you can have it the next day.
posted by JackFlash at 2:13 PM on March 21, 2006

I am really tempted to go with Microchip's PIC. They have a starter kit for about $50. And the fact that I am already familiar with the assembly language is a bonus (although all RISC based assembly is basically the same stuff).

AVR also looks appealing, but they seem really focussed on purchasing mass quantities. There is a contest that starts this month with AVR and Circuit Cellar.

I've noticed that the high end PIC's have an "LCD Module." What is that about? I thought you utilized an EEPROM + I2C bus communication to work with LCDs?

Anyway, looking at a couple of these I'm seeing that the development environments are relativily cheap to start out. I was worried that it would be quite an investment. I guess if I'm not satisified with what I choose, then I can go another route later.

Thanks for all your input.
posted by nickerbocker at 5:36 PM on March 21, 2006

What sort of LCD are you talking about? Are you talking about a text only LCD? Both serial and parallel LCDs are very easy to interface with in the PICs, and I'd assume they're just as easy with the AVR line as well.

From your question, its unclear how long ago you were in school. Currently, text LCDs mostly (99%?) use a H44780 chipset for character input, its simple enough that programming from the data sheet is doable, and because they're standard, there are enough examples online that you should be fine.
posted by adamwolf at 7:55 PM on March 21, 2006

I'm another fan of the Atmel AVR. I've written a lot of PIC assembler and some AVR assembler but like being able to use gcc (free, very high quality) to compile C for the AVR. The competing C compilers for PIC are costly and don't generate as good code.

Also, the AVRs are cheaper per unit (even when buying small quantities), they operate at much higher speed (mostly single cycle instructions, unlike PIC which are 4 clocks per instruction) and they usually have many more features on the chip for a given price. You don't buy the chips direct from AVR or Microchip, you hunt around for the local electronics store. No idea who that is for you

You can probably get cheap AVR starter kits from your local electronics store: someone is selling (here in Adelaide) an AVR kit for AUD50 that includes a small AVR, LCD, programmer, compiler stuff and documentation on a CD.

How you communicate with LCDs depends on what sort they are. The most common are the Hitachi HD44780 which use a parallel bus (4 or 8 bits wide) and a couple of control pins (R/W, EN, etc). You just connect the pins directly to a couple of ports on your micro of choice and clock some ASCII characters into them. Some LCDs have an HD44780 integrated with a UART and expect a serial connection of some sort, usually RS-232 but there are also I2C (and whatnot) variants. Graphical LCDs are a whole nother ballgame; the only one I've used is a bitmapped display (8 dots/byte) with a physical interface very similar to the HD44780 in terms of bus mechanics.

Ethernet is quite tricky since you'll most likely want to use IP and TCP over it, which requires significant quantities of code. Such code can be obtained but you don't want to underestimate the trickiness of it all. A simpler option there is to use a pre-built web-server like SitePlayer. One of those can handle the ethernet/IP/TCP/HTTP part of it and you interface the device of your choice (probably another micro) to it using RS232 or some GPIO pins.
posted by polyglot at 8:25 PM on March 21, 2006

« Older Where to find Civil War suits?   |   Digital SLR Newer »
This thread is closed to new comments.