Editing Microcontrollers

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:
 
First, a few definitions:
 
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 in microprocessors.
+
* 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 single [[Integrated Circuits|integrated circuit]] that includes an entire CPU. In the earliest microprocessors, and some famous kinds of microprocessors still being made, the CPU fills the entire chip, and so require external RAM and ROM/FLASH memory. But now most CPUs sold are in microcontrollers[http://www.circuitcellar.com/library/designforum/silicon_update/3/index.asp].
+
* 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[http://www.circuitcellar.com/library/designforum/silicon_update/3/index.asp].
* A '''microcontroller''' is a kind of microprocessor that, in addition to the CPU, also includes RAM, ROM/FLASH memory, and digital I/O on a single chip. Many microcontrollers also have a UART, analog to digital convertors, and even comparators on the same chip/die/package.
+
* A '''microcontroller''' is a kind of microprocessor 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 often including UARTS, A/D converters, SPI, and I2C. Microcontrollers differ from microprocessors in that the microprocessors 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. Most modern microcontrollers support in-system programming (ISP) or in-circuit serial programming (ICSP) or some similar protocol to enable a programmer/debugger to burn a program (often a bootloader) into the microcontroller after the microcontroller has been soldered in, without pulling the chip from the circuit.  Many modern microcontrollers allow self-flashing to enable bootloading or a firmware update without using a programmer/debugger.
 
 
 
Unlike PCs, which have a wide range of programming languages available, microcontrollers have only a few programming languages available -- C programming language, Basic programming language, Forth programming language, assembly language, and (on a few microcontrollers) Python programming language.
 
 
 
Microcontrollers and microprocessors only understand machine code and compilers regardless of type all translate the program to machine code. Machine code, while tedious to learn and device specific, is the most efficient.
 
 
 
People often have strong opinions about their favorite programming language[http://embeddedadventures.blogspot.com/2008/04/4compilers.html].
 
  
  
 +
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==
 
==General==
Line 31: Line 24:
  
 
Somebody always thinks their microcontroller is the best microcontroller, so we have listed all of them as best.
 
Somebody always thinks their microcontroller is the best microcontroller, so we have listed all of them as best.
 +
 +
 +
[http://www.ladyada.net/library/picvsavr.html "PIC vs. AVR"]: "OK, I know what you people want. You want ultimate fighting, embedded E.E. style. You want to know WHICH IS BETTER, PIC OR AVR?"
 +
 +
 +
 +
[[MC RS232 Comm|Some notes on Microcontroller RS232 Communications]]
  
 
== Microchip PIC ==
 
== Microchip PIC ==
 +
The best microcontroller.
  
 
* [[PIC Links]] A bunch of links to PIC based information and projects
 
* [[PIC Links]] A bunch of links to PIC based information and projects
Line 39: Line 40:
 
* [[DsPIC30F 5011 Development Board]]  
 
* [[DsPIC30F 5011 Development Board]]  
 
* [[Microchip]] PIC32 32 bit FLASH microcontrollers
 
* [[Microchip]] PIC32 32 bit FLASH microcontrollers
* PIC based [[Demo board]]
 
  
 
: ''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].''
Line 49: Line 49:
 
Things to consider as a hobbiest or making a small production run:
 
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 pennies and take the best.
+
* 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.  
 
* 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.  
 
* Contrary to common sense, older parts are often more expensive then newer parts.  
Line 103: Line 103:
  
 
== Atmel AVR ==
 
== Atmel AVR ==
 +
The best microcontroller.
  
Atmel's line of 8 and 32-bit RISC microcontrollers are extremely easy to use and a great choice for beginners. With four series&mdash;ATtiny, ATmega, ATxmega, and AVR32&mdash;there is a large variety in price, processing power, and size, making it simple to meet a variety of needs. Many small chips are available in a [[DIP]] package that allows for quick prototyping and breadboard use.
+
The AVR series is split into 4 different types:
 
+
{| border="1"
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.
+
| Series
 
+
| Description
=== [[ATtiny]] ===
+
| Processors
 
+
| Facts
Small and somewhat lacking in I/O, but still quite powerful (20MHz System Clock, 20MIPS, 64MHz Fast  Peripheral Clock). Ideal for small spaces, limited resources, or a tight budget.
+
|-
 
+
|ATtiny
Features include 10bit ADCs, USI, 8/16bit timer, PWM, I²C, SPI , BOD, and WDT.
+
| Small (2 Ports or less) 8 bit RISC PU but extremely powerful (20MHz System Clock, 20MIPS, 64MHz Fast  Peripheral Clock)
 
+
| ATtiny25/45/85, ATtiny 26/46/86, ...
=== ATmega ===
+
| 10bit ADCs, USI, 8/16bit timer, PWM, I²C, SPI , BOD, WDT, ...
 
+
|-
Middle of the road AVR with a good amount of I/O and a large amount of processing power.
+
|ATmega
 
+
| Powerful 8bit RISC PU with up to 10 IO Ports and up to 256k flash (20MHz system clock, 20 MIPS)
Features include 10bit ADCs, USARTs, 8/16bit timer, I²C, SPI, BOD, and WDT.
+
| ATmega88, ATmega16/32, ATmega640/1280/2560, ATmega1281/2561, ...
 
+
| 10bit ADCs, USARTs, 8/16bit timer, I²C, SPI, BOD, WDT, ...
Processors:
+
|-
 
+
|ATxmega
* ATmega88
+
| Extremely powerful 8/16bit RISC CPU with up to 10 IO Ports and up to 256k flash (32 MHz system clock, 32 MIPS)
* ATmega16/32
+
| ATxmega64A1/128A1/192A1/256A1, ATxmega64A3/128A3/192A3/256A3, ....
* ATmega640/1280/2560
+
| 12bit ADC, 12bit DAC, 16 bit timer, USARTs, SPI, I²C, DMA, Real time clock, crypto engine,..
* ATmega1281/2561
+
|-
 
+
|AVR32
=== ATxmega ===
+
| High End 32bit RISC CPU for multimedia purposes (system clocks up to 200 MHz and more)
 
+
| AP7000, AP7001, AP7002, AT32UC3A0128/0256/0512, ...
Geared toward application that require a large amount of processing power or a large number of I/O.  
+
| A lot =), see atmel.com for futher details
 +
|}
  
Features include 12bit ADC, 12bit DAC, 16 bit timer, USARTs, SPI, I²C, DMA, real time clock, crypto engine.
+
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.
  
Processors:
 
 
* ATxmega64A1/128A1/192A1/256A1
 
* ATxmega64A3/128A3/192A3/256A3
 
 
=== AVR32 ===
 
 
High performance 32-bit microcontroller for multimedia purposes, with system clocks of 200 MHz or more.
 
 
Processors:
 
 
* AP7000
 
* AP7001
 
* AP7002
 
* AT32UC3A0128/0256/0512
 
 
=== Links ===
 
 
* [[Arduino Links]] Arduino is a development board based on AVR Microcontrollers
 
 
* [[Atmel]] AVR 8 bit FLASH microcontrollers
 
* [[Atmel]] AVR 8 bit FLASH microcontrollers
 
* [http://www.atmel.com/products/AVR/ Atmel] ATmega & ATtiny
 
* [http://www.atmel.com/products/AVR/ Atmel] ATmega & ATtiny
 
* [http://www.atmel.com/products/AVR/default_xmega.asp Atmel] ATxmega
 
* [http://www.atmel.com/products/AVR/default_xmega.asp Atmel] ATxmega
 
* [http://www.atmel.com/products/AVR32/ Atmel] AVR 32
 
* [http://www.atmel.com/products/AVR32/ Atmel] AVR 32
* [http://makecircuits.com/blog/2009-03-23-simplest-atmega8-programmer-using-lpt-port.html Simplest AVR programmer Using LPT Port]
 
  
 
== Development Boards ==
 
== 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.
 
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.
  
*[[Chalk Roach]] based on AVR Atmega32
+
*[[Chalk Roach]]
*[[Arduino Links]] Arduino is based on AVR Microcontrollers
+
*[[Arduino Links]]
*[[USB Bit Whacker]] This is a PIC 18 based system  ... can be used with [[BitWacker Java Communications]]
+
* [[USB Bit Whacker]] ... can be used with [[BitWacker Java Communications]]
 
*[[RS232 Dev Board]]
 
*[[RS232 Dev Board]]
 
*[[dsPIC30F 5011 Development Board]]
 
*[[dsPIC30F 5011 Development Board]]
* [http://www.gogoboard.org GoGo Board] based on PIC18F4550 (via [http://www.blikstein.com/paulo/index.html Prof. Paulo Blikstein]): "an open-source platform that is designed to be low-cost and allow for local assembly by those who are interested." All parts are through-hole (even the USB connector). KiCAD PCB design files.
 
 
  
 
Other demo boards: see [[demo board]].
 
Other demo boards: see [[demo board]].
  
 
== Cypress PSoC ==
 
== Cypress PSoC ==
 
+
The best microcontroller.
* Cypress PSoC 8-bit and 32-bit FLASH microcontroller + mixed-signal array on one chip.
+
* Cypress PSoC 8 bit FLASH microcontrollers.
  
 
External Links:
 
External Links:
* [http://www.psocdeveloper.com/forums/ PSoCDeveloper] -- friendly electronics discussion forums from beginner to advanced level, but focused on PSoC devices.
 
 
* [http://en.wikibooks.org/wiki/Embedded_Systems/Cypress_PSoC_Microcontroller Wikibooks: Cypress PSoC]
 
* [http://en.wikibooks.org/wiki/Embedded_Systems/Cypress_PSoC_Microcontroller Wikibooks: Cypress PSoC]
* [http://www.sparkfun.com/commerce/product_info.php?products_id=8480 SparkFun: Gainer PSoC Development Board] including USB interface -- looks very similar to the [[Arduino Links | Arduino Nano]], but it can do a lot more.
 
  
 
== ARM ==
 
== ARM ==
 +
The best microcontroller.
  
 
* [[Image:lpc2103.jpg|69px|LPC2103]] [http://www.k9spud.com/arm/lpc2103/ LPC2103] Low cost 70MHz ARM7TDMI-S FLASH Microcontroller from Philips. The  [http://coridiumcorp.com/arm7/ "$49" "Coridium ARMmite"]  does use this chip.
 
* [[Image:lpc2103.jpg|69px|LPC2103]] [http://www.k9spud.com/arm/lpc2103/ LPC2103] Low cost 70MHz ARM7TDMI-S FLASH Microcontroller from Philips. The  [http://coridiumcorp.com/arm7/ "$49" "Coridium ARMmite"]  does use this chip.
 
* the [http://www.open-research.org.uk/ARMuC/ ARM microcontroller wiki].
 
* the [http://www.open-research.org.uk/ARMuC/ ARM microcontroller wiki].
 
There are no ARM chips currently manufactured in a through-hole package -- they are *all* surface-mount.
 
However, there are many "adapter boards" aka [[demo board]] that make them easier to use, such as:
 
* low-cost ARM demo boards at NGX Technologies: [http://shop.ngxtechnologies.com/index.php?cPath=21]
 
* $10 STMicroelectronics’ STM32 Discovery Kit with ARM® Cortex-M3 microcontroller [http://www.st.com/internet/com/press_release/p3065.jsp] [http://www.st.com/internet/evalboard/product/250863.jsp]
 
* [[Motherboards that run Linux]]
 
  
 
== further reading ==
 
== further reading ==
 
* [[Microcontrollers for Beginners]]
 
* [[Using ADCs]]
 
* [[Microcontroller Serial Communications Articles]]
 
  
 
* [http://www.instructables.com/id/How-to-choose-a-MicroController/ Instructables: How to choose a MicroController]
 
* [http://www.instructables.com/id/How-to-choose-a-MicroController/ Instructables: How to choose a MicroController]
* Thomas A. Coonan. [https://web.archive.org/web/20120117133103/http://www.mindspring.com/~tcoonan/design.html "Microcontroller Design Checklist. Or, My Top Seven uController Issues"].
 
* [http://www.digikey.com/techxchange/thread/4280 "Help Me Select a Microcontroller"].
 
 
* [http://en.wikibooks.org/wiki/Embedded_Systems/Particular_Microprocessors#brief_selection_guide Wikibooks: brief selection guide]
 
* [http://en.wikibooks.org/wiki/Embedded_Systems/Particular_Microprocessors#brief_selection_guide Wikibooks: brief selection guide]
 
*[http://www.veys.com/index.php?title=Main_Page Main Page] May have been a one man effort, now dropped.  Has a bit of content that looks good.
 
*[http://www.veys.com/index.php?title=Main_Page Main Page] May have been a one man effort, now dropped.  Has a bit of content that looks good.
*[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell University ECE 4760 Designing with Microcontrollers Final Projects] A ton on projects.
 
*[http://forum.allaboutcircuits.com/showthread.php?t=21358 Which uC (Microcontroller)? - discussion]
 
*[http://www.ladyada.net/library/picvsavr.html PIC vs. AVR Ultimate fight]
 
* [http://chiphacker.com/questions/1092/whats-the-difference-between-a-microcontroller-and-a-microprocessor Chiphacker: "What’s the difference between a microcontroller and a microprocessor?"]
 
* [http://piclist.com/techref/piclist/begin.htm "Beginners checklist for PIC Microcontrollers"].
 
 
 
[[category:microcontroller]][[Category:Components]]
 

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)