Let's Make Robots!



All my projects, robotic or otherwise, have been created using the Arduino. I use it because it's simple, simple, easy and fast, and well simple. but I want to stop splashing around in prototype land and stop having to dissect all my projects to get the Arduino back just so I can start on my new projects. I want to use a microcontroller by itself!!!! 0.o

 Before I jump ahead of myself I need to learn more about microcontrollers. Everything I read online is about PIC or AVR specifically, and why their better than the other >.<.... however I want a more vague description of what a Microncontroller is and how it works. I understand that many of them run on different architectures and configurations, however, (correct me if I'm wrong) most of them contain several different internal parts such as clocks, flash memory, ADC, ect, in common, and that's what I want to learn about.

 QUESTION: Do you know of a book, article, tutorial, or other, that explains the interworkings of a generic microcontroller?

That's basically it. I don't want to pick between PIC, AVR, 8051, ect yet, I just want bare bone information. I COULD research each part by itself, and if you think I should do that, then I will, but if there's a place where all that wonderful information is all together...I think I'll pretty much be really happy about that exsiting...



Thanks in advanced,


P.S. If you have a specific recommendation on a particular microcontroller that I should focus on, let me know. I want to program in C however, so Picaxe is out of the question...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

PICs, AVRs, Basic Stamp 2, PICaxe are all very popular. Basic Stamp has incredible support, PICaxe has flowchart programming and other stuff. PIC and AVR are similar, different stuff for different preferences.

I use PIC's. Maybe because I have 3 different families available to me in mass quantities, or because im afraid of spoiling myself with a PICaxe or Arduino. Ive also dabbled in a little of the 8051 land but gave up because most variants dont have onboard oscillators and are generally more expensive.

I would suggest using pics if you are going to start going that way, Mass support everything you need a code example of is out there beleive me, plus all the design software is free!!! The programmers are very low cost generally less than 50 USD. There are pics with anything you could imagine on them, I2C, USB, A/D, PWM, EEPROM, Pullup resistors on inputs, just about everything. They are relatively cheap too, most mid range devices costing 1-2.50 usd.

Most modern microcontrollers are based on the "Harvard Architecture" which was developed by intel in the late 70's early 80's (1980 I think, its been a while since school).

Although I havent found any decent books pertaining specifically to microcontroller programming in C, there are many many books out there that will teach you the general idea. Btw most compilers use ANSI C which is the base of all C programming. Try not to get a book with C++ or any other variant as some functions may not be supported by all compilers.

Alright I've rambled enough, hope this gives you a decent start.

I felt as though a force was pushing me towards using PICs....that or there's just a heck of a lot more people using them, and a crap load more information out there. I just requested a book from my library ( and it's cheap on amazon, I almost bought it before I thought to check the library) called: Programming and Customizing the PIC Microcontroller. You've probably heard of it. I think it might help, if not, then what the hay?


Thanks for the insight!


I thin kthere's a shedload of info out there on pics. Mostly because it's freely published by the manufacturer. Microchip made the unusual move of publishing technical documentation on all their products, AND they even give you a comprehensive FREE development environment.

Picaxe has a bootload prommed into it. It's a sort of Operating System, which allows it to run BASIC programs, which is great for artists who want to mkae robots, but it can be limiting.

If you truly want to use microcontrollers, assembly is the only way to go. 31 commands in the Microchip RISC set. You could learn it in a day.

Oh, and Microchip will give you batches of 15 pics FOR FREE and they pay the postage.

All you need is a $20 programmer and you're off.

...but I'm biased.

What? 15 PIC's for postage? Show me. Assembly can be hard to learn, I use C but he can try what he wants.

Microchip will send you 3 samples of any four of their devices (OKay, so it's 12, not 15) if you go to their samples website.

I look at it this way: How many C commands are there? 31? 32? Well, Microchip RISC has only 31 commands (or 33 depending on the PIC).

So, you have code libraries (much like C).

Couldn't be easier. In fact, I think that writing C for a microcontroller would probably be more complicated than assembler, because you still have to have a mechanism for doing all the low level stuff.


They'll allow me to sample 3 of any two devices....

Dont be scared, code cant hurt you, only the evil serial killer robot you put it in can. Just taje your time and dont be afraid to cook/break stuff, you only learn from your mistakes (although you soon forget what you learned and do it again).

I will also look into that book, my boss has been bugging me for months perhaps even a year now to learn C and rewrite the code for our products, even trying to bribe me, I need the cash so ill prob pick it up.

Oddbot put it the best.  What you decide to use may boil down to price.  A recommendation would be to research what you are interested in and compare the cost of the chip and the programming software.  I know with the PIC there are some free compilers out there for C and basic but they are code or line limited.  With most of the AVR chips the software is free.  For the 8051 you can use Bascom AVR to program it which happens to be significantly cheaper than software for the PIC micro.  Also, consider the architecture that offers you the features that you are looking for.  For me, I use a combination of PIC C from CCS, MBasic from Basic Micro, and Pic Basic Pro from Melabs.  All of them have their pluses and negatives.  The majority of my design work is done with the PIC.  I have also used the Parallax Propeller for some designs as the chips themselves are reasonable and come with true multitasking cogs (it'l like having more than one micro on a single chip).  Also, look for whatever examples and review material that is abundantly available to you.  It would be very discouraging to plop down your money for software that you find difficult to use.

This is just my 2 cents.

I understand what you're saying about price. That is one of my concerns....However, I have no previous experience with microcontrollers except for the Arduino, so now I just want to learn the basics. Once I'm able to understand the basics I feel that I'll be able to acknowledge the differences between different microcontrollers and then I'll be able to, more accurately, determine which one is more appropriate for my application and price range. I'll have to do some research...



Edit 01.19.09 1430


Wow. PICs are way more expensive than their comparable AVRs...that concerns me.

Idk...I'm starting to rethink things....