+ All Categories
Home > Documents > A brief description of 8051 Microcontroller

A brief description of 8051 Microcontroller

Date post: 23-Feb-2016
Category:
Upload: summer
View: 54 times
Download: 0 times
Share this document with a friend
Description:
“Heaven’s Light is our Guide” Rajshahi University of Engineering and Technology Department of Electrical and Electronic Engineering. A brief description of 8051 Microcontroller. By MD. MOSHIUL ALAM (JONY) ROLL NO. 041016 EEE - 4/7, RUET . Mobile No. +8801710998670 - PowerPoint PPT Presentation
14
“HEAVEN’S LIGHT IS OUR GUIDE” RAJSHAHI UNIVERSITY OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
Transcript
Page 1: A brief description of 8051 Microcontroller

“HEAVEN’S LIGHT IS OUR GUIDE”

RAJSHAHI UNIVERSITY OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Page 2: A brief description of 8051 Microcontroller

A BRIEF DESCRIPTION OF

8051 MICROCONTROLLE

R

By MD. MOSHIUL ALAM (JONY)ROLL NO. 041016EEE - 4/7, RUET.Mobile No. +8801710998670E-mail:[email protected]

Page 3: A brief description of 8051 Microcontroller

WHAT IS A MICROCONTROLLER?

Simply say, it is a small computer.We know that a

computer is a machine which is

used for mathematical and logical operation.

It consists of various components such as a

microprocessor, a RAM, ROM, Hard disk, various peripheral devices. All

the devices are set up in a broad named as

motherboard.

Where as a microcontroller is a single chip which

include all the things of a

computer but limited number of

capacity.

Page 4: A brief description of 8051 Microcontroller

IS THEIR ANY SIMILARITY BETWEEN A MICROPROCESSOR AND A MICROCONTROLLER

No there is not.A microprocessor is a part of the microcontroller.

A microprocessor can’t operate without RAM, ROM and other peripheral devices.

Page 5: A brief description of 8051 Microcontroller

CONSIDER A MICROCONTROLLER OF ATMEL, AT89C51ED2

Features Compatible with MCS-51 Products4K Bytes of In-System Reprogrammable Flash MemoryFully Static Operation: 0 Hz to 24 MHzThree-level Program Memory Lock128 x 8-bit Internal RAM32 Programmable I/O LinesTwo 16-bit Timer/CountersSix Interrupt SourcesProgrammable Serial ChannelLow-power Idle and Power-down Modes40-pin DIP

Page 6: A brief description of 8051 Microcontroller

Pin Description1 – 8 P1.0 – P1.7 – Port 1

9 RST – Reset10 – 17

P3.0 – P3.7 – Port 3

18 XTAL2 – Crystal19 XTAL1 – Crystal20 GND - Ground

21 – 28

P2.0 – P2.7 – Port 2

29 PSEN – Program Store Enable

30 ALE – Address Latch Enable31 EA – External Access Enable

32 – 39

P0.7 – P0.0 – Port 0

40 Vcc - Positive Power Supply

Page 7: A brief description of 8051 Microcontroller

NOW TO OPERATE THE CHIP AS A MICROCONTROLLER WE HAVE TO WRITE A C++ PROGRAM. VARIOUS COMPANY RELEASE THEIR OWN C COMPILLER.

In our project we used the

Keil Compiler.First we write the program and run it on

Keil and check that any error is

their. Keil converts the C program to Hex file

because MC recognize only

Machine Language.If there is no error then we burn it to the

Chip via RS232 Connector.

Page 8: A brief description of 8051 Microcontroller

TO PERFORM THE TASK, THE MC NEED A SPECIFIC FREQUENCY

The frequency is generally high such as

12MHZ

This frequency is applied to the 18 & 19

pins.

The MC divides the supply frequency by

12.

For various mathematical and logical operation MC needs

certain no. of execution cycle.

It always operate on 5V. Only recognizes 0 (0V)

and 1 (5V).

Page 9: A brief description of 8051 Microcontroller

NOW CONSIDER A PRACTICAL PROBLEM FOR THE USE OF OUR MICROCONTROLLER

Suppose we want to automate the light of our house. If the natural light is reduces then the microcontroller switch on the light.The light sensor can be done by using the LDR (Light dependent resistor)

Page 10: A brief description of 8051 Microcontroller

HERE IS THE A SIMPLE CIRCUIT FOR THE LIGHT SENSOR:

The above circuit is a light sensor. When light intensity is low then LDR provide about 10K resistance thus the voltage at pin 2 is low ( 4.7*5/(10+4.7)=1.6 and the voltage at the pin 3 (2.5V) is high since the

constant voltage is supplied to the two voltage dividing path. Thus we get 5V at the output. Similarly

when there is sufficient light then the LDR provide about 3K resistance and the voltage at pin 2 is high

then the pin 3. Thus output is 0V. (5*4.7/(3+4.7))=3.05

Page 11: A brief description of 8051 Microcontroller

NOW IF WE CONNECT THE PREVIOUS CIRCUIT OUTPUT TO P1.1 PORT AND THE LIGHT SWITCH IS CONTROLLED BY THE MOSFET WHOSE GATE IS CONNECTED TO THE P2.1 AND WRITING THE FOLLOWING PROGRAM :

#include <reg51.h> //Header file declaration for 8051 mcsbit sensor=P1.2; //single bit declaration of P1 portsbit light=P2.1; //single bit declaration of P2 portVoid main(void){

while(1) //infinite loop declaration{if(sensor==1)light=1;elselight=0;}

}

Page 12: A brief description of 8051 Microcontroller

Here is the actual circuit

8051 MC

N.B . To operate the above circuit, ISP(in system programming) board is requied.

Page 13: A brief description of 8051 Microcontroller

MY BELIEFS

Always thought positive. Never, never and never take

negative as a reference.A Candle don’t loose its light by spreading

its light farther.A man always learn through

mistakes.Every man should believe in his region and the life which comes

after the death.How you can believe that a tiny electron pass through a wire if you don’t believe your creator.

Because both are not seen.

Page 14: A brief description of 8051 Microcontroller

THANKS YOU


Recommended