Author Options:

Microcontroller Help!!! Answered

I want to connect a microcontroller to LEDs to make them blink. I know how to wire LEDs and how to write computer programs, but I don't know which controller to use, where to get it, or how to wire it. Any help?


Thanks. This helps a lot.

just a personal preference, use AVR, you find a lot more help on the web, I think the software is easier to use, it's more powerful, more widely used, and more power efficient

Or something like a Basic Stamp II or Picaxe is something simpler is required.

I've never used Picaxe, but Basic seems a bit expesive to me, at that point I'd wrather get an arduino or an arduino clone

I've somewhat asked the same question lately. Some instructables post a code for lke a regular 555, some use AVR. I have never programmed before. I assume avr can only be programmed on AVR chips? and a regular ne555 can only be programmer on like a JDM?

A 555 isn't a uC, it's just a chip that produces a digital pulse, a timer.

ah, so for all my projects I wont have to worry about programming microcontrollers, excluding projects that require code of which i could put onto an AVR?

well, here a brief run down a lot of people (when programming) program in C. C is a language for code C is then compiled into a hex file, which is then programmed into the uController For the 555 speed and duty cycle is just based on 2 resisors and a capacitor

alright, but do AVR, picaxe, stamp etc... all use C-compilers? Or if I want to do a project that requires an AVR and a project requiring a Picaxe, I would need different programmers and compilers.

I'm no expert; I've used AVRs and some Cypress uCs... But yeah, generally different microcontrollers all require specific hardware to upload data into the chips. Sometimes it's very simple, sometimes not. But different, yes. If you can build your project(s) with only one "flavor" of micro controller, that's a plus... Same with programming languages. AFAIK, all "bare" micros (as they arrive from the factory) can each be programmed with their respective assembly languages for free. Not so for higher-level programming languages (BASIC, C, etc.) Most of those higher level languages cost $$$. AVRs are an exception-- avrgcc is a completely free C compiler. However, some BASIC and C variants have free demo compilers; the PIC, for instance. Usually there's an upper limit to the code size the "free" compilers will produce--but you'd be surprised how much code you can cram into 2K or 4K.... Assembly language code isn't portable, of course. The source code for languages like C won't be portable, either. Micros are quirky, and compilers use proprietary ways to solve issues (and save memory) that would never be added to the ANSI C specs... You couldn't take the source code from a avrgcc project and compile that with Imagecraft C, even for the same AVR chip. Or vice versa. Forget about using code from a PIC in an AVR (doesn't imply that much of the code couldn't be adapted, of course.) I differentiate the "bare" micros from the "composite" ones: those that add something to the bare chips to create a "new" microcontroller. Some, like the BASIC stamp have complex hardware additions. Others, like PICAXE or the Arduino can work alone, but essentially have souped-up firmware installed (almost a mini-operating system.) But even those chips need specific hardware--usually as a convenience (the standard programming interface for the Arduino is USB--but the pre-programmed AVRs need support hardware such as a crystal, which the "bare" chip doesn't require.) You can program an Arduino with a simple ISP interface, but at that point, you're in essence using it a "bare" AVR chip...

Each target platform (AVR, PIC, Windows) that uses C will have a different compiler. Different chips, however, will usually use the same compiler. You can also program in assembly, which lets you get right down into the code, but I don't reccomend it for beginners :P

hmmmm, I'm not sure, I think the most knowledgable person hereon the topic is gmoon

collectively, everyone here constitutes a pretty decent knowledge base...

Picaxe are programmed in BASIC, usually via the serial port of your PC. I built my rig myself, it's only a couple of resistors and a home made cable needed to program it. The code is very easy to learn and there's a good community on the PICAXE forums for those willing to learn.