Microprocessor Systems Design I

Slides:



Advertisements
Similar presentations
MC68HC11 System Overview. System block diagram (A8 version)
Advertisements

Course Overview and The 8051 Architecture
Microcontroller – PIC – 4 PIC types PIC architecture
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2013 Lecture 26: PIC microcontroller intro.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 30: PIC data memory.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Microprocessor Systems Design I
Microcontroller Architecture— PIC18F Family
Microcontroller Architecture PIC18F Family
Embedded System Spring, 2011 Lecture 3: The PIC Microcontrollers Eng. Wazen M. Shbair.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Programming 8-bit PIC Microcontrollers in C Martin Bates Elsevier 2008.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Directives, Memory, and Stack. Directives Special commands to the assembler May or may not generate machine code Categories by their function Programming.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
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.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
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.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
Components of a typical full-featured microcontroller.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
Memory Organization 1.  3 types of memory are used in PIC18 microcontroller devices: Program Memory - Flash Memory Data RAM - Static RAM Data EEPROM.
Introduction to Microcontroller Technology
Embedded Microcontroller Systems
Seminar On 8085 microprocessor
Popular Microcontrollers and their Selection by Lachit Dutta
Embedded Systems Programming
MICROCONTROLLER ARCHITECTURE & ASSEMBLY LANGUAGE PROGRAMMING
Microprocessor and Microcontroller Fundamentals
Atmega32 Architectural Overview
Microprocessor Systems Design I
Microcontrollers & GPIO
Microprocessor Systems Design I
Embedded Microcontroller Systems
MCI PPT AVR MICROCONTROLLER Mayuri Patel EC-1 5th sem
Microprocessor Systems Design I
UNIT – Microcontroller.
Microprocessor Systems Design I
Micro-Controller: PIC16C74 < Architecture >
Microprocessor Systems Design I
Course Overview and The 8051 Architecture
PIC 8 BIT AND 16 BIT MICROCONTROLLER ARCHITECTURE
Microprocessor Systems Design I
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Microcontroller Intel 8051
Subject Name: Microcontroller Subject Code: 10ES42
مقدمه با توجه به اهميت و گسترش روزافزون كاربردهاي ميكروكنترلرها و محدوديت هايي كه ميكروكنترلرهاي خانواده ي MCS51 ايجاد مي كرد،شركت Microchipنسل جديدي.
Introduction to Microprocessors and Microcontrollers
PIC Microcontroller What is PC LATH?????.
Tiny Computers, Hidden Control
EE Embedded Systems Fall 2015
Introducing the PIC Mid-Range Family and the 16F84A
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
EECE.3170 Microprocessor Systems Design I
Introduction to Microprocessor Programming
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
Computer Operation 6/22/2019.
MCU – Microcontroller Unit – 2
Presentation transcript:

16.317 Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2015 Lecture 18: PIC microcontroller intro

Microprocessors I: Lecture 20 Lecture outline Announcements/reminders HW 3 due today HW 4 to be posted; due date TBD Today’s lecture: PIC microcontroller intro 6/27/2018 Microprocessors I: Lecture 20

Overview of Microcontrollers 6/27/2018 Overview of Microcontrollers Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip. Reference: http://mic.unn.ac.uk/miclearning/modules/micros/ch1/micro01notes.html#1.4 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microcontroller features Processor Usually general-purpose but can be app-specific On-chip memory Often RAM for data, EEPROM/Flash for code Integrated peripherals Common peripherals Parallel I/O port(s) Clock generator(s) Timers/event counters Special-purpose devices such as: Analog-to-digital converter (sensor inputs) Mixed signal components Serial port + other serial interfaces (SPI, USB) Ethernet 6/27/2018 Microprocessors I: Lecture 20

Microcontroller features Benefits Typically low-power/low-cost Target for embedded applications Easily programmable Simple ISAs (RISC processors) Use of development kits simplifies process Limitations Small storage space (registers, memory) Restricted instruction set May be required to multiplex pins Not typically used for high performance 6/27/2018 Microprocessors I: Lecture 20

Microprocessors I: Lecture 20 PIC microcontrollers Manufactured by Microchip Technology High performance/low cost for embedded applications Work strictly with 8-bit data* *unless you’re using one of the newer 16- or 32-bit ones Varying complexity, characterized by Interfaces supported SPI, I2C, Ethernet, etc. Number of instructions Anywhere from ~35 to ~80 Amount of internal memory available Internal modules Capture, compare, timers, etc. 6/27/2018 Microprocessors I: Lecture 20

