Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Good Beginner Micro Controller

Status
Not open for further replies.

psecody

Member
well I am pretty new to the whole micro controller part of electronics (heck IC's still give me problems sometimes) but I was really wanting to get one to play around with and just experiment with. My first thought was to buy a BASIC 2 stamp with the board of education dev board but now I've been reading all these people talk about pic processors. What would the best micro controller be for a complete beginner just to do simple stuff with? Should I get the BASIC 2 or something else? Programming will be no big deal because I know C++, Java, Basic, and some others.
 
There are many ways to go.

Since you already know C++ I would suggest that you may be happier using a C language development system.

Look at the UBW (USB BIT WACKER) **broken link removed**. You can build the thing yourself of buy a ready made one from sparkfun for $25. The thing comes with a bootload that can download your compiled code over USB. The microchip C18 (student version) compiler is free as is the MPLAB development toolset.

If you want to run an in circuit debugger such as the ICD2 (and clones) you can use the UBW as a target. They run from about $35 (inchworm kit) to about $200 for USB based versions.
3v0
 
Last edited:
From SparkFun, I picked up one of their simple $12 serial programmers, a 16F876A, and a crystal. (Stupidly, I didn't get any small caps to use with the oscillation...) For programming languages, I didn't want to jump right into ASM because I suck at it, so I downloaded SourceBoost (**broken link removed**. The IDE download comes with a C, C++, BASIC, and PASCAL compiler and the full license isn't TOO expensive for BoostC ($70 for a full no-limits license). Check it out, I've liked it so far.
 
Basic Stamps are a waste of time really. I prefer AVR's myself (Made by a company called Atmel) The architecture is a little more elegent in my opinion, and there isn't such a landslide of devices to chose from so picking an individual device is a little easier. Something like a Tiny12 or Tiny13 are only 8 pin devices, the I/O is limited but they're still a very good learning experiance and cheap. Less than 2 bucks per chip. There's a development board for the entire DIP package AVR line called the STK500 which has switches, LED's onboard oscilators an RS232 port that's converted to logic level, and a dedicated RS232 port just for programming.
The STK500 runs 80 dollars the chips and comes with a couple sample AVR chips to program (bigger 20+ pin ones) The development environement is a free download from their web site with a built in assembler and AVR GCC is a C program. Best bang for your buck in my opinion.
 
Does the AVR STK500 have a usb version by any chance because I am on a laptop and kinda don't have serial ports....
 
I'm with Sceadwian- BASIC Stamp is a waste of time. It is a grossly inappropriate setup for any real use and makes it so you don't learn much but their setup. The nasty part is they keep saying how tough it is to learn assembly (and don't even mention C) and IMHO it's doing a disservice to students by misrepresenting the field.

Microchip's C18 ("MCC18") is indeed pretty good.

PIC18's actually don't have a really confusing array of likely possibilities. Unless you've got a special project, the really common general-purpose ones are 18F1320 (like 14 pins I think), 18F2520 (28 pin), 18F4620 (40 pins) IMHO. 18F2680/4680 if you want CANBus. Doesn't hurt to get a bigger part (more memory) than you think you need at first.

Some may disagree with this, but I strongly recommend not mucking around with homemade or "bargain" programmers. Go to Sparkfun and get the cheap clone of the ICD2 (the $99 one). $99 is actually pretty cheap. It's not just a very reliable, supported programmer, the GREAT thing is the In-Circuit Debugging part allows you to read everything it's doing. Really makes debugging 100x less confusing.
 
Last edited:
thanks for the info. After looking at all the chips my main problem is I want a programmer thats A. USB and B. Is basically a "developement board" like the board of education that the basic stamp came with. I was lookin into the PIC's but I couldn't find something like this dev board for them thats why I was leaning more toward the AVR but I still haven't decided yet. Any recommendations for a dev board like that for the PIC's? Also the fact that the PIC's were like 5 bucks helped it alot as opposed to the BASIC stamp being like 30 bucks.
 
You might check my PIC tutorials?, no 'need' for an expensive dev board!, if you do want one there are plenty available - probably far more than other processors?.
 
psecody said:
thanks for the info. After looking at all the chips my main problem is I want a programmer thats A. USB and B. Is basically a "developement board"...

In the past when microprocessors needed support chips like memory and A2D converters a development board was very helpful. The PIC processors are for the most part 1 chip solutions. Many do net even require a crystal. Most development boards just add a few switches and LEDs.

A pic in a solderless breadboard is a very good place to start. The USB ICD2 clone (program and debug) mentioned by another poster is at
http://www.sparkfun.com/commerce/product_info.php?products_id=5

If you can do without in circuit debugging the UBW I mentioned in my first post can get you going for $25

Or you can build on yourself
**broken link removed**

3v0
 
Thanks I'm not sure if I would need the debugger, can you explain how it functions? Thanks also I was looking at the Bitwhacker and it says you plug it into windows pc. I don't use windows because its a pain to deal with most of the time (I'm dual booting windows and mac right now but I really hate to use windows.) So are there any programmers and stuff that are good for mac? Sorry for so many questions. Thanks for everything.
 
psecody said:
Thanks I'm not sure if I would need the debugger, can you explain how it functions?"
Debuggers make the debugging process much easier and faster. An "In Circuit Debugger" provides run control. It allows you run and single step your program at the C (high level) or machine code level as it executes on your processor (not a simulator). This is done via hardware and/or software breakpoints. It also allows you to view data (memory). For general info on debuggers see https://en.wikipedia.org/wiki/Debugger

"Thanks also I was looking at the Bitwhacker and it says you plug it into windows pc. I don't use windows because its a pain to deal with most of the time (I'm dual booting windows and mac right now but I really hate to use windows.)

Microchip provides a development environment including C compiler for free. But it runs on the PC. I think there are open source efforts to create a similar tool for the non PC world. Not sure how far along they are.

If you have a USB port on your mac you can get it working there. Not sure how packaged the info is. Visit

Regardless of which processor family or development board you choose, check out the tools, info and hand holding you can get on the mac side. It will be at least a bit harder to find the tools and get them working on anything other then a PC. There may be execptions. Some will be easier then others.

You may want to start on a windows machine till you get a handle on things. Then move to the mac.

3v0
 
The AVR Dragon might be a sollution if you want something with a native USB interface. It is much smaller, and actually a bit more full featured than the STK500 as far as it supports Debugwire and Jtag debugging interfaces as well as emulation of all AVR devices with 32k or less memory. It's more of a programming tool than a development board though, the main thing it lacks is LED's push buttons and well plugs =) The connector side of the board is shipped blank and you provide your own interface connectors (which have to be soldered on). Basically IDC style jumpers. But even if you have to buy all the extra's to make it equivilant to an STK500 such as a breadboard and some LED's and resistors and what not it's going to cost you the same as Digi-key sells the Dragon for 49 dollars. I don't think it comes with much of anything except the board and a CD with their development software, but it's only been out for a few months now and Atmel will likley support it as a development/programming tool for a long time.
 
If you don't want to spend that much money on a starting setup both PIC's and AVR's can be programmed with home built programmers (a few resistors and transistors) on a parallel port.
 
ok so out of the PIC or the AVR which would be better overall, like would be better down the road even if it is harder to learn? And price of programmers and stuff doesn't matter really as long as its not obscenely priced ($200+) but I would prefer that the chip be relatively cheap like sub $5.
 
It comes down to a matter of personal preference really. I prefer AVR's and they do have some advantages over PIC's in their architecture, but PIC's have been around for a very long time and have a bigger market share. Down the road it doesn't matter which you stick with so much. Once you've gotten the basics of either AVR or PIC's down it's easy to switch to the other if required.
 
Ok now whats confusing me is after looking at the AVR's there sre so many different kinds and also do I need a controller or just the chip? Like this website is whats confusing me https://www.futurlec.com/BasicControllers.shtml the controllers look like boards with the chip mounted with other components whats this for? https://www.futurlec.com/ET-AVR_Stamp_Board.shtml This is what I was looking at buying but now I'm confused, will that program the chip, whats the controller its talking about? Sorry for all the stupid questions but I want to get something really good and make sure its right.
 
Those are basically teaching modules. They have support circuitry like LED's and switches and looks like a buzzer and interfaces for an LCD. But the chips are built into the board aren't are removeable, and it's basically only the one device that's on it you'll ever be able to program. There are a LOT of boards like that out there, made by a LOT of different companies, and even weekenders that just know how to build PCB's and assemble a few bits. And if you think there are a lot of AVR's you should see how many different kinds of PIC's there are =) It is a bit overwhelming. The ET_AVR looks like a decent module, but it says you have to purchase a programmer for the board as well. The STK500 looks similar though no breadboard space, it does have tonnes of headers for external connections though, but it will program all DIP sized AVR's that exist. You insert the chip into the board and it programs it, it can also progarm the chip while it's in a circuit you've built but you need to read up on that. I would recommend downloading the PDF file for the STK500 development kit from Atmel's website as well as the PDF file for a simple but full featured AVR such as the Tiny15. Read them both from cover to cover.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top