SparkFun Forums 

Where electronics enthusiasts find answers.

General suggestions or questions about the SparkFun Electronics website
By andygoessling
#4985
I'm looking for an easy to use and program microcontroller for general projects. I have done some robotic projects with a BASIC STAMP 2, some IR emmitters and detectors, and continous rotation servos.

Could someone please make a case for one or the other? Using BASIC to program would be very nice. And having lots of other people using it would be nice to so I could find example code and other resources. Thanks for your help.
By upand_at_them
#5013
This argument has been done. And done and done and done and done. And here's the result:

1) Pick one.
2) Use it.

Mike
By JamesC
#5014
I also started out with Basic stamps and outgrew them pretty quickly.

I don't think you'll have a problem finding resources for example code, for either PIC or AVR, but you should expect that most sample code out there for both of these chips will be in either C or assembly.

Both Microchip and Atmel offer free IDE's that support Assembly out of the box, but other languages will require a compiler.

Personally, I choose AVR because the GCC compiler was available for it, both on Linux and Windows platforms, and seems to work very well. This is a C compiler (which I prefer greatly over basic for a lot of reasons), and its 100% free.

There were other differences that are of more interest to someone who might work in assembly or write a compiler. AVR's hava a flat memory model, *many* more general purpose registers, 1 cycle average per (machine) instruction, compared to 4 for most PICs. Although you can stay blissfully unware of these things if you work strictly in a higher-level language, they definately do affect performance. These were also things that pushed me toward AVR.

I've heard nothing but good things about Bascom AVR, but I couldn't tell you much about it. It does appear to be much more sophisticated and flexible than stamp basic.
By Caffeine
#5018
Started out with BASCOM AVR, and it's great if you want to get something up and running straight away. I also use GCC-AVR for most of my stuff.

Additionally, a programming cable for the AVR is 5 wires from your parallel port. I built one for about $3 and it's still working fine after 3 years. Good programming software (AVRDUDE) is included with GCC-AVR and there's a gui front end for it on sourceforge.
By SOI_Sentinel
#5020
PICs are what they are. They are cheap, they are plentiful, and you can probably find any array of hardware that you need in their hundreds of configurations. Now, what PIC's aren't are clock efficient.

If you're just starting out (no history with either) and planning on programming in something other than assembly (As you are, BASIC), I'll have to agree with the above and say AVR's are the way to go. If you werew plan to do a lot of assembly programming, PIC's are far simpler. There is a free student edition C compiler now for 18F series PICs, but that's just muddying the waters.
By pittuck
#5024
or u could go try the dsPIC, :D.....
By nall
#5030
i am also starting out with microcontrollers and had kind of assumed i'd use a PIC, but the pro-AVR'ers above have given me pause.

is there a webpage that discusses the tradeoffs between the two? i'd be interested in everything from architecture (discussed briefly in an above post) to the available IDEs/compilers.

i'm not looking to stoke a flame war, just trying to get some criteria together to make a good decision.
By Norman
#5047
That first link didn't work for me.

I went with the PIC, because there seemed more info on the net dealing with it, so I figured it would be a good starting place.
By Norman
#5048
On the second document, a few comments from my limited experience with the PIC:

1. The interrput model on the PIC is indeed somewhat weak. However, I don't really use all that many different types simultaneously.

2. On security, PICs can indeed be erased after being locked.

Each have limitations, so I don't think anyone is significantly better. The PIC's memory pages are somewhat of a pain, but less so on the PIC18 (or does it even do pages?)

If you have some specific project in mind, try googling for it and see of someone has code or something for one architecture (at least to learn from.)
By SOI_Sentinel
#5049
Grrr... timeout errors, I was going to comment on the second article myself with annotations, but the BB's not allowing me to post more than a sentence or 2.
By nall
#5057
Norman wrote:That first link didn't work for me.
ugh. i was afraid of that. you can go to http://www.piclist.com and click on PICList Mailing list archive and get to the page i originally posted.