Tuesday, March 17, 2009

Programming the Microcontrollers

In this post i am going to talk about programming the MCU. There will be many link to books, sites and tutorials that will be available for your help.

Frankly speaking i am not going to describe the programming details here, but certainly i am going to discuss few books which are worth mentioning here that will help you getting expertise in programming a MCU.
Password for all the files: mbandala

The 8051 Microcontroller and Embeded System;
Author= Muhammad Ali Mazidi, Janice Gillispie Mazidi
Indeed this is one of the best book you can find about the MCUs. This book is very helpful for beginners. It gives a deep understanding of the 8051 MCU. This book is more useful for Assembly language programming as all the programs given are in Assembly language. Still this book is the simplest and best to start MCU programing.

Download Link;
http://rapidshare.com/files/123384331/The_8051_Microcontroller_and_Embedded_Systems.rar.html
Password= mbandala

The Final Word on 8051;
Author= Matthew Chapman
This book is good reference book. It will not take you in detail of MCU programming instead it gives you introduction about 8051 hardware, C, serial port, compiler and linker.

Download Link;
http://rapidshare.com/files/123384695/The_Final_Word_on_the_8051.rar.html
Password= mbandala

Programming Embeded Systems;
Author= Micheal J. Pont
This is a very simple book. Indeed a good point to start MCU programming.

Download Link;
http://rapidshare.com/files/123384286/Programming_Embedded_System_I.rar.html
Password= mbandala

Exploring C for Microcontrollers (A Hands on Approach);
Author= Jivan S. Parab
This is great bookwhich give you insight about the MCUs, IDE, interfacing with LED, hyper terminal, and different other applications.

Download Link;
http://rapidshare.com/files/123383693/Exploring_C_for_Microcontrollers_-_A_Hands_on_Approach.rar.html
Password= mbandala

C and the 8051;
Author= Schultz
This is also a good book for C programmers. This book is very detailed and you can search almost every topic from this book.

Download Link;
http://rapidshare.com/files/123383502/C_and_the_8051.rar.html
Password= mbandala

C Programming for Embeded System;
Author= Kirk Zurell
Useful for understanding how to program the MCU in C language. At the end some sample programs are given.

Download Link;
http://rapidshare.com/files/8490707/B39E6315-B741-4E89-838C-570D536B4DB5.rar.htm
Password= books_for_all

Embeded C;
Author= Micheal J. Pont
Making 8051 MCUs in focus this book is a one fo the best and most popular book and also very simple. It teaches you MCU programming in C from "Hello" program to applications.

Download Link;
http://rapidshare.com/files/123383633/Embedded_C_tutorial_-_8051.rar.html
Password= mbandala

Programming Microcontrollers in C;
Author= Ted Van Sickle
This is also a great book to read. In this book as in other books, you will find basics of C programming for MCUs as well as some advance topics including MCORE and RISC. It introduces microcontrollers and describes their programming environment, offering tips on coding for microcontrollers

Download Link;
http://rapidshare.de/files/21352479/VAN_SICKLE__T.__2001_._Programming_Microcontrollers_in_C__2nd_ed._.rar

System Design and the 8051;
Author= Marcus O. Durham
This book will not explain you each and every instruction in C but it gives you general idea of every thing you need in MCU programming.

Download Link;
http://rapidshare.com/files/123384286/Programming_Embedded_System_I.rar.html
Password= mbandala

The 8051 Microcontrollers;
Author= Kenneth J. Ayala

This is one of the best book written for 8051 lovers. This book covers topic from MCUs, 8051 architecture, programming and their applications. But the problem is that this programs are in Assembly lnguage but still you can get alot of help in understanding the MCUs.

Download Link;
http://rapidshare.com/files/123384377/The_8051_Microcontroller_Architecture__Programming__and_Applications.rar.html
Password= mbandala

The 8051 Microcontrollers;
Author= I. Scott MacKenzi

This is also a good book including 8051 architecture, timers, counters, with Assembly programs on various applications including serial communication and interrupt handling.

Download Link;
http://rapidshare.com/files/21615321/The_8051_Microcontroller_Book_by_Scott_Mackenzie.pdf.html

Programming Embedded Systems in C and C++
Author= Michael Bar
Download Link;
http://www.megaupload.com/?d=I03TGLVE


