Microprocessor and Microcontroller Based Systems

Slides:



Advertisements
Similar presentations
Microprocessors A Beginning.
Advertisements

MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Microprocessor and Microcontroller
Processor System Architecture
© 2010 Kettering University, All rights reserved..
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Microcontroller – PIC – 4 PIC types PIC architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Data Manipulation Computer System consists of the following parts:
Basic Input/Output Operations
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Computer Organization and Assembly language
Microcontroller based system design
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Microcontroller: Introduction
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
INTRODUCTION TO MICROCONTROLLER. What is a Microcontroller A microcontroller is a complete microprocessor system, consisting of microprocessor, limited.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Atmega32 Architectural Overview
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
 Chasis / System cabinet  A plastic enclosure that contains most of the components of a computer (usually excluding the display, keyboard and mouse)
Chapter 1 Introduction. Computer Architecture selecting and interconnecting hardware components to create computers that meet functional, performance.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Computer Architecture And Organization UNIT-II General System Architecture.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
Microprocessors For a microprocessor to give a working microcomputer system, which can be used for control tasks, additional chips are necessary, e.g.
Chapter 7 Larger Systems and the PIC 16F873A The aims of this chapter are to introduce: The architecture of the 16F873A microcontroller; The 16F873A memory.
Introduction to Microprocessors
Electronic Analog Computer Dr. Amin Danial Asham by.
MICROOCESSORS AND MICROCONTROLLER:
Programmable Logic Controllers LO1: Understand the design and operational characteristics of a PLC system.
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
THE MICROPROCESSOR A microprocessor is a single chip of silicon that performs all of the essential functions of a computer central processor unit (CPU)
Lecture 7: Overview Microprocessors / microcontrollers.
EMBEDDED SYSTEM & ROBOTICS. Introduction to robotics Robots are machines capable of carrying out a complex series of actions automatically. Robotics is.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Embedded Systems. What is Embedded Systems?  Embedded reflects the facts that they are an integral.
Atmega32 Architectural Overview
For further information
UNIT – Microcontroller.
Number Representations and Basic Processor Architecture
Tiny Computers, Hidden Control
EE Embedded Systems Fall 2015
CISC AND RISC SYSTEM Based on instruction set, we broadly classify Computer/microprocessor/microcontroller into CISC and RISC. CISC SYSTEM: COMPLEX INSTRUCTION.
MARIE: An Introduction to a Simple Computer
Introducing the PIC Mid-Range Family and the 16F84A
Introduction to Microprocessor Programming
EECE.3170 Microprocessor Systems Design I
Presentation transcript:

Microprocessor and Microcontroller Based Systems بسم الله الرحمن الرحيم The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department Microprocessor and Microcontroller Based Systems EELE 4315 — Fall 2010 Instructor: Eng.Moayed N. EL Mobaied Lecture 3

Microcontroller

Microcontroller Microcontroller differs from a microprocessor in many ways. First and the most important is its functionality. In order for a microprocessor to be used, other components such as memory, or components for receiving and sending data must be added to it. On the other hand, microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it. Thus, we save the time and space needed to construct devices.

Microcontroller A microcontroller is a microprocessor designed to perform simple control functions. Microcontrollers usually have these features low cost, physically small, input/output intensive, and capable of easy interfacing, limited memory capability for program and data, instruction set leading to compact code, with limited arithmetic capability, ability to operate in a real-time environment. In certain applications the following further features are essential: ability to operate in hostile environment, e.g. high or low temperature, tolerant to electromagnetic interference, low power, with features adapted to battery power.

Microcontroller A microcontroller = microprocessor core + memory + peripherals

Microcontroller PIC is a family of microcontrollers made by Microchip Technology. The original one was the PIC1650 developed by General Instruments. This device was called: PIC for “Programmable Intelligent Computer” although it is now associated with “Programmable Interface Controller.” Microchip does not use PIC as brand name . Instead they prefer the brand name PICmicro. PIC is a registered brand in Germany and Microchip is unable to use it internationally.

Microcontroller The original PIC was built to be used with General Instruments’ CP1600 processor, which had poor I/O performance. The PIC was designed to take over the I/O tasks for the CPU, thus improving performance. In 1985, the PIC was upgraded with EPROM to produce a programmable controller. Today, a huge variety of PICs are available with many different on-board peripherals and program memories ranging from a few hundred words to 32K.

Microcontroller PICs use an instruction set that varies in length from about 35 instructions for the low-end PICs to more than 70 for the high-end devices. The PICs are programmable in their native Assembly Language, which is straightforward and not difficult to learn. In addition, C language and BASIC compilers have been developed for the PIC. Open-source Pascal, JAL, and Forth compilers are also available for PIC programming.

