1 Introduction to Microcontroller Microcontroller Fundamentals & Programming.

Slides:



Advertisements
Similar presentations
Microprocessors.
Advertisements

MC68HC11 System Overview. System block diagram (A8 version)
Chapter 2 HARDWARE SUMMARY
EE 362 Microprocessor Systems and Interfacing © 1-1 Lecture 1: Introduction to Microprocessor Based Systems Microprocessor Architecture Microprocessor.
ECP2036 Microprocessor and Interfacing
Processor Function Topic 3.
Processor System Architecture
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name of Unit : Introduction to Microprossor.
1.21 Introduction to microprocessors KUEU 2135 / KBEB 2193 Mikropemproses dan Sistemnya.
TK 2633 Microprocessor & Interfacing
A Brief History of Microprocessors Module M13.1 Sections 1.1, 9.1.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Motorola HC11 Fun with Microcontrollers. Microcontrollers What is a microcontroller? A processor Usually not cutting edge Dependable All major bugs well.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
EET 2261 Unit 2 HCS12 Architecture
Computer Architecture
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
1 Neutron Monitor Workshop 3(A): Microcontroller Principles and the Demo Board Mahidol University January 5, 2010 Paul Evenson University of Delaware Bartol.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Rabel Talpur:12BME#025.  40-pin chip  Developed by Motorola in 1975  16 address lines and 8 data lines  Used only +5V.
INTRODUCTION TO MICROCONTROLLER. What is a Microcontroller A microcontroller is a complete microprocessor system, consisting of microprocessor, limited.
Introduction Part 1 The Microprocessor Based Systems  Memory and I/O System  Microprocessor.
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.
An Introduction to 8086 Microprocessor.
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Physics 413 Chapter 1: Introduction to the HCS 12 Microcontroller.
EECC250 - Shaaban #1 Lec # 20 Winter Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:
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.
The KC-85 and the U880 Team members: Nadine Spörl Angela Roggan Martin Burkard Alexander Becker.
Motorola HC11 Fun with Microcontrollers and Embedded Systems.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Internal Input/Output Devices (I/O Subsystems)
ECE Lecture 1 Microcontroller Concepts. Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device Data.
ECE Lecture 13 Motorola 68HC11. Resources 68HC11 E-series Reference Guide and if necessary 68HC11 E-series Technical Data 68HC11 Reference Manual.
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
Lecture 2 Microprocessor Architecture Image from:
 Introduction to Micro processor Introduction to Micro processor  Microprocessor instruction and opcodes Microprocessor instruction and opcodes  Mnemonics.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Z80 Overview internal architecture and major elements of the Z80 CPU.
