MECE336 Microprocessors I

Similar documents
ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

Microprocessors/Microcontrollers

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

Chapter Two. Hardware Basics: Inside the Box

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Introduction to Microcontrollers

Microcontroller & Interfacing

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

CC411: Introduction To Microprocessors

SARDAR RAJA COLLEGES SARDAR RAJA COLLEGE OF ENGINEERING ALANGULAM

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lecture 1: Introduction to Microprocessors

Computer Hardware Requirements for Real-Time Applications

MICROCONTROLLERS 8051

Lecture 1. Course Overview and The 8051 Architecture

HCS12 Microcontroller and Embedded Systems: Using Assembly and C with CodeWarrior 1 st Edition

Basic Components of Digital Computer

Rewa Engineering College, Rewa. Rewa Department OF Electrical Engineering

8051 MICROCONTROLLERS

ITT Technical Institute. ET2640 Microprocessors and Microcontrollers Onsite and Online Course SYLLABUS

PIC Microcontroller and

Information Science 1

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE0501. Subject Name: Microprocessor Fundamentals & Programming

Computers Are Your Future

ETGG1801 Game Programming Foundations I Andrew Holbrook Fall Lecture 0 - Introduction to Computers 1

EMBEDDED SYSTEM BASICS AND APPLICATION

Machine Architecture and Number Systems

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

Solution to the Problems and Questions

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

Microprocessor (COM 9323)


VISUAL SUMMARY. The System Unit

Chapter 4 The Components of the System Unit

Microprocessors And Microcontroller

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Week 1. Introduction to Microcomputers and Microprocessors, Computer Codes, Programming, and Operating Systems

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Course Syllabus of Microprocessor I (Fall 2006)

2011 Pearson Higher Education, Mazidi, Naimi, and Naimi Pearson Higher Education, 2011 Pearson Higher Education,

Introducing Microcontrollers System Design

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Homeschool Enrichment. The System Unit: Processing & Memory

Pearson New International Edition. The 8051 Microcontroller and Embedded Systems Mazidi Mazidi McKinlay Second Edition

ME 515 Mechatronics. A microprocessor

Academic Course Description. EC0309A Microprocessors and Micrcontrollers Fifth Semester, (Odd Semester)

Chapter 4 The Components of the System Unit

Computer Architecture 2/26/01 Lecture #

Computers Are Your Future

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

An Overview of the Computer System. Kafui A. Prebbie 24

ELC4438: Embedded System Design Embedded Processor

ELCT 912: Advanced Embedded Systems

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

Padasalai s - VIRUDHUNAGAR DISTRICT COMMON FIRST MID TERM TEST, JULY 2018 STANDARD 11 COMPUTER APPLICATION

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

SRM UNIVERSITY FACULTY OF SCIENCE AND HUMANITIES DEPARTMENT OF PHYSICS AND NANOTECHNOLOGY COURSE PLAN FOR PHY0408

Acknowledgments About the Author


CPE/EE 421 Microcomputers

Department of Electronics and Instrumentation Engineering Question Bank

lesson 3 Transforming Data into Information

About the Presentations

Segment 1A. Introduction to Microcomputer and Microprocessor

Robotic Systems ECE 401RB Fall 2006

System Unit Components Chapter2

Choosing a Micro for an Embedded System Application

CS-424/580A Microcontrollers and Robotics

GLOSSARY OF COMPUTER ARCHITECTURE TERMS

Embedded Systems. Computer Organization. Wednesday 25 November 15

EE 308: Microcontrollers

Chapter 2. Prepared By: Humeyra Saracoglu

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Microcontrollers and Embedded Processors Module No: CS/ES/2 Quadrant 1 e-text

Fig 1. Block diagram of a microcomputer

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

Nishigandha S. Unhale 1, Nitish B. Bhawarkar 2, Ashwini Patil 3 & Swati S. Patil 4

CS-202 Microprocessor and Assembly Language