Microcontroller projects in C for the 8051;
Author= Dogan Ibrahim.
This is a great book for those people who want to start the MCU based projects without going in to details of programming, yet it gives the introduction to C and then application like LED, Buzzer, Temprature and serial communication.

Download Link;
http://www.ebook3000.com/Microcontroller-Projects-in-C-for-the-8051_22925.html

There are also many books which you can find on the internet but these books are most famous books. Start reading from the first book to the last. Do try to read the one in detail which you fin interesting.

Hope you will find this post helpful. Your comments are always welcome.

Wednesday, March 11, 2009

Programming Enviroment

First thing first. The first step in making micro controller based application is to learn programming. Because the main core of microcontroller applications is the programming. If you are expert or little intelligent in writing good programs than you would be able to handle the hardware efficiently.


For this purpose you don’t need to go into heavy bulky programs instead make small program first. The question arises here that what programming languages are available for this purpose. Most commonly used are BASIC, C, and Assembly. BASIC is now out dated and was used on early Microcontrollers, Assembly is low level language i.e. more close to machine language so its little hard for beginners to adopt this language but it the strongest of all. The one remaining is C language. It is high level language i.e. more close to human understanding so it is preferred to use, but remember every language has its pros and cons. It is preferred that you should learn only C , because it is enough for making applications regarding MCU(Micro Controller Unit). You may not need to learn Object Oriented Programming.
The good point to start learning C is a small book named; “LET US C” whose author is "Yashwant Kanetkar". This book is very simple in language and bvery very easy to learn C from this book. It has simple progams to learn and practice. This book is easily available in market and is very cheap also. You can read and download it from internet at this address;
(LET US C- Fifth Edition);
http://www.esnips.com/doc/3c2d1754-cd4c-4b90-ad23-0fcd22a49ccb/Let-Us-C---Yashwant-Kanetkar
http://kewlshare.com/dl/6bbc33d1d5bb/Let_Us_C_-_Yashwant_Kanetkar.zip.html
You can also learn C from the online tutorial available at internet. The good one is at ;
http://www.learn-programming.za.net/programming_c_learn01.html
http://cprog.tomsweb.net/
http://www.cprogramming.com
http://cplus.about.com/od/learningc/Learn_How_to_Write_Programs_in_C.htm
There are also various blogs that can help you in understanding C language.
One thing inportant that you will also need a compiler for C programming or you can say a GUI(Graphical User Interface), in which you will practice your programs and will see the output. There are also many versions of C including Borland C, Turbo C, Visual C etc. but we are talking about Turbo C more commonly known as "TC". This compiler can be downloaded from the link below;
http://webcourse.cs.technion.ac.il/234112/Winter2004-2005/en/ho_Download%20Turbo-C.html
One thing must be kept in mind that there is different between programming for computers applications and programming for MCU applications. You will see this difference when you will start your practical work. But one might ask why to learn C? Can we start MCU programming directly? The answer is that starting MCU programming at beginner level may be difficult, if one dont know the basis of C i.e. what are variables, constants, etc. then it would be very difficult to start programming directly in MCU. Also learning C from the above mentioned book is so easy that even a fresh person can easily learn this language.
Hope you will find C interesting and those who already know C language please go to the next post.

Monday, March 9, 2009

AT89C51 Description

Now let us talk about this popular 8051 chip. It has on chip ROM in the form of flash memory. This is ideal for fast development since flash memory can be erased in seconds compared to the twenty minutes or more needed for the 8751. For this reason the AT89C51 is used in place of the 8751 to eliminate the waiting time needed to erase the chip and thereby speed up the development time. To use the AT89C51 to develop a microcontroller-based system requires a ROM burner that supports flash memory; however, a ROM eraser is not needed. Notice that in flash memory you must erase the entire contents of ROM in order to program it again. This erasing of flash is done by the PROM burner itself . See the following table for its specs

The block diagram shows the internal structure of the microcontroller AT89C51;

Pin description of this MCU can be seen in the following diagram;

Port 0; is a dual-purpose port on pins 32-39 of the 8051 1C. In minimum – component designs, it is used as a general purpose I/O Port. For larger designs with external memory, it becomes a multiplexed address and data bus.

Port 1; is a dedicated I/O port on pins 1-8. The pins, designated as P1.0. P1.1. P1.2 etc. are available for interfacing to external devices as required. No alternate functions are as signed for Port 1 pins; thus they are used solely for interfacing to external devices. Exceptions are the 8032/8052 ICs. Which use P1.0 and P1.1 either as I/O lines or as external in outs to the third timer.

