|
|
View Full Version : most popular microcontroller?
hey everyone,
I am thinking of abandoning my breadboard trainer project as it has become trivial. I can buy a chip to do everything I was planning on engineering (function generation, voltage regulation, h-bridge, ect)
so, if I abandon that project, I want to do something else. since I have had one class on microcontrollers (using the Motorola 68hc11, old, I know) I would like to mess around with them. maybe make a remote control car, or something.
so, I figured that if I mess around with micro controllers, I may as well use one that I may some day use as an EE. which leads me to my question: what is the most popular microcontroller? :D
thanks,
Cato
Good question. I have a feeling if you ask 50 people, you'll get 50 different answers, with all of them claiming theirs is definitely best and most popular. As for me, I'm a PIC fan. They have dozens of models with different pin compatibilities, different I/O schemes, and some decent clock rates too. They're not really well suited for any real processessing, but as the name implies they make damn good controllers.
-AntonK
superluminal 07-09-06, 09:11 AM Microchip also supplies free tools (MPLAB) and has a nice cheap programmer you can get from DigiKey. As Anton says - they make damn good controllers for smaller embedded applications.
yeah, I was thinking PIC, but not really sure. also, do you know of any emulators for them? I have an emulator for the 68hc11 on my laptop, so I can write code, load it into the virtual ram of the virtual 68hc11 board, and display the signals on any of the pins I choose. it would be nice to have the same thing for whatever microcontroller I decide to use.
or do you think I should mess around with the 68hc11 more, since I have another microcontroller class in the fall, and we will probably use the 68hc11
Blue_UK 07-09-06, 01:22 PM The MPLAB software available from Microchip.com for free has a simulator component. You can set watches.... step through code... present artificial stimulai on the various input pins.. etc... etc...
The pic ranges are a little old but by no means obsolete. Microchip now produce dsp microcontrollers too.
I found the PICDEM2 project board extremely useful in learning to program PIC18's.
Advantages of Pics: Many on-board periferals such as: system clock, ADC, EEPROM, timers, PWM and comparators. VERY cheap Easily available Easy to use Very small models available (Less than 1mm height, although the DIPs you'll use to practice are normal DIP size)
Disadvantages: No inbuilt FPU (but they can do IEEE floating point, all the C compilers know the algorithms) Not much RAM (can use external though) Slow (40MHz for the 18 range, 20MHz for the 16... more than enough speed for basic control aplications though)
superluminal 07-09-06, 02:39 PM The MPLAB software available from Microchip.com for free has a simulator component. You can set watches.... step through code... present artificial stimulai on the various input pins.. etc... etc...
The pic ranges are a little old but by no means obsolete. Microchip now produce dsp microcontrollers too.
I found the PICDEM2 project board extremely useful in learning to program PIC18's.
Advantages of Pics: Many on-board periferals such as: system clock, ADC, EEPROM, timers, PWM and comparators. VERY cheap Easily available Easy to use Very small models available (Less than 1mm height, although the DIPs you'll use to practice are normal DIP size)
Disadvantages: No inbuilt FPU (but they can do IEEE floating point, all the C compilers know the algorithms) Not much RAM (can use external though) Slow (40MHz for the 18 range, 20MHz for the 16... more than enough speed for basic control aplications though)
Yep. But being a RISC machine, suprisingly fast given the clock speeds, especially if you're used to CISC machines.
how much ram can I put in the PICDEM2. how much is on the chip for that matter (pic18)?
Blue_UK 07-09-06, 04:28 PM A simple PIC micro controller unit is about £2 / €3. A PIC18 can be about twice that if you want the top end. The DSP chips are twice again for the top-of-the range model. However, you rarely need the top model. So chip cost is not an issue.
A PICDEM2 starter kit (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2519¶m=en025315&page=wwwPICmicroDemo) comes at about £60 or so. If you're happy spending around £100 to get some good understanding then go for something like that. If you are cheap like me, buy or make a simple programmer. I have a £20 Velleman programmmer / experiment board (http://www.google.com/search?hl=en&q=velleman+k8048&btnG=Google+Search&meta=).
Extra memory? You can add as much as you like so long as you can design the interface. Simple PICs are 8bit native, but it's easy to make them work memory chips of higher bit counter / address (think multiplexers and latches).
You can interface whatever you like with the PICDEM2 board so long as it has CMOS or TTL interface (e.g. 5V = H, 0V = L or close enough) . At uni I have personally used stepper motors and LCDs with the PICDEM2 board with a PIC18F chip in it. To connect hardware to the outputs you use transisters or power MOSFETs obviously.
I hope I have not made this sound too hardcore - it's simple stuff once you've got it working once.
does the Velleman K8048 come with memory on it, or will I have to add it? what is the alrgest number of pins you can get on it? 28?
how about this? dose it look good?
http://www.vellemanusa.com/us/enu/product/view/?id=522869
the one you were talking about, as for as I can tell, only did pic16. whereas this one does pic18 as well.
BASIC Stamp:
http://www.parallax.com/html_pages/products/basicstamps/basic_stamps_about.asp
I don't know BASIC, I only know C and C++. is it possible to use it with C?
I looked it up. it seems you can use C =].
I think I may bid on this:
http://cgi.ebay.com/BS2-Parallax-basic-stamp_W0QQitemZ200005197782QQihZ010QQcategoryZ5091 5QQrdZ1QQcmdZViewItem
does that seem like a good choice to you guys? I mostly want to do little simple wheeled robots (at first anyway). I may work up the courage to put IR TX/RX so I can make my little robots see walls. I have already done that on the schools robots, but they were assembled by people who knew more about what they were doing =].
here are some specs:
http://www.warburtech.com/basic.stamps/basic.stamp.bs2-ic/
I don't think anyone mentioned Mikroelektronika (http://www.mikroe.com/en/). I found their free book excellent for a beginner. They have development systems and compilers (including C). You can even download the free version. If I had more time to pick up PIC MCU again as a hobby, I would definetly buy the EasyPIC 3 board.
BASIC Stamp sucks. Their expensive and limitted. There is a vast array of cheap flash PICS which are easy to learn and program. And because PICs are so inexpensive, you don't have to worry about frying them during testing.
Blue_UK 07-10-06, 08:09 AM The EasyPIC3, from dsdsds' link looks superb.
No PIC experiment board I have heard of comes with extra memory - but don't get hung up over mem, you won't need more than what's on the PIC anyway unless you are doing some serious data capture.
The Vellemen link you posted looks quite cool as a programmer for a limited range of components. I bought the K8048 because it was cheap and although it can only handle some of the 12F and 16F range that is all I wanted at that point.
The 14-bit PIC range (12F6XX and all 16F) only has 35 simple instructions, so I thought K8048 was a good place to start. (edit: that's 14 bit per instruction, PIC chips use a seperate array of 8-bit slots for RAM/registers)
My next step, personally, will be to get/build an ICD2 debugger. With one of these you can use MPLAB to program any MCU from Microchip that supports in-circuit serial programming (i.e. 99%). I'll then build my projects from scratch rather than develop on an experiment board.
yeah, I think I am going to get one of these:
http://www.maplin.co.uk/Search.aspx?criteria=N36AC&DOY=10m7
compared to the 68HC11E9 I am used to, it rocks. moreover, it is quite cheap. I will probably get a cheap RC car from walmart and stick it on.
what do you guys think of this?
http://www.olimex.com/dev/
worth $25?
sorry, bad link. the fames mess it up. this is the one I was talking about:
http://www.olimex.com/dev/pic-p40.html
or do you think I should go with a 28 pin? I can get them both for the same price, and since the microcontrollers themselves are cheap, I figure "why not?"
what do you think? should I get it?
MetaKron 07-10-06, 07:07 PM sorry, bad link. the fames mess it up. this is the one I was talking about:
http://www.olimex.com/dev/pic-p40.html
or do you think I should go with a 28 pin? I can get them both for the same price, and since the microcontrollers themselves are cheap, I figure "why not?"
what do you think? should I get it?
That Olimex board is only for 40 pin types. It won't program any other size without an adapter. It's not really a programmer, it's an inexpensive breadboard that is programmable.
I like parallel port programming because it's compatible with 5 volts.
This I think is still a good place to start: http://www.covingtoninnovations.com/noppp/
Look at how the programmer works and look around for other plans. I don't know if you want to start with just the basic 16F84A type. If you do, the more modern version is the 16F628A. In spite of Covington's claims, these are not that obsolete. Microchip has come out with an even dumber and cheaper chip that is still fast and suitable for many applications.
I have to get busy with something. A little later I can give you some advice on how to tweak the NOPPP so that it actually works. The best thing about this is that it does enable in-circuit programming on your breadboard.
That Olimex board is only for 40 pin types. It won't program any other size without an adapter.
I know, thats why I said "or should I..." ;)
It's not really a programmer, it's an inexpensive breadboard that is programmable
hmm, what is the difference? I used a Motorola 68HC11E9 (talk about out dated). I simply compiled my C code into a .s19 and loaded it on via a program called Hyper Terminal. I would like to have a similar system with whatever I buy. I am sort of new to setting up a microcontroller. the one I used was set up and ready to go.
MetaKron 07-10-06, 09:56 PM The difference is that it is slightly more difficult to use the breadboard to program your experimental chips. If its price is satisfactory to you, have at it. The link I gave you has a workable programmer and links to David Tait's site, which has one that works through the serial port. The download includes the schematics.
What I used to do was hotwire Covington's NOPPP so I could work it without removing the chip from the breadboard. I was using the 16F84A. It's a good idea to put resistors in series with B6, B7, and the MCLR. Those are CMOS inputs. They don't draw any real current. You can finagle what you want to do with the 5 volt supply, but you have to turn it off and then on again to reset the chip before programming. Also, when programming, the PIC chip must not have a large power supply capacitor attached to it. There's some kind of problem that can occur if the power supply voltage rises too slowly.
Covington's site has a link to Windows software for the programmer. He also mentions a $49.99 development system from Microchip that includes a C compiler. Here is the link that works:Pic Kit 2 (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805) Don't use "Buy It Now." Scroll down the page.
The difference is that it is slightly more difficult to use the breadboard to program your experimental chips.
I am still fuzzy as to what "more difficult" means.
Also, when programming, the PIC chip must not have a large power supply capacitor attached to it. There's some kind of problem that can occur if the power supply voltage rises too slowly.
so I should use a battery pack while programming?
Blue_UK 07-11-06, 09:07 AM It will be more difficult because that board does not come with any LEDs or Switchs. For the money, you'd be better off with something else unless I've missed something there.
You can used a power supply (either take the side of your comp. case off and hook into the PSUs power with crocodile clips, or buy one for £10 as you'll need to anyway with something like the Velleman). PICs come with all kinds of fancy powerup options like brown-out detect and powerup timer to ensure an acceptable working voltage is maintained before running. In the case of the Velleman, an on-off switch is present, so there will be no power discrepency as the capacitor charges intitially, so long as you don't turn it on within a few ms of plugging it in!
If you really want to use PIC18 ranges go for the easyPIC thing. That looks awesome (esp. with the graphical display option) as it can obviously program many types of PIC.
The Velleman K8048 is really good for getting to grips with PICs. It's also good soldering practice if you get the non-ready made version. With the supplied software in addition to MPLAB and the HI-TECH PICC ansi C compiler (student version) you learn the basics for a mere £20 (+soldering, delivery, etc. etc.).
I may even get one of those easyPIC or easyPICds demo boards myself, acutually. Trouble is, I've spent too much money on electronics recently!
I can get this one:
http://www.olimex.com/dev/pic-p40.html
for $19 shipped on ebay, fully assembled. i can solder well, I don't really need practice. I can solder surface mount stuff. =]
couldn't I just put my own switch on it? moreover, why do I need the LEDs? if I can find a program to compile my C code into the right format, and a program to load it onto the chip, I don't really need anything else.
Blue_UK 07-11-06, 01:40 PM The LEDs are to simulate outputs. You could just add whatever you want to that board separately I suppose.
One thing though, ICD2 is really useful. The K8048 does not support ICD2.
MetaKron 07-11-06, 04:39 PM Metakron:“
The difference is that it is slightly more difficult to use the breadboard to program your experimental chips.
”
I am still fuzzy as to what "more difficult" means.
Metakron:“
Also, when programming, the PIC chip must not have a large power supply capacitor attached to it. There's some kind of problem that can occur if the power supply voltage rises too slowly.
”
so I should use a battery pack while programming?"
Interrupt the line between the big capacitor and the processor to reset. Make sure you have something like a .1 microfarad capacitor across the processor too. When the program tells you to insert the chip into the programmer, interrupt the line with a switch or whatever you like, then turn it on again. If the programmer is not NOPPP, you might have to do something different.
The difficult part comes in when you realize that you will probably want to use a solderless breadboard to work out a lot of your circuits. You really won't want to keep moving it back to the programmer all the time. Whatever programmer you use, you can run the ground, the 5 volt supply, and the data lines to the chip. Just solder them to the breadboard/programmer and run them the way you like them. The breadboard is just fine too. I was thinking that you could use your favorite design from the net and just use junkbox parts.
Here is something that might help a lot of programmers: I don't think that the capacitors on the lines from the parallel port help anything. I couldn't get the NOPPP to work with them, but it worked find without them. Another trick is that a lot of these chips default to low voltage programming mode. You can use five volts where it says 12.5 volts. Don't take my word, check. Also, there is a slight chance that your parallel port is of the open collector type, something you won't see these days. Then you will need the resistors on the line for pullup.
I see your point about wanting to use a solderless breadboard. perhaps I should buy this:
http://www.sparkfun.com/commerce/product_info.php?products_id=21#
and simply cut off the excess board on the upper left, and attach 2 edge connectors (or whatever they are called) to the I/O pins via some data ribbon. then I can connect the I/O pins to a breadboard easily and consistently.
p.s. it is ICD compatible (I am not so sure about ICD2, I will have to look into it.
MetaKron 07-11-06, 10:06 PM I see your point about wanting to use a solderless breadboard. perhaps I should buy this:
http://www.sparkfun.com/commerce/product_info.php?products_id=21#
and simply cut off the excess board on the upper left, and attach 2 edge connectors (or whatever they are called) to the I/O pins via some data ribbon. then I can connect the I/O pins to a breadboard easily and consistently.
This one (http://www.sparkfun.com/commerce/product_info.php?products_id=25) looks like the only one that includes an onboard programmer and it looks like that programmer can be cabled to the other boards with the cable you can also buy. You can also cut one of those cables to use with a solderless breadboard if you'd rather.
yeah... I am still not sure what an on board programmer is. I mean, I know what it does- allows you to load and run your programs without removing anything. but, how would one program a chip without an on board programmer?
also, I would like more than 18 pins, either 28 or 40. that way I will never need to upgrade.
MetaKron 07-12-06, 06:10 AM yeah... I am still not sure what an on board programmer is. I mean, I know what it does- allows you to load and run your programs without removing anything. but, how would one program a chip without an on board programmer?
also, I would like more than 18 pins, either 28 or 40. that way I will never need to upgrade.
The ones that don't have an onboard programmer either require that you hook the board up to a programmer or that you program the chip on a programmer then move it to the board.
The trouble with buying any particular pin count is that you are stuck with that unless you buy another board. So figure out which one you want and buy that.
this one (http://www.sparkfun.com/commerce/product_info.php?products_id=25) looks good, but I would like more pins.
this one! (http://cgi.ebay.com/K149-USB-Powered-Microchip-PIC-Programmer-16F628-16F877_W0QQitemZ270007225742QQihZ017QQcategoryZ466 1QQrdZ1QQcmdZViewItem) looks good. I don't see any reason to dislike this board, but if there is some reason, let me know.
MetaKron 07-12-06, 04:14 PM this one! (http://cgi.ebay.com/K149-USB-Powered-Microchip-PIC-Programmer-16F628-16F877_W0QQitemZ270007225742QQihZ017QQcategoryZ466 1QQrdZ1QQcmdZViewItem) looks good. I don't see any reason to dislike this board, but if there is some reason, let me know.
It looks like it has everything. You see, any circuit you build using any of the flash programmable PICs can use the ICSP standard, but you may have to fiddle iwith it a bit. Just figure out how to get to the data I/O pins, the reset, and 5 volts and ground, and how best to prevent overloading the +5 volts from the programmer. I used to use ICSP from a homebuilt programmer to program right on the solderless breadboard. There isn't much to it.
The programmer on Ebay has a six pin connector for ICSP. It also fits all PICs with legs on them. If I were you I would get an extra cable and fix it to use with solderless breadboards. You also want to make sure that the pinout of the cable matches the boards you use, or build an adapter.
MetaKron 07-12-06, 04:43 PM this one (http://www.sparkfun.com/commerce/product_info.php?products_id=25) looks good, but I would like more pins.
That is the one you can run a cable from to any of the other boards that they can sell. The other boards won't program the chip unless you use that cable. The others will.
The other boards won't program the chip unless you use that cable. The others will.
what? you confuse me with your use of "others" =]
Just figure out how to get to the data I/O pins, the reset, and 5 volts and ground
I was thinking of using 2 20pin ribbons, and either close them in the ZIF, or solder them to the bottom. that way they will always be in the same order as the chip's pins, and I can attach it to a solderless breadboard (or whatever).
MetaKron 07-12-06, 05:01 PM Well I know that I think I thought I said, or something like that ;)
Do what works for you. The Sparkfun breadboards have the six pin connector on them. They can be run to the PG-4 board and programmed through it. The one on Ebay has the same kind of connector but I don't know if it has the same kind of pinout.
well, thanks for all the help looking for microcontroller. I may need help in the future if something does not work right.
anyway, any suggestions for cool projects? I was thinking about getting some IR stuff and making a little car that will see walls and turn. I have already done that with a 68hc11, although the robot was pre assembled. a little code modification and I should have it.
Blindman 07-12-06, 10:10 PM How about the lego Mindstorms NXT. New from lego, it is in my opion the best robotics development kit out there. Heaps of third party software, hardware and more. You can make your wall seeking robot out of the box in half a day.
One dude even created a rubic cube solver
<img src="http://mindstorms.lego.com/uploads//72bae2eca6ec50375ba001a93e6787fcimage21.jpg">
Note the lego cam and the USB IR port to control the 2 RCX controlers. The vision brain is a standard PC and the controlers control turning of the cube.
When your done playing with your robot you can take it apart and start on your next project.
eh, I don't really want to use legos. they are great and all, but it juts looks childish. I don't think I will have any problem putting together the projects, I just need help figuring out what to do first, and second, and third... =]
kazakhan 07-13-06, 05:54 AM Picaxe (http://www.rev-ed.co.uk/picaxe/) seem to be gaining in popularity, haven't used them myself.
I already purchased this one (http://cgi.ebay.com/K149-USB-Powered-Microchip-PIC-Programmer-16F628-16F877_W0QQitemZ270007225742QQihZ017QQcategoryZ466 1QQrdZ1QQcmdZViewItem) yesterday, but thanks for the input =]
I am just trying to think up projects now.
|