Top Banner

Click here to load reader

Project Report On Micro-controller Embedded System

Jan 28, 2015

ReportDownload

Education

Project report on Micro-controller 8051.

  • 1. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 1 CHAPTER-1 IntroductionTo Embedded System

2. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 2 Introduction To Embedded System 1.1 Introduction Microcontroller are widely used in Embedded System products. An Embedded product uses the microprocessor(or microcontroller) to do one task & one task only. A printer is an example of Embedded system since the processor inside it perform one task only namely getting the data and printing it. Although microcontroller are preferred choice for many Embedded systems, There are times that a microcontroller is inadequate for the task. For this reason in recent years many manufactures of general purpose microprocessors such as INTEL, Motorolla, AMD & Cyrix have targeted their microprocessors for the high end of Embedded market.One of the most critical needs of the embedded system is to decrease power consumptions and space. This can be achieved by integrating more functions into the CPU chips. All the embedded processors have low power consumptions in additions to some forms of I/O,ROM all on a single chip. In higher performance Embedded system the trend is to integrate more & more function on the CPU chip & let the designer decide which feature he/she wants to use. 1.2 Embedded System An Embedded System employs a combination of hardware & software to perform a specific function. Software is used for providing features and flexibility hardware(Processors, Memory...) is used for performance & sometimes security.An embedded system is a special purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general purpose computer, such as a PC, an embedded system performs predefined tasks usually with very specific tasks design engineers can optimize it reducing the size and cost of the product. Embedded systems are often mass produced, so the cost savings may be multiplied by millions of items.The core of any embedded system is formed by one or several microprocessor or micro controller programmed to perform a small number of tasks. In contrast to a general purpose computer, which can run any software application, the user chooses, the software on an embedded system is semi-permanent, so it is often called firmware. 1.3 Examples of Embedded System 1. Automated tiller machines (ATMS). 2. Integrated system in aircraft and missile. 3.Cellular telephones and telephonic switches. 4. Computer network equipment, including routers timeservers and firewalls 3. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 3 5. Computer printers, Copiers. 6. Disk drives (floppy disk drive and hard disk drive) 7. Engine controllers and antilock brake controllers for automobiles. 8. Home automation products like thermostat, air conditioners sprinkles and security monitoring system. 9. House hold appliances including microwave ovens, washing machines, TV sets DVD players/recorders. 10. Medical equipment. 11. Measurement equipment such as digital storage oscilloscopes, logic analyzers and spectrum analyzers. 12. Multimedia appliances: internet radio receivers, TV set top boxes. 13. Small hand held computer with P1M5 and other applications. 14. Programmable logic controllers (PLCs) for industrial automation and monitoring. 15. Stationary video game controllers. 1.4 Microprocessor (MPU) A microprocessor is a general-purpose digital computer central processing unit(CPU). Although popularly known as a computer on a chip is in no sense a complete digital computer. The block diagram of a microprocessor CPU is shown, which contains an arithmetic and logical unit (ALU), a program counter (PC), a stack pointer (SP),some working registers, a clock timing circuit, and interrupt circuits. Figure1.1:Block Diagram Of a Microprocessor 1.5 Microcontroller (MCU) Figure shows the block diagram of a typical microcontroller. The design incorporates all of the features found in micro-processor CPU: ALU, PC, SP, and registers. It also added the other features needed to make a complete computer: ROM, RAM, parallel I/O, serial I/O, counters, and clock circuit. RAM CPU GeneralMICR OCONTROL LERS (MCU)- Purpose ROM I/O Port Timer Serial COM Port 4. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 4 Figure1.2:Block Diagram Ofa Microcontroller 1.6 Comparision Between Microprocessor And Microcontroller The microprocessor must have many additional parts to be operational as a computer whereas microcontroller requires no additional external digital parts. 1. The prime use of microprocessor is to read data, perform extensive calculations on that data and store them in the mass storage device or display it. The prime functions of microcontroller is to read data, perform limited calculations on it, control its environment based on these data. Thus the microprocessor is said to be general-purpose digital computers whereas the microcontroller are intend to be special purpose digital controller. 2. Microprocessor need many opcodes for moving data from the external memory to the CPU, microcontroller may require just one or two, also microprocessor may have one or two types of bit handling instructions whereas microcontrollers have many. 3. Thus microprocessor is concerned with the rapid movement of the code and data from the external addresses to the chip, microcontroller is concerned with the rapid movement of the bits within the chip. 4. Lastly, the microprocessor design accomplishes the goal of flexibility in the hardware configuration by enabling large amounts of memory and I/O that could be connected to the address and data pins on the IC package. The microcontroller design uses much more limited. 5. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 5 CHAPTER-2 THE 8051 ARCHITECTURE 6. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 6 THE 8051 ARCHITECTURE 2.1About the 8051 The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available in DIP (dual in-line package) form, but the Extended 8051 models often have a different form factor, and are not "drop-in compatible". 2.2Block Diagram Figure 2.1:Block Diagram of 8051 All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models all have their own special features).Some of the features that have made the 8051 popular are: 4 KB on chip program memory. 128 bytes on chip data memory(RAM). 4 register banks. 8-bit data bus 16-bit address bus 7. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 7 32 general purpose registers each of 8 bits 16 bit timers (usually 2, but may have more, or less). 3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer. 1 Microsecond instruction cycle with 12 MHz Crystal. 8051 models may also have a number of special, model-specific features, such as UARTs, ADC, OpAmps, etc... 2.3Typical applications 8051 chips are used in a wide variety of control systems, telecom applications, and robotics as well as in the automotive industry. By some estimation, 8051 family chips make up over 50% of the embedded chip market.The 8051 has been in use in a wide number of devices, mainly because it is easy to integrate into a project or build a device around. The following are the main areas of focus: 1.Energy Management:Efficient metering systems help in controlling energy usage in homes and industrial applications. These metering systems are made capable by incorporating microcontrollers. 2.Touch screens:A high number of microcontroller providers incorporate touch-sensing capabilities in their designs. Portable electronics such as cell phones, media players and gaming devices are examples of microcontroller-based touch screens. 3.Automobiles: The 8051 finds wide acceptance in providing automobile solutions. They are widely used in hybrid vehicles to manage engine variants. Additionally, functions such as cruise control and anti-brake system have been made more efficient with the use of microcontrollers. So the microcontroller 8051 has great advantage in the field of the automobiles. 4. Medical Devices: Portable medical devices such as blood pressure and glucose monitors use microcontrollers will to display data, thus providing higher reliability in providing medical results. 2.4Pinout Description Pin 1-8(Port 1): Each of these pins can be configured as an input or an output. 8. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 8 Pin 9(RST): A logic one on this pin disables the microcontroller and clears the contents ofmost registers. In other words, the positive voltage on this pin resets the microcontroller. By Figure 2.2:Pin diagram of the 8051 DIP applying logic zero to this pin, the program starts execution from the beginning. Pin 9 is the RESET pin. It is an input and is active high. Upon applying a high pulse to this pin the microcontroller well reset and terminate all activities. This is often referred to as a power on reset .Activating a power on reset will cause all values the registers to be lost. It will set program counter to all 0s.In order for the RESET input to be effective it must have a minimum duration of two machine cycles. In other words the high pulse must be high for a minimum of two machine cycles before it is allowed to go low. Pin 10-17(Port 3): Similar to port 1, each of these pins can serve as general input or output. Besides, all of them have alternative functions: Pin 10(RXD):Serial asynchrono