Port 2; (pints 21-28) is a dual – purpose port serving as general purpose I/O, or as the high byte of the address bus for designs with external code memory or more than 256 bytes of external data memory.

Port 3;is a dual – purpose port on pins 10-17. As well as general – purpose I/O, these pins are multifunctional with each having an alternate purpose related to special features of the 8051).

Now coming to the other pin functions.

PSEN;This is an output pin. PSEN stands for “program store enable.” In an 8031-based system in which an external ROM holds the program code, this pin is connected to the OE pin of the ROM.

VCC;Pin 40 provides supply voltage to the chip. The voltage source is +5V.

GND; Pin 20 is the Ground pin.

XTAL1 and XTAL2;The 8051 has an on-chip oscillator but requires an external clock to run it. Most often a quartz crystal oscillator is connected to inputs XTALI (pin 19) and XTAL2 (pin 18). The quartz crystal oscillator connected to XTAL1 AND XTAL2 also needs two capacitors of 30 pF value. One side of each capacitor is connected to the ground as shown in this figure;


EA; The 8051 family members, such as the 8751, 89C51, or DS5000. All come with on-chip ROM to store programs. In such cases, the EA pin is connected to VCC for giving power to save and erase program from the memory.

RST(RESET);The RST input on pin 9 is the master rest for the 8051. When this signal is brought high for a least two machine cycles, the 8051 internal registers are loaded with appropriate values for an orderly system start-up. For normal operation, RST is low. Figure shows permanent connections of Reset Pin.

ALE; (address latch enable) is an output pin a nd is active high. When connecting an 8031 to external memory, port 0 provides both address and data. In other words, the 8031 multiplexes address and data through port 0 to save pins. The ALE pin is used for de-multiplexing the address and data by connecting to the G pin of the 74LS373 chip.Now we will talk about what other things are inside an AT89C51 MCU;

Registers;In the CPU, registers are used to store information temporarily. That information could be a byte of data to be processed, or an address pointing to the data to be fetched. The vast majority of 89C51 register an address pointing to the data to be fetched. The vast majority of 89C51 registers are 8-bit registers. In the 8051 there is only one data type: 8 bits. The 8 bits of a register are shown in the diagram from the MSB (most significant bit) D7 to the LSB (least significant bit) D0. With an 8-bit data type, any data larger than 8 bits must be broken into 8-bit chunks before it is processed. The most widely used registers of the 89C51 are A (accumulator), B, R0, R1, R2, R3, R4, R5, R6, R7, DPTR (data pointer), and PC (program counter). All of the above registers are 8-bits, except DPTR and the program counter. The accumulator, register A, is used for all arithmetic and logic instructions.

All the registers of 89C51 are;

Timers;Both timer 0 and timer 1 are 16 bits wide. Since the 89C51 has an 8-bit architecture, each 16-bit timer is accessed as two separate registers of low byte and high byte. Each timer is discussed separately.

Timer 0 Register;The 16-bit register of time 0 is accesses as low byte and high byte. The low byte register is called TL0 (timer 0 low byte) and the high byte register is referred to as th0 (timer 0 high byte). These registers can be accesse d like any other register, such as A,B, R0, R1, R2 etc. For example, the instruction “TLO= 20” moves the value 500 into TL0, the low byte of timer 0. These registers can also be read like any other register.

Timer 1 Register;Timer 1 is also 16 bits, and its 16- bit register is split into two bytes, referred to as TL1 (timer 1 low byte) and TH1 (timer 1 high byte). These registers are accessible in the same way as the registers of timer 0.

TMOD(Timer Mode) Register;Both timers 0 and 1 uses the same register, called TMOD, to set the various timer operation modes. TMOD is an 8-bit register in which the lower 4 bits are set aside for timer 0 and the upper 4 bits are set aside for timer 1. In each case, the lower 2 bits are used to set the timer mode and the upper 2 bits to specify the operation.

Mode 2 Programming;The following are the characteristics and operations of mode 2.

1-It is an 8-bit timer; therefore, it allows only values of 00 to FFH to be loaded into the timer’s register TH.

2-After TH is loaded with the 8-bit value, the 8051 gives a copy of it to TL. Then the timer must be started. This is done by the instruction “SETB TR0” for timer 0 and “SETB TR1” for timer 1. This is just like mode 1.