Computer Organization 1 Instruction Fetch and Execute.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
MICROOCESSORS AND MICROCONTROLLER:
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Microcontroller Fundamentals & Programming Arithmetic Instructions.
1 The Instruction Set Architecture September 27 th, 2007 By: Corbin Johnson CS 146.
Presented by Sadhish Prabhu
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Embedded Systems Lecture 5 January 25 th, 2016.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Lec. 10 Assembly Programming Dr. Tamer Samy Gaafar Microprocessors.
Block diagram of a computer system Basic components of a computer system using block diagrams: Cpu Memory Input and output unit Evolution of microprocessor.
EE345 Chapter 2 Lecture 3 April 4. Quiz every Wednesday 1 quiz = 1% extra credit five quizzes before midterm  5% for midterm. five quizzes before final.
1 ECE 372 – Microcontroller Design Basic Assembly Programming for(j=0; j
Addressing Modes in Microprocessors
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
Introduction of microprocessor
Introduction of microprpcessor
Introduction to Microprocessors and Microcontrollers
Number Representations and Basic Processor Architecture
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Introduction of microprpcessor
Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

1 Introduction to Microcontroller Microcontroller Fundamentals & Programming

2 Microprocessors What is a microprocessor? Only a Central Processing Unit (CPU) Has Address, Data and Control Buses Note: By itself, it is totally useless.

3 Microcontrollers What is a microcontroller? A processor Parallel and serial digital I/O Analog I/O Counters and timers Internal ROM and/or EPROM

4 What are microcontrollers used in? Watches Microwaves Stereo Receivers Some products that you might know: NASA’s Sojourner Rover – 8-bit Intel 80C85 Palm Vx handheld – 32-bit Motorola Dragonball EZ Sonicare toothbrush – 8-bit Zilog Z8 The Vendo V-MAX 720 Soda Machine – Motorola HC11 Microcontrollers

5 Microcontrollers are a large market

6 Microcontrollers So what languages are they being programmed in? Assembly~ 21%~ 10% C~ 69%~ 80% C++~ 5%~ 6% Java~ 1 %~ 2% Other~ 3 %~ 2% Source: TRON Association Survey 1998/99 & 1999/2000

7 68HC11 Motorola 68HC11E9 (features) ROM (12KB), EEPROM (512B), RAM (512B) Counter/Timer system A/D converter Parallel I/Os Expansion bus Serial communication

8 68HC11 68HC11E9 Architecture 12 KBYTES ROM 512 BYTES RAM

9 68HC11 CPU Memory Map of MC68HC11E9

10 68HC11 CPU 68HC11 Programmer’s Model

11 68HC11 CPU 68HC11 Programmer’s Model

12 68HC11 CPU Accumulator A and B ACCA or ACCB is a 8-bit general-purpose registers. Stores temporary data from memory or I/O devices. Stores result of all arithmetic and logic operations. D7 D6 D5 D4 D3 D2 D1 D ACCA or ACCB

13 68HC11 CPU Accumulator A & B Example: 1. LDAA $8000 ; loads contents of memory ; location $8000 into ACCA 2. ADDA #$25; ACCA = ACCA + $25 3. STAA $9000; store result of ACCA into ; memory location $9000

14 68HC11 CPU 68HC11 Programmer’s Model

15 68HC11 CPU Accumulator D ACCD represents Accumulator-D ACCD = (ACCA + ACCB) to form a 16-bit register. ACCA represents most significant byte (MSByte) ACCB represents least significant byte (LSByte) ACCD ACCA ACCB

16 68HC11 CPU 68HC11 Programmer’s Model

17 68HC11 CPU Index Register X and Y Index register X and Y are two 16-bit registers. Use in Index Addressing Mode. Examples: LDX #$1000 ;loads $1000 into IX LDAA $10,X ;memory ($10+IX) content ;load to ACCA IX or IY registers

18 68HC11 CPU 68HC11 Programmer’s Model

19 68HC11 CPU Stack Pointer (SP) Stack occupied a small section in RAM memory. Stack Pointer (SP) register: a 16-bit register. contains address of the stack. Application of stack : used in subroutine and interrupts operations storing all the CPU registers contents SP Register

20 68HC11 CPU 68HC11 Programmer’s Model

21 68HC11 CPU Program Counter (PC) Program Counter (PC) is a 16-bit register. PC contains address of next instruction to be executed. Example: If PC = $0100, then; CPU starts executing from memory location $0100 onwards Program Counter

22 68HC11 CPU 68HC11 Programmer’s Model

23 68HC11 CPU Condition Code Register (CCR) CCR is an 8-bit register. Bits 7 to 0 labeled as S X H I N Z V C respectively. H, N, Z, V, C bits indicate status of last arithmetic or logic operation. S, X, I bits indicate the masking bits. D7 D6 D5 D4 D3 D2 D1 D0 S X H I N Z V C Condition Code Register (CCR)

24 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

25 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

26 68HC11 CPU N (Negative) bit When the result of last arithmetic or logical operation is negative; then N = “1” (MSB = “1”) Whenever the result is positive; then N = “0” (MSB = “0”) Example (1)LDAA #$7F; N = “0”, msb = “0” (2)LDAB #$80; N = “1”, msb = “1”

27 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

28 68HC11 CPU Z (Zero) bit Z = “1” - result of last operation produces zero. - accumulator content = $00 Z = “0”- result of last operation greater than zero. - accumulator content = $00 Example (1)LDAA #$00 ; Z = “1”, ACCA = 0 (2)LDAB #$01 ; Z = “0”, ACCB > 0

29 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

30 68HC11 CPU C (Carry) bit C =“1” - addition or subtraction produces a carry or a borrow. C =“0”- after addition or subtraction no carry or no borrow. *Note: C-bit also used in shift and rotate instructions. Example: LDAA #$80 ADDA #$90 ; C=“1” WAI ; bit-7 carries “1” to C-bit

31 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

32 68HC11 CPU V (Overflow) bit V =“1”- result is wrong, after an addition or subtraction on 2’s complement signed number caused an overflow V =“0” - result is correct, after an addition or subtraction on 2’s complement signed number, no overflow

33 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

34 68HC11 CPU H (Half-carry) bit H =“1”- an 8-bit addition, produces a carry from bit-3 to bit-4. H =“0”- an 8-bit addition, produces no carry from bit-3 to bit-4. Example: LDAA #% ADDA #% ; H=“1” WAI ; (after adding) 1+1 produces a carry

35 68HC11 CPU CCR Explained Stop Disable X-Interrupt Mask Half Carry I-Interrupt Mask Carry Overflow Zero Negative S X H I N Z V C

36 HC11 CPU IInterrupt Mask XXIRQ mask SDisable STOP instructions Note: Bits set by the user to tell the processor how to do things Command Register

37 HC11 CPU Thank You