Microprocessors I: Lecture 20 6/27/2018 PIC16F1829 Mid-range PIC microcontroller 49 different instructions Interrupt capability Direct, indirect, relative addressing mode Low Power 650nA @ 32KHz, 1.8V Peripheral Features Up to 17 I/O pins with individual direction control 10-bit A/D converter 8/16-bit timer/counters Special Microcontroller Features Internal/external oscillator Power saving sleep mode High Endurance Flash/EEPROM cell 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 6/27/2018 PIC16F1829 Block Diagram 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 PIC16F1829 CPU Block Diagram 6/27/2018 Microprocessors I: Lecture 20

Microprocessors I: Lecture 20 6/27/2018 PIC16F1829 Pinout 20 pins Mostly I/O ports A/B/C Some pins multiplexed for in circuit debug (ICD) 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 6/27/2018 Harvard vs Von Neumann Organization of program and data memory PIC MCU technically “modified Harvard architecture” 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 6/27/2018 Program Memory Space 15-bit program counter to address 32K locations Each location is 14-bit wide (instructions are 14 bits long) RESET vector is 0000h When the CPU is reset, its PC is automatically cleared to zero. Interrupt Vector is 0004h 0004h is automatically loaded into the program counter when an interrupt occurs Vector  address of code to be executed for given interrupt 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 6/27/2018 Data Memory Map Core registers Affect basic operation of device Shared across all banks Special function registers (SFRs) Control peripheral operations General purpose registers/RAM (GPRs) Data storage/scratch pad operations Common RAM Same 16 bytes accessible in all banks 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 Core registers WREG, the working register To move values from one register to another register, the value must pass through the W register. FSR0/FSR1, File Select Register Indirect data memory addressing pointer INDF0/INDF1 accessing INDF accesses the location pointed by IRP+FSR PC, the Program Counter, PCL/PCLATH BSR, Bank Select Register Selects which bank of memory is actually being accessed 6/27/2018 Microprocessors I: Lecture 20

Microprocessors I: Lecture 20 6/27/2018 PCL and PCLATH PC: Program Counter, 15 bits PCL (02h): 8 bits, the lower 8 bits of PC PCLATH (0Ah): PC Latch, provides the upper 7 bits of PC when PCL is written Can change by Writing PCL directly Jump (GOTO) Calling function (CALL, CALLW) Relative branches (BRA/BRW) 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 6/27/2018 STATUS register STATUS NOT_TO: Time Out bit, reset status bit NOT_PD: Power-Down bit, reset status bit Z: Zero bit ~ ZF in x86 DC: Digital Carry bit ~ AF in x86 C: Carry bit ~ CF in x86 (note: for subtraction, borrow is opposite) 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 Stack 16-level deep x 15-bit wide hardware stack The stack space is not part of either program or data space The PC is “PUSHed” onto the stack when a CALL instruction is executed, or an interrupt causes a branch. The stack is “POPed” in the event of a RETURN, RETLW or a RETFIE instruction execution. However, NO PUSH or POP instructions ! The stack operates as a circular buffer: After the stack has been PUSHed 16 times, the 17th push overwrites the value that was stored from the first push. Can track stack overflow/underflow to handle such conitions 6/27/2018 Microprocessors I: Lecture 20

Microprocessors I: Lecture 20 6/27/2018 Banking Data memory is partitioned into banks In this PIC family, each bank holds 128 bytes (max offset = 7Fh) 16F1829 has 32 banks (bank 0-bank 31) Total data memory: 32 * 128 = 4096 = 4 KB Overall data memory address: 12 bits Upper 5 bits: bits 4:0 from BSR (bank select) To switch banks, simply write new bank number to BSR Lower 7 bits: bits 6:0 from instruction 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Direct/Indirect Addressing 6/27/2018 Direct/Indirect Addressing 6/27/2018 Microprocessors I: Lecture 20 Chapter 9

Microprocessors I: Lecture 20 Final notes Next time: Start discussing PIC instruction set Reminders: HW 3 due today HW 4 to be posted; due date TBD 6/27/2018 Microprocessors I: Lecture 20