3-After the timer is started, it starts to count up by incrementing the TL register. It counts up until it reaches its limit of FFH. When it rolls over from FFH to 00, it sets high the TF (timer flag). If we are using timer 0, TF0 goes high; if we are using timer 1, TF1 is raised.

4-When the TL registers rolls from FFH to 0 and TF is set to 1, TL is reloaded automatically with the original value kept by the TH register. To repeat the process, we must simply clear TF and let it go without any need by the programmer to reload the original value. This makes mode 2 and auto-reload, in contrast with mode 1 in which the programmer has to reload TH and TL.

It must be emphasized that mode 2 is an 8-bit timer. However, it has an auto-reloading capability in auto reload. TH is loaded with the initial count and a copy of it is given to TL. This reloading leaves TH unchanged, still holding a copy of original value. This mode has many applications, including setting the baud rate in serial communication.

SBUF (Serial Buffer) Register; SBUF is an 8-bit register used solely for serial communication in the 89C51. For a byte of data to be transferred via the TxD line, it must be placed in the SBUF register. Similarly, SBUF holds the byte of data when it is received by the 89C51 RxD line. SBUF can be accessed like any other register in the 89C51.The moment a byte is written into SBUF, it is framed with the start and stop bits and transferred serially via the TxD pin. Similarly, when the bits are received serially via RxD, the 89C51 deframes it by eliminating the stop and start bits, making a byte out of the data received, and then placing it in the SBUF. Some baud rates are shown below:

Baud Rate= 9600 TH1(Decimal)=-3 TH1(HEX)=FD
Baud Rate= 4800 TH1(Decimal)=-6 TH1(HEX)=FA
Baud Rate= 2400 TH1(Decimal)=-12 TH1(HEX)=F4
Baud Rate= 1200 TH1(Decimal)=-24 TH1(HEX)=E8


SCON(Serial Control) Register;The SCON register is an 8-bit register used to program the start bit, stop bit, and data bits of data framing, among other things. Following SCON bits are explained; SMO SCON.7 Serial port mode specifier
SM1/ SCON.6= Serial port mode specifier
SM2/ SCON.5= Used for multiprocessor communication (Make it 0)
REN/ SCON.4= Set / cleared by software to enable / disable reception.
TB8/ SCON.3= Not widely used.
RB8/ SCON.2= Not widely used.
T1/ SCON.1= Transmit interrupt flag. Set by hardware at the beginning of the stop
bit in mode1. Must by cleared by software.
R1/ SCON.0= Receive interrupt flag. Set by hardware halfway through the stop bit
time in mode1. Must be cleared by software.

Bit-Addressable RAM; Of the 128-byts internal RAM of the 8051, only 16 bytes of it are bit addressable. The rest must be accessed in byte format. The bit – addressable RAM locations are 20H to 2FH. These 16 bytes provide 128 bits of RAM bit – address ability since 16 x 8 = 128. They are addressed as 0 to 127 (in decimal) or 00 to 7FH. Therefore, the bit addresses 0 to 7 are for the first byte of internal RAM location 20H, and 8 to 0FH are the bit addresses of the second byte, RAM location 21H, and so on. The last byte of 2FH has bit address byte of 2FH has bit addresses of 78H to 7FH. Note that internal RAM locations 20-2FH are both byte-addressable and bit addressable. Notice from figure that bit addresses 00 – 7FH belong to RAM byte addresses 20 – 2FH, and bit addresses 80 – F7H belong to SFR P0, P1 etc.

Please refer to the following documents for detailed insight of AT89C51 MCU;

Data Sheet;

www.atmel.com/atmel/acrobat/doc0265.pdf
http://www.filedropper.com/at89c51datasheet
http://www.filedropper.com/flashmcumemorytorg

Tutorials;

http://www.filedropper.com/best8051tutorial
http://www.filedropper.com/8051tutorial

Hardware Manual;

http://www.filedropper.com/atmel8051microcontrollershardwaremanual



Friday, March 6, 2009

Atmel Microcontrollers

Hi,
In my previous post i talked about choosing a MCU. We finalized our discussion on the MCU which are easily available in market, which were PIC and Atmel. We also see that the cheapest MCU are from Atmel. So, today i m going to talk about Atmel MCU. But Before that lets see the history of 8051 based MCUs.