IB Computer Science Topic.2-

Computer Organization and Programming

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

Mrs.T.Divya Barathi AP/ECE. Integrated Circuits Digital Logic Circuits Stack & Queue Concepts

Transcription:

MECE336 Microprocessors I Lecture 1 Introduction and Background Associate Prof. Dr. Klaus Werner Schmidt of Mechatronics Engineering Çankaya University Compulsory Course in Mechatronics Engineering Credits (3/2/4) Course Webpage: http://mece336.cankaya.edu.tr Content and Structure Content Embedded Systems and Microcontrollers PIC 16F84A Architecture Assembly Programming Basics Input/output Usage Arithmetic Operations Timers and Interrupts, Sleep Mode and Watchdog Timer Programming Examples Structure 3 lecture hours: Monday 15:20 17:10, Tuesday 9:20 10:10 2 Lab hours: Wednesday 13:20 15:10; Wednesday 15:20 17:10 Office hours: Tuesday 10:20 11:00

Grading and Literature Grading 13 Laboratories (25%) 1 Midterm Exam (25%) 1 Final Exam (35 %) 1 Project (15 %) Literature Wilmhurst, Tim: Designing Embedded Systems with PIC Microcontrollers: Principles and Applications, Elsevier Ltd., 2010 (ISBN: 9-78-1-85617-750-4) (Main Textbook) Mazidi, Muhammad Ali, McKinlay, Rolin D., Causay, Danny: PIC Microcontrollers and Embedded Systems, Pearson International Education, 2008 (ISBN: 0-13-600902-6) Embedded Systems: Basics Embedded System Definition A system whose principal function is not computational, but which is controlled by a computer embedded with it Embedded system has functionality different from only computation Some part/functionality of an embedded system needs computations A computing device is embedded in the embedded system Usage of Embedded Systems Household, office, factories Cars, trains, other vehicles Hospitals Toys

Embedded Systems: Examples Embedded Systems: Examples

Embedded Systems: Examples Embedded Systems: General Features Overview CPU performs computations Program memory stores the instructions of the desired program Data memory stores application data values Input/output block for providing input data and reading output data Arrows represent data exchange

Embedded Systems: Description Central Processing Unit (CPU) Perform arithmetic or logical computations Work through a series of instructions (program) Instructions perform simple tasks Combination of many instructions provide much computational power Input/Output Interface to the outside world Sensors/actuators (Temperature sensor, button, motor,... ) Human input devices (Keyboard, mouse, touchpad,... ) Human output devices (Monitor, display, printer,... ) Embedded Systems: Description Program Memory Holds program to execute Needs to be permanent (also if there is no power) Program is ready to run as soon as power is applied Data Memory Holds temporary data values (results of a computation,... ) Need not be permanent (can be erased if there is no power) Data Paths I/O CPU Data Memory CPU Program Memory CPU

Embedded Systems: Instructions Instruction Set Set of instructions recognized by a CPU Programs are build up from instructions Different instruction sets depending on complexity CISC: Complex Instruction Set Computer Many and sophisticated instructions with different levels of complexity Simple instructions: usually 1 byte quick execution Complex instructions: usually several bytes slow execution RISC: Reduced Instruction Set Computer Simple instruction set for fast operation Each instruction is contained in a single binary word Instruction includes code and address data Embedded Systems: Memory Types Volatile Memory Only works if device is powered and loses data if there is no power temporary data storage that can be used as data memory Usually simple semiconductor technology (easy to write) Denoted as Random Access Memory (RAM) Non-volatile Memory Retain stored value even if device is not powered permanent storage that can be used as program memory Non-volatile semiconductor technology, more difficult to write Denoted as Read-only Memory (ROM)

