15: Microprocessor and microcontroller

Slides:



Advertisements
Similar presentations
Microprocessors A Beginning.
Advertisements

Applications of PICs Advantages/disadvantages Digital and analogue control Loops, sub-routines, scanning, counting and feedback Interrupts Problems with.
PCEL4303 MICROPROCESSOR & MICRO CONTROLLERS MODULE - I (10 hours) Microprocessor Architecture: Microprocessor and Microcomputer Architecture, Pins & Signals,
Microcontroller – 3 PIC.
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Microprocessor 8085/8086 Lecturer M A Rahim Khan Computer Engineering and Networks Deptt.
Microprocessor and Microcontroller
Processor System Architecture
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
EEE237 Introduction to Microprocessors
Microcontroller – PIC – 4 PIC types PIC architecture
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
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.
The 8051 Microcontroller Architecture
Microcontroller based system design
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Microcontroller: Introduction
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
MCU – Microcontroller Unit – 1 MCU  1 cip or VLSI core – application-specific.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
The Microcomputer System In this presentation you will: Investigate the microprocessor Title Page.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
ECE 447: Lecture 1 Microcontroller Concepts. ECE 447: Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device.
MICROCONTROLLERS. What is a microcontroller? A microcontroller is a nifty little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random.
Internal hardware and external components of a computer Three-box Model  Processor The brain of the system Executes programs A big finite state machine.
E0001 Computers in Engineering1 The System Unit & Memory.
Introduction to Computing: Lecture 4
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
created by :Gaurav Shrivastava
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.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
ECE Lecture 1 Microcontroller Concepts. Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device Data.
MICROPROCESSOR AND MICRO CONTROLLER
General Concepts of Computer Organization Overview of Microcomputer.
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.
Computer Organization & Assembly Language © by DR. M. Amer.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
HOW a Computer Works ? Anatomy of Microprocessor.
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.
THE MICROPROCESSOR A microprocessor is a single chip of silicon that performs all of the essential functions of a computer central processor unit (CPU)
Computer operation is of how the different parts of a computer system work together to perform a task.
Lecture 7: Overview Microprocessors / microcontrollers.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Capability of processor determine the capability of the computer system. Therefore, processor is the key element or heart of a computer system. Other.
Chapter Microcontroller
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
HOME AUTOMATION USING PC DONE BY RAJESHKUMAR S SRI HARSHA D.
Components of a typical full-featured microcontroller.
Block diagram of a computer system Basic components of a computer system using block diagrams: Cpu Memory Input and output unit Evolution of microprocessor.
MICROPROCESSOR AMARTYA ROY-72 ANGSHUMAN CHATTERJEE-80 ASHISH LOHIA-70 MOLOY CHAKRABORTY-60.
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.
Introduction to Microcontroller Technology
Unit Microprocessor.
Microcontroller.
COURSE OUTCOMES OF Microprocessor and programming
Computer Hardware – System Unit
Introduction to microprocessor (Continued) Unit 1 Lecture 2
Introduction of microprocessor
Microcontroller Intel 8051
Introduction to Microprocessors and Microcontrollers
Number Representations and Basic Processor Architecture
Introducing the PIC Mid-Range Family and the 16F84A
Microcontroller – 2 PIC.
Presentation transcript:

15: Microprocessor and microcontroller Lecture 14

15.1: Control µprocessor systems – use as control system and are term as embedded microprocessor Dedicated to controlling a specific function Self-started, self-contained with own operating program Requiring no human intervention

15.2: Microprocessor systems Have 3 parts: Central processing unit (CPU) – recognise and carry out program instruction Input/output interface – handle communication between computer and outside world Memory – to hold program instructions and data µprocessor with memory and various input/output arrangement all on the same chip - microcontroller

15.2.1: Busses Digital signals move from one section to one another along paths called buses Data bus – data associated with processing function of CPU Address bus – indicate where data to be found, selection of memory or input/output ports Control bus – carry out signals related to control actions i.e. READ, WRITE

General form of microprocessor system

15.2.2: General architecture of µp Arithmetic and logic unit (ALU) – to perform data manipulation Register – temporarily hold internal data that CPU is currently used Control unit – determine timing and sequence of operations

General internal architecture of microprocessor system

Registers – temporary storage Accumulator – data for i/p to ALU Status register – flags, indicate status of latest operation Program counter (PC) or instruction pointer (IP) – keep track position of instruction in a program Memory address – address of data Instruction register (IR) – store instruction General purpose register – temporary storage for data or address Stack pointer register (SP) – form address which defines top of stack in RAM

15.2.3: Memory Memory unit – stores binary data and takes the form of one or more integrated circuits ROM – read only memory, fixed program i.e. operating system PROM – programmable ROM, used for ROM chip that can be programmed by user EPROM – erasable and programmable ROM, EEPROM – electrical and erasable PROM, erasure b high voltage RAM – random access memory, temporary data Programs stored in ROM – firmware, RAM used program storage - software