In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051. This microcontroller had 128 bytes of RAM, 4K bytes of on-chip ROM, two timers, one serial port, and four ports (each 8-bits wide) all on a single chip. At the time it was also referred to as a “system on a chip”. The 8051 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. The 8051 has a total of four 1/O ports, each 8 bits wide. Although the 8051 can have a maximum of 64K bytes of on-chip ROM, many manufacturers have put only 4K bytes on the chip.

The 8051 became widely popular after Intel allowed other manufacturers to make and market any flavor of the 8051 they please with the condition that they remain code-compatible with the 8051. This has led to many versions of the 8051 with different speeds and amounts of on-chip ROM marketed by more than half a dozen manufactures. It is important to note that although there are different flavors of the 8051 in terms of speed and mount of on – chip ROM, they are all compatible with the original 8051 as far as the instructions are concerned.

The following link was also given in the last post;

http://www.atmel.com/dyn/products/devices.asp?family_id=604

Now here you can see a lot number of MCU. I will describe them one by one so that the chioce can be made easy.

1-CAN Networking MCUs; CAN stands for "Control Area Network". These MCU have built-in error-detection and error-correction capabilities. Using serial Communication MCU is connected to the Network. These MCU are used for industrial purposes for automotive engine control communication in cars and buses. Similarly it is used in Automotive industry for different manufacturing processes, in avionics, in elevators and automatic doors.
So, its enough powerful. But certainly its a not good thing to start for beginners.

2-Flash (Reprogrammable) MCUs; The flash microcontrollers can be re-programmed after they are shipped. Data written to flash memory can be electrically erased, allowing new data to be written. For older types of flash memory, which use two power supplies (in addition to the power supply for VDD, a separate power supply is provided for VPP for programming), the program can be overwritten by using a dedicated flash programme. More recent types of flash memory are single power supply versions (which do not need a separate power supply for programming). Besides dedicated flash programmers, there are also other ways to program/reprogram and write new data to these devices. Also, among the microcontrollers with single power supply type flash memory that can be programmed after shipment, there are some in which part of the flash memory used to store data instead of an EEPROM. Thus, flash microcontrollers can serve a wide range of applications. more product families that use only flash memory and no longer include mask ROM.These MCU includes AT89CX family MCUs which we will use in our circuits. The detail of these and other MCU can be obtained from the address given below;

http://www.atmel.com/dyn/products/param_table.asp?family_id=604&OrderBy=part_no&Direction=ASC

If you go to the this link you can see the AT89CX family based MCUs including MCU from AT89C2051 to AT89S8253. You can use use AT89C51 MCU which is not given in the list or you can use AT89LS51/52 and AT89S51/52 from the list.

3-Flash ISP (In-System Programmable); These MCU are based on the 8051 architecture.
These MCU have the non-volatile memory (means that memory will not be washed away when the power is Off), The On-chip ISP Flash allows the Program memory to be re-programmed In-System through an SPI serial interface The on-chip FLASH memory can be programmed by byte or by block, either in parallel or in serial mode. We can use these MCU where we need to program the memory during system is running and we want to program the MCUs without removing them from the system, but certainly we are not at this level and also these MCUs are expensive.

4-Flash ISP - Single Cycle Core; For a CPU to execute an instruction takes a certain number of clock cycle. in 8051 family these clock cycles are referred to as machine cycles. THis length of machine cycle depends upon the frequency of the oscillator which we will discuss in our later posts. The 8051 CPU requires 12 clock cycles to execute a single instruction. But this family of MCU consists of high performance 8-bit microcontrollers that execute most instructions in
a single clock cycle, which certainly reduces the delay in executing the instructions. You can say these MCUs are 12 times more faster than traditional 8051 MCU. These MCU are used in battery management, universal remotre control and in industrial and motor control

5- Lightning MCU; These MCU are dedicated to Lightning control. These are not used in common applications.Application include street lightning, lightning for marriages, high intensity flourscent lamps, etc.

6-OTP (One-Time Programmable); As the name suggests, these MCU are only one time programmable, means once they are programmed they cannot be programmaed again. These MCU are used in industrial purposes and for manufacturing where the products are made and the MCU used need not to be programmed again and again. EPROM is similar to OTP memory which can be cleared or deleted using UV(Ultra Violet) rays which a user cannot, but the difference is in their packaging. But in our case we need to reprogram a MCU so these cannot be used.

