English French German Italian Portuguese Russian Spanish

v1

Survey

Which microcontroller family do you prefer?
 

Did you know?

Electrocution is one of the top five causes of workplace deaths.

Forum elektronika, schematy, porady, naprawa

FacebookTwitter

 

Home > General description > Communication > What is microcontroller?
(2 votes, average 5.00 out of 5)
General description - Communication
What is microcontroller? 5.0 out of 5 based on 2 votes.

 

microcontroller architecturWhat is a microcontroller?
The best way to explain what a microcontroller is, is to start with your computer. Your desktop computer (or laptop) is comprised of multiple parts, a CPU (such as a Pentium or Celeron), some RAM, a hard disk, a keyboard and mouse and a monitor screen. Programs are stored on the hard disk and run on the CPU, with temporary data stored in RAM. You can run multiple programs at a time by having one 'master program' called an operating system (such as Linux, Windows or Mac OS X) and that master program keeps track of things for you.
 
The microcontroller chip has components, too. It has a CPU, some flash storage, some RAM and some EEPROM, all in one little chip!. The CPU is just like the one in a computer, but its much simpler and not nearly as fast (what do you expect for $2.50?) The flash storage is just like the flash storage in your mp3 player or digital camera card, except its used to store programs. Its kinda like the hard disk of the microcontroller, except you can only read from it. The RAM is just like computer RAM. The EEPROM is kinda like flash except you cant run a program from it, but its used as long term storage. The EEPROM doesnt get erased when the chip loses power.
 
So, to recap: The microcontroller chip runs whatever program is stored in the flash, uses the RAM for temporary storage and the EEPROM for longer term storage.
 
Most computers have a 32-bit CPU running at 1GHz, with 1GB of RAM and 100 GB of storage. The kinds of microcontrollers discussed here run at 10MHz, have 1KB of RAM and 10KB of storage. (On the order of) However, their small size, lower power consumption and low cost make them an excellent choice for many projects!
 
How to do something
OK so now that its clear what microcontrollers do, how do you get it to do something?
 
Well first off you have to write a program (or have someone write one) that tells the chip what to do.
Then you have to compile it, that is, turn the program description into machine code.
Next you program the chip using a programmer, which will trasfer the machine code to the device
Test, debug, repeat!
 

this text is partially taken from

 

www.ladyada.net


 

 

Related Posts:
UART - usage of registers
The Universal Asynchronous Receiver Transmitter (UART) module is one of the serial I/O modules available in the dsPIC30F device family. The UART is a full
Microchip Expands dsPIC® DSCs for Digital Power and Lighting Applications
  New Family of dsPIC33 “GS” Digital Signal Controllers Enable Full Digital Control for Cost-Sensitive Power-Conversion Applications.Microchip Technolo
An amazing event gathering fun, high technology, friendship, creativity, education and passion!
  Created in 1998, Eurobot is a international amateur robotics contest open to teams of young people, organised either in student projects or in independen