Embedded Systems: Memory Organization Memory Interaction Basic requirement: Read and/or write data Determine memory address and move data Usage of buses for this purpose Address bus for specifying memory address Data bus for moving data Illustration Embedded Systems: Memory Architectures Von Neumann Architecture Description One address bus One data bus Each bus serves program memory, data memory and I/O Advantage: Flexible division of memory in program and data memory Disadvantage: Shared only one component can access at a time Disadvantage: Same bus for all memory sizes (small/large words)

Embedded Systems: Memory Architectures Harvard Structure Description Every memory area has own data bus Every memory area has own address bus Each bus only serves a single memory area Advantage: Flexibility in bus size depending on memory area Advantage: Simultaneous access of different memory areas Disadvantage: Program and data memory must be separate Embedded Systems: Microprocessors (MPs) Development MP is meant as a computing device First MP developed by Intel (1970) 4-bit, 2300 transistors, 60000 operations/sec significant processing power at low cost and small space Included only CPU Functionality such as memory, I/O outside MP Current MPs also include some memory on CPU First Microprocessor

Embedded Systems: Microcontrollers (MCs) Necessity of Microcontrollers Notice that computing power can also be used for control Use microprocessors to control products such as embedded application examples Properties of such applications Small/moderate computing power requirement at possibly low price No/less need for a developed human interface Has to work in harsh environments (hot, cold, impact) Need input/output interface for sensors/actuators Compact computing device including memory and interfacing is needed Microcontrollers are developed for this purpose Embedded Systems: Microcontroller Organization Components Simple MP core Data/program memory Peripherals for interfacing Power, clock MC Examples Microchip (PIC), Atmel, Infinion, NXP, STMicroelectronics, Analog Devices, Texas Instruments This lecture: PIC 16F84A microcontroller

Numbering Systems: Decimal, Binary, Hex Decimal System (Base 10) 10 symbols: 0, 1,..., 9 Binary System (Base 2) 2 symbols: 0, 1 Hexadecimal System (Base 16) 16 symbols: 0, 1,..., 9, A, B, C, D, E, F Conversion from Decimal to Binary Use weight 2 i of the i-th bit in a binary number Example bit 6 5 4 3 2 1 0 number 1 0 0 1 1 0 1 weight 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1001101 2 = 2 6 + 2 3 + 2 2 + 2 0 = 64 + 8 + 4 + 1 = 77 10 Numbering Systems: Decimal, Binary, Hex Conversion from Binary to Decimal Example Find coefficients for each weight 2 i of the i-th bit in a binary number 45 = 1 2 5 + 0 2 4 + 1 2 3 + 1 2 2 + 0 2 1 + 1 2 0 101101 2 = 45 10 Conversion from Binary to Hexadecimal Note: 4 bits of a binary number correspond to a hexadecimal number Separate binary number into 4 bit pieces Example bit 12 11 10 9 8 7 6 5 4 3 2 1 0 number 1 0 1 0 0 1 1 0 0 0 1 1 0 weight 1 4 C 6 1010011000110 2 = 14C6 16

Numbering Systems: Decimal, Binary, Hex Conversion from Hexadecimal to Binary Write each hexadecimal symbol as 4 binary bits Example 2A7E 16 Conversion between Decimal and Hexadecimal Analogous to conversion between Decimal and Binary with base 16 Examples Number Systems: ASCII Description American Standard Code for Information Interchange Binary patterns (7 bit) for numbers, letters, punctuation marks Information can be shared among computers Examples Symbol ASCII Symbol ASCII Symbol ASCII Symbol ASCII 0 30 A 41 a 61 2A 1 31 B 42 b 62 + 2B...... 2D 8 38 Y 59 y 79 \ 2F 9 39 Z 5A z 7A? 3F

Logic Operations: AND, OR, XOR, NAND, NOR, Logic AND Input Output Logic OR Input Output Logic XOR Input Output A B A & B A B A + B A B A B 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 Logic NAND Input Output Logic NOR Input Output Logic NOT Input Output A B A & B A B A + B A A 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 Logic Operations: Examples