: ''consider merging the following section to [http://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontroller#Which_PIC_to_Use Which PIC to use], to gain the advantages of [http://communitywiki.org/ConsolidateInformation consolidating information].''

: ''consider merging the following section to [http://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontroller#Which_PIC_to_Use Which PIC to use], to gain the advantages of [http://communitywiki.org/ConsolidateInformation consolidating information].''

Revision as of 23:32, 25 November 2008

Contents

Microcontrollers

First, a few definitions:

a CPU is something that can execute software programs. The earliest CPUs were built out of many parts, but now most CPUs are microprocessors.

a microprocessor is a kind of CPU that all fits on one integrated circuit. The earliest microprocessors, and some famous kinds of microprocessors still being made, fill the entire chip, and so require external RAM and ROM/FLASH memory. But now most CPUs sold are microcontrollers[1].

A microcontroller is a kind of integrated circuit that, in addition to the CPU, also includes RAM and ROM/FLASH memory on a single die/package.

A microcontroller is a little computer on a single Die/Package. The computer includes a CPU core, RAM, ROM/FLASH, and peripherals including UARTS, A/D converters, SPI, and I2C. Microcontrollers differ from microprocessors in that the microporcessors generally have bigger more powerful central processing units, but need support chips for ram, rom and other peripherals. Most modern microcontrollers use FLASH ram instead of a ROM so they can be programmed over and over. Many modern microcontrollers allow self-flashing to enable bootloading or a firmware update without pulling the chip from the circuit or using a programmer/debugger. Microcontrollers tend to be more optimizated for writting in assembly than PCs, but C and Basic are becoming more standard programming languages.

General

Many hobbyists use microcontrollers, sometimes even multiple microcontrollers, in their projects.
Prices have fallen below $5 for the cheapest 32-bit microcontroller and below $1 for the cheapest 8-bit microcontroller.

The number of PIC models is huge so it is worth saying a few words on how to choose a PIC.

Things to consider as a hobbiest or making a small production run:

Microchip tends to produce the same chip with minor variations. The exact same chip with the exact same pinout may be available in 8k, 16k, or 32k flash. Spend a few extra pennyies and take the best.

SMT parts take practice to work with, so beginners should focus on DIP package parts with <= 40 pins. On the other hand, SMT parts can yield simpler and smaller PCB designs so they are worth consideration even for a hobbiest.

Contrary to common sense, older parts are often more expensive then newer parts.

Consider if a free/student version of a C compiler is availible. Microchip provides free/student student versions for the 18f,dsPIC/PIC24, and PIC32.

High End 32bit RISC CPU for multimedia purposes (system clocks up to 200 MHz and more)

AP7000, AP7001, AP7002, AT32UC3A0128/0256/0512, ...

A lot =), see atmel.com for futher details

Especially the ATmega series is very easy to use and is the best processor for beginners. All small chips are available in the easy to use DIL package and combined with an AVRDragon for about 60€ everybody with a budget of about 70€ is able to build and debug his own microprocessor applications. The AVRDragon allows you to debug all ATmega & ATtiny processors with less than 32k flash using DebugWire or JTAG and to program all ATmega / ATtiny devices using HVPP, ISP and JTAG.

Development Boards

Development Boards are printed circuit boards that contain a microcontroller and enough circuitry to get it going, typically at least some of the following: clock, voltage regulator, reset button, communications chip, buffer amplifiers, led's, prototyping area, and/or off chip connections. Sometimes the manufacturer of the chip sells development boards ( often called evaluation boards ). Development boards can be really basic, just enough to make the processor run, with connections to the IO pins. Or the boards can include communications, displays, input buttons etc. Often you can jump start a project by using a development board that does the boring standard stuff and let you focus on your project. The development board can let you use high density parts and surface mount parts that you might not want to mess with. The BitWacker kit from SparkFun is priced close the to the total price of the parts. This is probably true of some other development boards as well. Note that some development boards require you to build them they have not been made available as kits, some come both ways.