15.3: Microcontroller Integration of a microprocessor and input/output interfaces and other peripherals such as timers, on a single chip Has pins for external connections –i/o, power, clock, control signals i/o ports – single port 8-bit word or two ports 16-bit word

Block diagram of a microcontroller

Micro Small, Compact Controller Read inputs  Process Produce output

Applications of Microcontroller Electronic gadget Mobile phone Toys Robotics Radio DVD player etc

There are a lot of different microcontrollers available in the market There are a lot of different microcontrollers available in the market. For example, Atmel, Motorola, Intel and PIC. Each one has its own advantages and disadvantages. There are a lot of similarities between the microcontrollers. Emphasis on PIC16F877A.

15.3.3: Microchip microcontroller PIC microcontroller – Peripheral Interface Controller E.g. PIC16AXX, PIC16FXX, Harvard architecture – instruction are fetched from program memory using busses that are distinct

Harvard architecture

PIC16C74A

Why PIC? Easy to buy, inexpensive, low cost development tools and powerful. You can get from Farnell, RS and Hitectron. You can even get free sample from Microchip website. The development software is distributed as freeware (MPLAP, PCCLITE and ICPROG). One basic microcontroller system cost less than RM 50.

CORE PIC FAMILY PICs come with 1 of 4 CPU ‘cores’: 12bit cores with 33 instructions: 12C50x, 16C5x 14bit cores with 35 instructions: 12C67x,16Cxxx,16Fxxx 16bit cores with 58 instructions: 17C4x,17C7xx ‘Enhanced’ 16bit cores with 77 instructions: 18Cxxx, 18Fxxx

PACKAGING PIC FAMILY PICs come in a huge variety of packages: 8 pin DIPs, SOICs: 12C50x (12bit) and 12C67x (14bit) 18pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit), 16Fxxx (14bit) 28pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit), 16Fxxx (14bit) 40pin DIPs, SOICs: 16Cxxx (14bit), 17C4x (16bit) 44 - 68pin PLCCs*: 16Cxxx (14bit), 17C4x / 17Cxxx (16bit)

SPEED PIC FAMILY PICs require a clock to work. Can use crystals, clock oscillators, or even an RC circuit. Some PICs have a built in 4MHz RC clock. Not very accurate, but requires no external components! Instruction speed = 1/4 clock speed (Tcyc = 4 * Tclk) All PICs can be run from DC to their maximum spec’d speed: 12C50x 4MHz 12C67x 10MHz 16Cxxx, 16Fxxx 20MHz 17C4x / 17C7xxx 33MHz 18Cxxx, 18Fxxx 40MHz

MEMORY PIC FAMILY PIC program space is different for each chip. Some examples are: 12C508 512 12bit instructions 16C71C 1024 (1k) 14bit instructions 16F84A 1024 (1k) 14bit instructions 16F877 8192 (8k) 14bit instructions 17C766 16384 (16k) 16bit instructions

PROGRAM MEMORY PIC FAMILY PICs have two different types of program storage: 1. EPROM (Erasable Programmable Read Only Memory) Needs high voltage from a programmer to program (~13V) Needs windowed chips and UV light to erase Note: One Time Programmable (OTP) chips are EPROM chips, but with no window! PIC Examples: Any ‘C’ part: 12C50x, 17C7xx, etc. 2. FLASH Re-writable (even by chip itself) Much faster to develop on! Finite number of writes (~100k Writes) PIC Examples: Any ‘F’ part: 16F84, 16F87x, 18Fxxx (future)

DIGITAL I/O PORT PIC FAMILY All PICs have digital I/O pins, called ‘Ports’ the 8pin 12C508 has 1 Port with 4 digital I/O pins the 18pin 16F84A has 2 Ports with 13 digital I/O pins the 40pin 16F877A has 5 Ports with 33 digital I/O pins the 68pin 17C766 has 9 Ports with 66 digital I/O pins Ports have 2 control registers TRISx sets whether each pin is an input or output PORTx sets their output bit levels Most pins have 25mA source/sink (directly drives LEDs)

15.4.2: Application- Domestic washing machine A. Inputs water temperature, motor speed – ADC Water level switch – Port A B. Outputs Hot/cold water valve Water pump control Door lock Buzzer Motor direction Heater control

15.4.2: Application- Domestic washing machine (cont.) C. Outputs Displays Inputs from keyboards D. Others PWM – provide signal to motor Interrupt – stopped if interrupt i.e. door opened

Domestic washing machine

15.5: Programming steps Define problem – function to perform, i/o required, constraints – speed, accuracy, memory size, etc. Define algorithm – sequence of steps Flowchart and pseudo code –steps and program flow Translate flow chart/algorithm into instruction using language – assembly, C Test and debug program

Flow chart symbols

Flow chart

Sequence

WHILE-DO

IF-THEN-ELSE

End of Lecture 14