Microcontroller interface

Microcontroller applications Digital Integrated Circuit Electronics Design Analogue Electronics Computer Architecture Microcontroller Sensors and Software Engineering Measurements Data Electric Motors & Communications Actuators Control Engineering

PIC Microcontroller Architecture Central Processing Unit (CPU) Data Memory Input/ Output Program Address Data Memory Program Address Central Processing Unit (CPU) Input/ Output a) The Von Neumann Way b) The Harvard Way

Instructions and Instruction Sets A computer “executes” instructions in its Arithmetic Logic Unit (ALU), running through a series of instructions called a program. An ALU can only do a few things, but it can do them very fast. A typical 8-bit ALU can do the list shown below. A is the “Accumulator”, a digital register where the computations actually occur, and M is a location in memory. The ALU in turn forms part of the Central Processing Unit (CPU).

How Instruction Sets are Made: the “CISC” Machine Any CPU has a set of instructions that it recognizes and responds to; all programs are built up in one way or another from this instruction set. We want computers to execute code as fast as possible, but how to achieve this aim is not always an obvious matter. One approach is to build sophisticated CPUs with exotic instruction sets, with an instruction ready for every foreseeable operation. This leads to the CISC, the Complex Instruction Set Computer. A CISC has many instructions, and considerable sophistication. Yet the complexity of the design needed to achieve this tends to lead to slow operation. One characteristic of the CISC approach is that instructions have different levels of complexity. Simple ones can be expressed in a short instruction code, say one byte of data, and execute quickly. Complex ones may need several bytes of code to define them, and take a long time to execute. A CISC machine is generally recognised by: Many instructions (say over one hundred), some with considerable sophistication; Instruction words are of different length; Instructions take different lengths of time to execute.

How Instruction Sets are Made: the “RISC” Machine Another approach is to keep the CPU very simple, and have a limited instruction set. This leads to the RISC approach – the Reduced Instruction Set Computer. The instruction set, and hence overall design, is kept simple. This leads to fast operation. One characteristic of the RISC approach is that each instruction is contained within a single binary word. That word must hold all information necessary, including the instruction code itself, as well as any address or data information also needed. A further characteristic, an outcome of the simplicity of the approach, is that every instruction normally takes the same amount of time to execute. A RISC machine is generally recognised by: Few instructions (say well below one hundred), Each performs a very simple action; All instructions are single word; All, or almost all instructions take the same length of time to execute.

PIC 16F84A Microcontroller The 16F84A is available as an 18-pin device. The pin connection diagram is shown here. This won’t make much sense just yet, but in the coming sessions you will be surprised how quickly you get to know what most (if not all) of these pins are used for.

PIC 16F84A Microcontroller We are going to look at the block diagram of the 16F84A, straight from the manufacturer’s data sheet, shown below right. A good understanding of the block diagram leads to an ability to design with the microcontroller, and to program it. In the diagram, you should in time be able to recognise all the basic features of a microcontroller. Let’s pick out the main features of the 16F84A, in the coming slides.

PIC 16F84A Microcontroller: Block diagram Extra “non-volatile” Data Memory Data Memory Address for Program Memory Program Memory Data from Program Memory, carrying instruction word Address for Data Memory Data bus for Data Memory and peripherals Counter/Timer Peripheral Digital Input/ Output Ports The CPU

PIC 16F84A Microcontroller: “Flow“ The Instruction word flows here. The word will contain the instruction, and maybe also address and data information Address info. flows here “Literal” data flows along here Instruction info flows here The core is the “microprocessor inside the microcontroller”, centred around the ALU. It is interesting to see the path that the instruction takes from program memory. The Arithmetic Logic Unit The “Working Register”

PIC 16F84A Microcontroller: Block diagram

Program Memory and Stack Program Counter 16 Series instructions which invoke the Stack The program must start here The Interrupt Service Routine must start here Program Counter points to locations in program memory Unimplemented memory space, still addressable by the 13-bit 16F84A program address bus.

Interfacing with Peripherals – the Special Function Register Microcontroller Interaction with its Peripherals, via Special Function Register (SFR) and Interrupt microcontroller peripherals can be configured in software to operate in a number of different modes, to do this certain control data must be sent to them to set them up in the desired way once in use, there will be data flow between core and peripheral, there may still be need for further control data, these needs are commonly met by means of dedicated, memory - mapped registers, sometimes called Special Function Registers, this approach gives the microcontroller manufacturer great flexibility to extend a microcontroller family – SFRs for new peripherals can easily be located in gaps in the memory map.

Data Memory and Special Function Register Map These are the Special Function Registers, which allow the CPU to interact with the peripherals msb is “bank select bit” (Status register). General purpose memory