Above are Atmel AT90S2313 and Microchip
PIC16F628. For the random hobbyist who wants to get into microcontrollers
these two chips represent the mid-range, mid-performing microcontrollers
most likely best suited to get their projects moving along. There
are major differences between them and also major similarities. Which one
is better to use?
To be forensic about this subject, I must
first acknowledge that I personally use PICs and would not convert to
Atmels any time soon, unless required for a job.
Secondly, I would need to acknowledge
that in some important aspects, Atmel microcontrollers are superior to
PICs. I noted the following:
Atmels execute
instructions at the clock frequency while PICs execute them at 1/4 of the
clock frequency. If both microcontrollers used a 4.00 MHz crystal
oscillator, the Atmel would actually run at that speed while the PIC would
run at 1.00 MHz. The difference seems almost trivial until you
attempt to interface to high speed devices such as video and radio
circuits.
Atmels have 118
instructions, PICs have 35. Clearly, if you are writing a program in
assembly you would like more instructions available for your discriminate
use. I would personally like higher math functions included in
assembly language but that is asking for too much.
HOWEVER - Reviewing the actual
instruction differences I noted that the extra Atmel instructions did not
affect my current PIC programs much, at least at this point in time.
Following is a quick comparison table:
I have two different conclusions, for two
different groups of people.
The first conclusion is written for
people who use either of the microcontrollers and are considering
switching to the other. My answer is : don't do it. The two chips
are frighteningly similar and the differences don't persuade me to bother spending my time
to procure resources and effort to adapt to the other. For my
little projects a PIC will do for now simply because that's what I started
out with and know best. Someone who has started with Atmels should
stick with them. It would be senseless to waste time
to convert just for minimal
gain in performance or cheaper production.
The second
conclusion addresses those who haven't used either of the microcontrollers
and would like to get started. Both chips are very similar.
Atmels are more suitable for C compilers (for those of you who are afraid
of assembly). PICs give you more bang for the buck in some aspects :
16 out of 18 pins can be I/O as opposed to 15 out of 20 pins on the
atmels. This particular PIC has an internal 4.0 MHz resistor-capacitor
oscillator that brings the external component count down since you do not
need to supply a crystal oscillator and stabilizing capacitors. The PIC
has more memory but for most applications it seems to be a negligable
difference. Less instructions doesn't mean "less complicated" or
"less sophisticated" considering the actual instruction differences and
similarities.
Neither of the microcontrollers will make your life
easier when it comes to doing complex math stuff so it doesn't really
matter. For higher speeds go with Atmels. For out-of-the-box
projects with lowest number of components, use the PIC16F628.
Before deciding to use either the PIC or
the Atmel, check out their dependencies - see how much effort it would
take you to get one working, how easy, reliable and documented is the
programmer device, and could you use the said programmer for a different
model of the chip. I say - go with the PICS simply because I started
off with them. They're simple, they're complex, they can do whatever
you want them to do.
To make an analogy that's worthy of some
angry comments, an Atmel to a PIC is a corn to a potato and toothpaste to
soap. One makes whiskey, other makes vodka. Both get you drunk.
You can't use soap to clean your teeth with and you don't want to clean
anything else but your teeth with toothpaste. Go figure.. Just my five
cents.
E-mail me with corrections/comments/angry
one-liners.