Microcontroller Architecture PIC18F Family

Slides:



Advertisements
Similar presentations
Parul Polytechnic Institute
Advertisements

Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
PCEL4303 MICROPROCESSOR & MICRO CONTROLLERS MODULE - I (10 hours) Microprocessor Architecture: Microprocessor and Microcomputer Architecture, Pins & Signals,
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Input/Output (I/O) Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Microprocessor and Microcontroller Fundamentals
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
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.
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
By Muhammad Ali Mazidi, Rolin McKinlay, Danny Causey
Introduction of Holtek HT-46 series MCU
1-1 Microprocessor Engineering Microprocessor Systems Microcontrollers Infineon 16-bit Processor Family  specifically 167CS microcontroller C Programming.
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Microcontroller Architecture— PIC18F Family
Railway Foundation Electronic, Electrical and Processor Engineering.
Microcontroller based system design
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.
Atmega32 Architectural Overview
CS-280 Dr. Mark L. Hornick 1 Parts of a GP Computer (Microcomputer) Contains separate Microprocessor chip Memory/Memory controller MB control chips Peripheral.
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Stacks and Subroutines ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Microcontrollers Microcontroller (MCU) – An integrated electronic computing device that includes three major components on a single chip Microprocessor.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Input/Output Ports and Interfacing
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Programming and Problem Solving ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Computer Fundamentals ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
Directives, Memory, and Stack. Directives Special commands to the assembler May or may not generate machine code Categories by their function Programming.
ECP2036 Microprocessor and Interfacing Registers Control & Status Registers Program Counter User-Visible Registers Instruction Register... General-Purpose.
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.
PIC18F Programming Model and Instruction Set
MICROPROCESSOR AND MICRO CONTROLLER
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
MICROOCESSORS AND MICROCONTROLLER:
Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Computer Architecture Lecture 5 by Engineer A. Lecturer Aymen Hasan AlAwady 25/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
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.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Department of Electronic & Electrical Engineering Lecture 2. PIC16F84A Architecture / Instructions Memory. Program/Data (Harvard) File Registers (Data).
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
8085 Microprocessor: Architecture & Support Components.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
MICROPROCESSOR INTEL 8086/8088 BY: SERA SYARMILA SAMEON.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
“Atmega32 Architectural Overview” SIGMA INSTITUTE OF ENGINEERING Prepared By: SR.NO NAME OF STUDENT ENROLLMENT 1 Parihar Shipra A Guided By:-
The 8085A is a general-purpose microprocessor with low hardware overhead requirements. Within the 8085A are contained the functions of clock generation,
Seminar On 8085 microprocessor
Microprocessor and Microcontroller Fundamentals
Microprocessor and Microcontroller Fundamentals
Input/Output Ports and Interfacing
Atmega32 Architectural Overview
Microprocessor Systems Design I
UNIT – Microcontroller.
Microprocessor Systems Design I
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
Dr. Michael Nasief Lecture 2
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Introduction to Microprocessors and Microcontrollers
Number Representations and Basic Processor Architecture
EECE.3170 Microprocessor Systems Design I
Presentation transcript:

Microcontroller Architecture PIC18F Family ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning ELEC 330

PIC18F Microcontrollers Microcontroller Unit (MCU) Microprocessor unit (MPU) Harvard Architecture Program memory for instructions Data memory for data I/O ports Support devices such as timers 330_02

Microcontroller Unit 330_02

PIC18F – MPU and Memory 330_02

Microprocessor Unit Includes Arithmetic Logic Unit (ALU), Registers, and Control Unit Arithmetic Logic Unit (ALU) Instruction decoder 16-bit instructions Status register that stores flags 5-bits WREG – working register 8-bit accumulator 330_02

Microprocessor Unit Registers Control unit Program Counter (PC) 21-bit register that holds the Program Memory address Bank Select Register (BSR) 4-bit register used in direct addressing the Data Memory File Select Registers (FSRs) 12-bit registers used as memory pointers in indirect addressing Data Memory Control unit Provides timing and control signals Read and Write operations 330_02

PIC18F - Address Buses Address bus 21-bit address bus for Program Memory Addressing capacity: 2 MB 12-bit address bus for Data Memory Addressing capacity: 4 KB 330_02

Data Bus and Control Signals 16-bit instruction/data bus for Program Memory 8-bit data bus for Data Memory Control signals Read and Write 330_02

PIC18F452/4520 Memory Program Memory: 32 K Data Memory: 4 K Address range: 000000 to 007FFFH Data Memory: 4 K Address range: 000 to FFFH Data EEPROM Not part of the data memory space Addressed through special function registers 330_02

PIC18F452/4520 Memory Program Memory Data Memory 330_02

Data Memory Banks 330_02

PIC18F452 I/O Ports Five I/O ports PORT A through PORT E Most I/O pins are multiplexed Generally have eight I/O pins Addresses already assigned to these ports Each port is identified by its assigned SFR 330_02

I/O Ports A and B 330_02

Data Transfer 330_02

MCU Support Devices Timers Serial Communications A/D converter Capture, Compare and PWM (CCP Modules) Serial Communications Master Synchronous Serial Port (MSSP) Addressable USART A/D converter Parallel Slave Port (PSP) Data EEPROM 330_02

MCU Support Devices 330_02

PIC18F Special Features Sleep mode Watchdog timer (WDT) Code protection In-circuit serial programming In-circuit debugger 330_02

PIC18F4X2 Architecture Block Diagram

PIC18F452 Programming Model 330_02

330_02

PIC18F Instructions 77 assembly language instructions Earlier PIC families have 33 or 35 instructions PIC18F instruction set Most instructions are 16-bit word length Four instructions are 32-bit length 330_02

Instruction Descriptions Copy (Move) 8-bit number (Literal) into W register Mnemonics: MOVLW 8-bit Binary format: 0000 1110 XXXX XXXX (any 8-bit number) Copy (Move) contents of W register into PORTC (File) Mnemonics: MOVWF PORTC, a (‘a’ indicates that PORTC is in the Access Bank) 0110 1110 1000 0010 (82H is PORTC address) 330_02

Illustrative Program Problem statement: Hardware: Write instructions to light up alternate LEDs at PORTC Hardware: PORTC Bidirectional (input or output) port Setup as output port for display Logic 1 will turn on an LED 330_02

Illustration Interfacing LEDs to PORTC 330_02

Illustration Program (software) Logic 0 to TRISC sets up PORTC as an output port Byte 55H turns on alternate LEDs MOVLW 00 ;Load W register with 0 MOVWF TRISC ;Set up PORTC as output MOVLW 0x55 ;Byte 55H to turn on LEDS MOVWF PORTC ;Turn on LEDs SLEEP ;Power down 330_02

Illustration Address Hex Mnemonics Comments 000000 0E00 MOVLW 00 ;Load W with 0s 000002 6E94 MOVWF TRISC ;Set PORTC as output 000004 0E55 MOVLW 0x55 ;Load 55 to turn on LEDs 000006 6E82 MOVWF PORTC ;Turn on LEDs 000008 0003 SLEEP ;Power Down 330_02 ELEC 330

Illustration Execution of the instruction: MOVWF PORTC 330_02

PIC18 Simulator IDE 330_02 ELEC 330

Embedded System MCU-based System 330_02