
Introduction to MicroProcessors and MicroControllers 1. INTRODUCTION 2 2. WHAT IS A MICROCOMPUTER? 3 2.1. WHAT IS A MICROPROCESSOR? 3 2.2. WHAT IS A MICROCONTROLLER? 4 2.3. WHAT IS AN EMBEDDED CONTROLLER? 5 3. THE MAJOR COMPONENTS OF A MICROCOMPUTER SYSTEM: 7 3.1. THE CPU 7 3.2. THE MEMORY 7 3.2.1. OPTIONS FOR STORING PROGRAMS. 8 3.3. THE I/O DEVICES 9 3.4. THE ADDRESS/DATA/CONTROL BUS (SYSTEM BUS) 12 4. A TYPICAL MICROPROCESSOR (Z80) 15 5. MICROCONTROLLER BASICS 17 5.0. A TYPICAL MIRCOCONTROLLER (I8051) 21 5.1. SOME OTHER POPULAR MICROCONTROLLERS 28 5.2. SPECIAL EASY CHIPS TO USE 31 5.3. INTEL 8052AH-BASIC 32 5.3.1. INSIDE THE 8052-BASIC 32 5.3.2. THE 8051 FAMILY 34 5.4. ELEMENTS OF THE 8052 AND 8052-BASIC 34 6. SPECIAL MICROCONTROLLER FEATURES 38 6.1. PERIPHERAL I/O 38 6.2. ADVANCED MEMORY OPTIONS 41 6.3. POWER MANAGEMENT AND LOW VOLTAGE 41 7. WRITING THE CONTROL PROGRAM 44 8. TESTING AND DEBUGGING 45 8.3. THE 8052-BASIC’S DEVELOPMENT SYSTEM 46 © by Heinz Rongen Forschungszentrum Jülich Zentrallabor für Elektronik 52425 Jülich, Germany email: [email protected] Microcontroller (1) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] 1. Introduction Microprocessors or Microcontrollers are widely used, as controlling component in all kind of instruments. In this case the Microcontroller with its peripheral extensions is the major responsible component for the functionality of an instrument. If the controller fails, the complete instrument fails. Therefore this it very important to understand the major blocks inside of a microprocessor based system for maintenance and repair of such instruments. Such a controller system is call an embedded controller. The microprocessor must often used for embedded controller systems are 8 bit µ- processors such as the 8080, 8085, Z80 or microcontrollers such as the 8751, 8052, 8032, 8048 etc. The older versions of controllers where mounted into a 40 pin DIP package, the modern are SMD components. Surface Mounted Devices (SMD) and the Surface Mounting Technology (SMT) are the today’s technology for printed circuit boards in all application. With SMD devices all kind of instruments are getting smaller, cheaper and also more reliable. But for maintenance of these SMT boards the users needs much more sophisticated tools and experience to handle the SMD components without distroying the whole board. This course demonstrates the building blocks and the repair of embedded control systems at two widely used standard processors. ¨ the TMPZ84c015 as an 8 bit microprocessor ¨ the 8052 as an 8 bit microcontroller All experiment boards are designed in SMD Technology for training soldering and unsoldering of SMD components. Microcontroller (2) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] 2. What is a Microcomputer? A Microcomputer is a complete computer system comprising at least three major components, the microprocessor (CPU), Memory and IO peripheral components. A microcomputer could be a general purpose computer (like a PC) or a system designed to fulfill a special task. Memory I/O Eprom/Ram SIO/PIO (for example a controller system inside an instrument, microcontroller) Address / Data / Control Bus CPU 2.1. What is a Microprocessor? A Microprocessor is a device containing functions equivalent to a small computer’s Central Processing Unit (CPU). It is such capable of performing basic computer functions, an can be incorporated into system designs where such functions are required. A Microprocessor by definition means that this is only the central processing unit, with instruction decoder, registers and Arithmetic Logic processing Unit. Adress Bus A CPU does not include any memory or I/O components. ProgrammCounter ALU Register Instruction Decoder Data Bus Microcontroller (3) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] 2.2. What is a Microcontroller? A Microcontroller is a Microcomputer in a single Chip. That means that a microcontroller chip includes a microprocessor (CPU) as well as some often used peripherals. A controller is used to control (makes sense!) some process or aspect of the environment. A typical microcontroller application is the monitoring of my house. As the temperature rises, the controller causes the windows to open. If the temperature goes above a certain threshold, the air conditioner is activated. As the process of miniaturization continued, all of the components needed for a controller were built right onto one chip. A one chip computer, or microcontroller was born. 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 or the microprocessor) · EPROM/PROM/ROM (Read Only Memory for the program code) · RAM (Random Access Memory for the data) · I/O (input/output) devices (serial, parallel, ADC, DAC etc.) · Timers · Interrupt controller By only including the features specific to the task (control), cost is relatively low. A typical microcontroller has bit manipulation instructions, easy and direct access to I/O (input/output), and quick and efficient interrupt processing. Microcontrollers are a "one-chip solution" which drastically reduces parts count and design costs. Microcontroller (4) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] 2.3. What is an Embedded Controller? Simply (and naively stated) an embedded controller is a controller that is embedded in a greater system. You COULD say that an embedded controller is a controller (or computer) that is embedded into some device for some purpose other than to provide general purpose computing like a PC. In addition to control applications such as the above home monitoring system, microcontrollers are frequently found in embedded applications (embedded controllers?). Among the many uses that you can find one or more microcontrollers appliances (microwave oven, refrigerators, television and VCRs, stereos), automobiles (engine control, diagnostics, climate control), environmental control (greenhouse, factory, home), instrumentation, aerospace, and thousands of other uses. A special application that microcontrollers are well suited for is data logging. Stick one of these chips out in the middle of a corn field or up in a balloon, and monitor and record environmental parameters (temperature, humidity, rain, etc.). Small size, low power consumption, and flexibility make these devices ideal for unattended data monitoring and recording. Flavors Microcontrollers come in many flavors and varieties. Depending on the power and features that are needed, you might choose a 4 bit, 8 bit, 16 bit, or 32 bit microcontroller. In addition, some specialized versions are available which include features specific for communications, keyboard handling, signal processing, video processing, and other tasks. worldwide Microcontroller Shipments (in millions of dollars) '90 '91 '92 '93 '94 '95 '96 '97 4-bit 1,393 1,597 1,596 1,698 1,761 1,826 1,849 1,881 8-bit 2,077 2,615 2,862 3,703 4,689 5,634 6,553 7,529 16-bit 192 303 340 484 810 1,170 1,628 2,191 worldwide Microcontroller Shipments (in Millions) '90 '91 '92 '93 '94 '95 '96 '97 4-bit 778 906 979 1036 1063 1110 1100 1096 8-bit 588 753 843 1073 1449 1803 2123 2374 16-bit 22 38 45 59 106 157 227 313 Notice that even the lowly 4-bit device is holding its own - what use is a 16-bit part in a toaster oven? Also notice that the 8-bit market just keeps growing, and will probably continue to grow. 8-bit devices account for over half of the market, and will eventually grab even more. Now do you understand why every silicon manufacturer is really pushing their 8-bit microcontrollers? Microcontroller (5) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] Microcontroller (6) Heinz Rongen Forschungszentrum Jülich, ZEL 52425 Jülich, Germany Tel: +49-(0)2461-614512 Fax: +49-(0)2461-613990 Email: [email protected] 3. The major components of a microcomputer system: The major components of every computer are the CPU, Memory, I/O devices and the system bus. These components can be found in any computer system, anyway if it is a microprocessor or microcontroller based system. 3.1. The CPU CPU means Central Processing Unit. The CPU is the kernel of each computer. All datas (instructions and user data) is read from the CPU into the CPU registers. Instructions (the program code) are read into the instruction register, next they are decoded in the instruction decoder. Depending on the instruction as next following data fetches. The datas are stored in the arithemtic registers (accumulator), from there the are processed in te ALU (Arithmetic & Logic Unit). The ALU performs all arithmetical and logical processes on the data. The result from the ALU is written back into a CPU register. From there the data can be written back to the memory or an I/O device. The most inportant signal from a CPU are the adress bus, data bus and control signals. These signals connecting the CPU to the memory and the I/O devices. 3.2. The Memory Every computer system needs a memory block. Memory can be external memory build by extra chips or the on chip memory of a microcontroller.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages46 Page
-
File Size-