7- With and Without ROM; You can understand from name that these MCU have either ROM or they are without ROM. Mask ROM versions are semi-custom products in which user programs are written to this ROM before the product is shipped.ROMless versions connect to external ROMs that are programmed for various applications. These MCUs are designed for systems that can switch among various external and replaceable ROMs, such as for testing, evaluation, etc.

8-USB MCUs; Instead of serial and parallel communication, today USB has got more popularity due to increase in data rate and ease of connecting more devices on a single port. Data transferred to the microcontroller of a device from a serial peripheral interface (SPI) can be sent directly to the PC through a USB connection.


Atmel Product Guide;

www.partsearch.ru/_files/ATMEL_GUIDE.pdf

Find the MCU according to your need;

http://www.keil.com/dd/search_parm.asp

Different questions regarding type of MCU;

http://www.necel.com/en/faq/mi_com/__com_kind.html
http://www.geocities.com/shahzadahmadmalik/guide.html

About Atmel; Founded in 1984, Atmel Corporation is headquartered in San Jose, California San Jose is the third-largest city in California, and the tenth-largest in the United States. It is the county seat of Santa Clara County. With manufacturing facilities in North America and Europe. Atmel designs, manufactures and markets worldwide, advanced logic, mixed-signal, nonvolatile memory, MCU and RF semiconductors. Atmel is also a leading provider of system-level integration semiconductor solutions using CMOS(Complementary Metal Oxide Semiconductor) Pronounced "c-moss." The most widely used integrated circuit design. It is found in almost every electronic product from handheld devices to mainframes. , BiCMOS, bipolar SiGe, and high-voltage BCDMOS process technologies.
Atmel product and financial information can be retrieved from its Fax-on-Demand service. In North America call 1-(800) 292-8635. Internationally from a fax phone, dial 1-(408) 441-0732. Requests may be sent via e-mail to literature@atmel.com or by visiting Atmel's website at www.atmel.com.
Atmel Wireless & Microcontrollers Division product information may be retrieved at www.atmel-wm.com.

Tuesday, March 3, 2009

How to choose a Microcontroller?

This is very important question when starting this course. When you consult internet for this purpose, you will find a large number of dealers and manufacturers. which makes things complicated.There are a number design considerations that might immediately reduce your number of choices a great deal.

1- The first criteria for choosing a Microcontroler is "Number of Bits"; in market you will find 8-bit, 16-bit, 32-bit MCU(Micr-Controller Unit). Here we have to make our choice. Mostly for hobbiest and learners,the 8-bit MCU is enough. so eliminating other two will make our life much easy.

2- There are four "Major 8-bit MCU". They are, Motorolla's 6811, Intel's 8051, Zilog's Z8, and PIC 16X from microchip technology. Each of these MCU are different as their instruction set and registers are concerned, therefore they are not compatible with each other. Program written for one will not run on the other. We have to choose one from these four listed previously on the basis of the following criteria. Intel's 8051 based MCU are made by many manufacturers and are radily available in market. Among them are Intel itself, Atmel, Philips, AMD, Siemens, Matra, and Dallas semiconductors. Siemens and Intel are no more manufacturing MCU. The list of these companies along with their websites is given at the end.

3-Cost per Unit; for some people this might be unnecessary but i think for beginners and students this is most important. Why to spend too many dollars for making the same system when you can make it with a single dollar?. So, price consideration is very important. You can consult your local market for this purpose, but in Pakistan the cheapest MCU are from Atmel and PIC ranging form less than a dollar(Rs. 65) to few dollars(Rs. 350). Among these two companies PIC and Atmel, the MCU from Atmel are cheaper than that of PIC, and one thing more important you can also order a free sample of the MCU you wanted from the link given at the end.

4- Availibility in Market; so far we choose MCU from Atmel but we have to see which MCU are available in market now and in future. There are many varients in Atmel MCU like those listed in the following link;

http://www.atmel.com/dyn/products/devices.asp?family_id=604

So, you have to consult your local market that which microcontroller among these are available.
I picked Atmel's AT89C51, you can choose any MCU from AT8951 series. But do check the data sheet from the link given at the end of this post.

5-Package; Is the microcontroller which we need is a 40 pin DIP or QFP(Quad Flat Package)? so this is also considered. for most of the basic application we use only 40 pin DIP not the QFP.

6- Programing Language; This is also important for beginners to consider. Whether i know BASIC, C/C++ or Assembly. So, you have to also consider which MCU support the language you want. Atmel and PIC MCU support both C/C++ and Assembly.

