Presentation is loading. Please wait.

Presentation is loading. Please wait.

“H EAVEN ’ S L IGHT IS OUR G UIDE ” R AJSHAHI U NIVERSITY OF E NGINEERING AND T ECHNOLOGY D EPARTMENT OF E LECTRICAL AND E LECTRONIC E NGINEERING.

Similar presentations


Presentation on theme: "“H EAVEN ’ S L IGHT IS OUR G UIDE ” R AJSHAHI U NIVERSITY OF E NGINEERING AND T ECHNOLOGY D EPARTMENT OF E LECTRICAL AND E LECTRONIC E NGINEERING."— Presentation transcript:

1 “H EAVEN ’ S L IGHT IS OUR G UIDE ” R AJSHAHI U NIVERSITY OF E NGINEERING AND T ECHNOLOGY D EPARTMENT OF E LECTRICAL AND E LECTRONIC E NGINEERING

2 A BRIEF DESCRIPTION OF 8051 M ICROCONTROLLER By MD. MOSHIUL ALAM (JONY) ROLL NO. 041016 EEE - 4/7, RUET. Mobile No. +8801710998670 E-mail:moshiul.bd@gmail.com

3 W HAT 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.

4 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.

5 C ONSIDER A MICROCONTROLLER OF A TMEL, AT89C51ED2 Features Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes 40-pin DIP

6 PinDescription 1 – 8P1.0 – P1.7 – Port 1 9RST – Reset 10 – 17P3.0 – P3.7 – Port 3 18XTAL2 – Crystal 19XTAL1 – Crystal 20GND - Ground 21 – 28P2.0 – P2.7 – Port 2 29PSEN – Program Store Enable 30ALE – Address Latch Enable 31EA – External Access Enable 32 – 39P0.7 – P0.0 – Port 0 40Vcc - Positive Power Supply

7 N OW TO OPERATE THE CHIP AS A MICROCONTROLLER WE HAVE TO WRITE A C++ PROGRAM. V ARIOUS 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.

8 T O PERFORM THE TASK, THE MC NEED A SPECIFIC FREQUENCY The frequency is generally high such as 12MHZThis 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).

9 N OW 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)

10 H ERE 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

11 N OW 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 mc sbit sensor=P1.2;//single bit declaration of P1 port sbit light=P2.1; //single bit declaration of P2 port Void main(void) { while(1)//infinite loop declaration { if(sensor==1) light=1; else light=0; } }

12 Here is the actual circuit 8051 MC N.B. To operate the above circuit, ISP(in system programming) board is requied.

13 M Y B ELIEFS 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.

14 THANKS YOU


Download ppt "“H EAVEN ’ S L IGHT IS OUR G UIDE ” R AJSHAHI U NIVERSITY OF E NGINEERING AND T ECHNOLOGY D EPARTMENT OF E LECTRICAL AND E LECTRONIC E NGINEERING."

Similar presentations


Ads by Google