Getting started with microcontrollers and etc?

Alterscape

Weaksauce
Joined
Nov 13, 2003
Messages
78
I'm a total n00b to the electronics hobbyist scene, but I've seen some neat-looking projects involving PICs around, and my housemate is building a Basic Stamp-powered maze-running robot for his mechatronics final project, so I'm starting to get curious. I took shop in high school, and built a few gizmos with simple transistor logic on project boards earlier, but no experience beyond that, nothing with ICs and nothing with microcontrollers. I haven't got any specific projects in mind yet, but I'd like to gain some knowledge. I've been working with interactive installation art, and it seems like the ability to custom build simple programmable devices might be really useful.

If I wanted to learn, what would you reccomend buying, and where? I've already found AVRFreaks, and I'm looking around there at the basic tutorials, and I already have a soldering iron and so forth, but what would you reccomend in terms of useful components? Is there any place to buy a good supply of project boards and components, maybe a "starter kit" package deal?

Also, what differentiates a $5 microcontroller like the ATMega-16 from a $100 Basic Stamp? I know that's probably a ridiculous question, I'm guessing it involves the amount of available memory and input and whatnot..

Any reading material you can reccomend? I'm not adverse to paying for dead trees, but online material is more easily useful..
 
Probably the best option to start with if you don't know C or assembly is PICAXE, they are cheap microchips that you can write BASIC code for and load on with a 3-wire cable.

The difference between a $5 microcontroller like the ATMega-16 from a $100 Basic Stamp is that the micocontroller is a bare chip completly blank, where as the basic stamp have a "boot loader" that interpret the code, so the company who designed them is making money out of the time they invested in designing the boat loader. (thats AFAIK, may not be 100% correct though)
 
1) absolutely buy a book. http://www.amazon.com/exec/obidos/t...=sr_11_1/104-6228917-3539118?v=glance&s=books Is a decent one that was recommended for a MechE class. It will get you fairly up to speed with how everything works.

The difference between the ATMega-16 and the Basic stamp is that the ATMega-16 is just a chip. The basic stamp usually includes a 'power supply', a breadboard and a serial interface. Some contain more, some contain less.
The basic stamp i had to use for a MechE robot was only capable of positive integer math, which can be a great burden if you are trying to do anything complicated.

Alterscape said:
Also, what differentiates a $5 microcontroller like the ATMega-16 from a $100 Basic Stamp? I know that's probably a ridiculous question, I'm guessing it involves the amount of available memory and input and whatnot..

Any reading material you can reccomend? I'm not adverse to paying for dead trees, but online material is more easily useful..
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
For the record, I know Java, and a smidge of C. In one of my CS classes, I wrote a simple compiler to generate "pseudo-assembly" from "pseudo-c," so I'm decently competent with pushing and popping and all that. Thanks for the link to the book! :)
 
I think it comes down to how much money you are willing to invest.

Basic Stamps may be slightly easier to learn and you are more likely to find people with experience, but that platform is substantially more expensive.

I am an AVR fan myself. They are dirt cheap and clock for clock will run circles around basic stamps. I note you have discovered the AVR Freaks site; it is a wealth of information on the platform.

Although I started on breadboard, I have also ordered some of the development boards like this one for only $20 from a company named Futurelec. I had no problems with them, but I think they are simply an importer and occasionally some orders take a week or two to fill.

I'm too lazy to learn C or assembly for my projects, so I fall back on Basic. MCS Electronics has a great Basic IDE, and you can download a demo version that will program up to 2k for free (You can do a lot in 2k on uc's).

Good luck with whatever platform you choose - it's a great and interesting hobby!
 
Over on AVRFreaks, they seem to say good things about the STK500 dev board, which costs $80 from Digikey. I can probably talk the 'rents into fronting me the cash for one for christmas, because they usually have no idea what to get their strange artsy college kid these days.. ;) Where should I look to compare something like the STK500 to the ATDevBoard you linked? I'm just wondering what set of capabilities I really need, and so forth. It -looks- like the STK500 is a more complete solution with a serial interface cable and etc included in the kit, plus diagnostic LEDs and so forth, but.. I don't know...

Also, if I were looking to make a bulk purchase of useful things to play with (resistors, transistors, caps, diodes, LEDs, etc), what would you suggest? Just make a bulk digikey order? Or what?

Finally, I'm interested in is using an AVR to control a hobby servo motor, and to dim/fade a number of LEDs. Both of these applications require analog output. Where would I learn what sort of ICs I'd need to convert digital output from the AVR into analog voltage control?
 
i'm an AVR fan myself... you can use C for it but you're going to need a decent book to learn. AVR's are extremely powerfull though, i absolutely love them. get a book called "Embedded C Programming and the Atmel AVR" by Barnett, Cox, & O'Cull if you want to learn about AVR's, it will take you from knowing nothing to being proficient at C programming and knowing the ins and outs of AVR's completely.

PICs are another option, which i would also highly recommend, exspecially if you are knew to the game. They only have like 36 assembly instructions, and half of those or more you probably won't use... pretty easy to learn overall. easy to program, cheap, etc. the added bonus is you can easily get free samples of different PICs from www.microchip.com ... and will have a good basis in assembly languages afterwords. Also, some british guy i know from another forum created this site: http://www.winpicprog.co.uk/ which has excellent tutorials on PICs... go through that and you'll be a pro. If you want to jump right in and don't have alot of money to spend, this is definatly the way to go, exspecially since you can get free PICs.

I'd avoid basic stamps simply because of the cost... and i really see no need for them in any application you'd possibly want.
 
I've had the chance to program both AVR's and PIC's. They'll both get you about the same thing, just depends on how much you want to invest. During our senior design project, we chose the AVR's because they were cheaper, bought an STK200 dev kit (the STK500 was a little out of our range at the time!), and used CodeVision AVR C compiler http://www.hpinfotech.ro/ . That and the forums on AVRFreaks really helped us out.
Now, I work for a company that uses PIC's. We use a C compiler from a company called CCS (http://www.ccsinfo.com/picc). It's o.k. and gets the job done, but can be irksome because it's not ANSI, there are a ton of beta versions and bug fixes put out, and a license isn't cheap for the upper-end stuff. They do have an extremely knowledgable and helpful user group, though. Microchip does make a compiler for their chips, http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014. I haven't coded with it, though, so that's about all I know.

Bottom line, if you're looking for a cheap way to get in to programmable micro's, Atmel may be the way to go.
 
Back
Top