Similarly Power Consumption, Number of I/O Pins, Amount of RAM/ROM Available on the MCU, Availibilty of Compilers, etc are also considered for choosing a MCU.


List of Companies Making 8051 Based MCU;

1- Intel; www.intel.com/embedded/index.htm
2- Atmel; www.atmel.com
3- Philips/Signetic; www.semiconductors.philips.com (OR) www.nxp.com
4- Siemens; www.eci.siemens.com
5- Dallas Semiconductors; www.dalsemi.com

Suppliers of 8051 based MCU from internet;
http://www.microcontroller.com/EmbeddedSystems.asp?c=11

Request Samples from Atmel;
http://www.atmel.com/forms/Samples.asp?family_id=604

Data Sheets;
http://www.atmel.com/dyn/products/datasheets.asp?family_id=604#770

If you like to study more on this topic you can go on these sites;

http://www.seattlerobotics.org/encoder/nov97/basics.html
http://www.egr.msu.edu/classes/ece482/Reports/appnotes/98spr/tsaimelv/appnote.html
http://www.tigoe.net/pcomp/code/all-about-microcontrollers
http://www.opencircuits.com/Microcontrollers

What are Microcontrollers?

A controller is used to control some process whereas a microcontroller is a complete computer system at its level. A microcontroller is a highly integrated chip which includes, on one chip, all or most of the parts needed for a controller. The microcontroller could be called a "one-chip solution".

It typically includes:
CPU (central processing unit)
RAM (Random Access Memory)
EPROM/PROM/ROM (Erasable Programmable Read Only Memory)
I/O (input/output) and
- serial and parallel timers interrupt controller.

But all these things are very limited and we have to care for the efficient use of these resources. Cost of a microcontroller is relatively low. Microcontroller is designed for a very specific task -- to control a particular system. As a result, the parts can be simplified and reduced, which cuts down on production costs. Microcontrollers are sometimes called embedded microcontrollers, which just means that they are part of an embeded system-- that is, one part of a larger device or system.

A microcontroller differs from a microprocessor, which is a general-purpose chip that is used to create a multi-function computer or device and requires multiple chips to handle various tasks. A microcontroller is meant to be more self-contained and independent, and functions as a tiny, dedicated computer.
Microcontrollers have become common in many areas, and can be found in home appliances, computer equipment, and instrumentation. They are often used in automobiles, and have many industrial uses as well, and have become a central part of industrial robotics. Because they are usually used to control a single process and execute simple instructions, microcontrollers do not require significant processing power.

Microcontrollers comes in different size and different types. They are made my a number of companies. They come in basically two packages;

DIP and QUAD

in DIP package despite from the other differences; the pins are at two sides and in quad the pins are at four sides. you can see them in below image.



Today MCUs are hidden inside a surprising number of products these days, if your microwave oven has an LED or LCD screen and a keypad, it contains a MCU. All modern automobiles contain at least one MCU, and can have as many as six or seven: the engine is controlled by a MCU, as are the anti-lock brakes, the cruise control and so on. Any device that has a remote control almost certainly contains a MCU: TVs, VCRs and high-end stereo systems all fall into this category. Nice SLR and digital cameras, cell phones, camcorders, answering machines, laser printers, telephones (the ones with caller ID, 20-number memory, etc.), pagers, and feature-laden refrigerators, dishwashers, washers and dryers (the ones with displays and keypads) and product or device that interacts with its user has a MCU buried inside.

You can also read about MCUs from these links;

http://www.seattlerobotics.org/encoder/sep97/basics.html
http://knowledgerush.com/kr/encyclopedia/Microcontroller/
http://cnx.org/content/m11655/latest/

Friday, February 27, 2009

Introduction to this Blog

Hello!
This is your starting point for learning 8051 based microcontrollers. In this blog you will find a step by step learning method. If you follow all the posts one by one, I hope you can learn a lot. In this blog first you will find the theoretical portion, including about the C Programming, then the microcontroller programming, for this purpose someuseful links and books. Then a post will be about microcontroller and their simulators. I will also included posts regarding hardware attached to micro controllers and then finally the interfacing techniques and some useful circuits to make.
Well, I hope you will learn a lot and please give your useful comments for making this blog more useful and more effective. If you want some thing more to be added in this blog, feel free to email or comment. Please visit this blog from time to time for new posts.
Thanks.

Search This Blog