PIC microcontrollers. PIC Microcontrollers Families Eigenschappen De PIC16C84 Eigenschappen Pinnen Interne structuur Instructieset De PIC16F877 Eigenschappen.

Slides:



Advertisements
Similar presentations
Introduction to PIC Microcontrollers
Advertisements

Working with time: interrupts, counters and timers Chapter Six Dr. Gheith Abandah1.
م/محمد علي عطية حسين. Pin Diagram DescriptionPin Name Oscillator crystal input/external clock source input. OSC1/CLKIN Oscillator crystal output.OSC2/CLKOUT.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Microcontroller – PIC – 4 PIC types PIC architecture
By Muhammad Ali Mazidi, Rolin McKinlay, Danny Causey
Prof. Jorge A. Ramón Introducción a Microcontroladores.
An Introduction to PIC Microcontrollers Supervised by : Dr. Lo’ai Tawalbeh Jordan University of Science & Technology Faculty of Computer & Information.
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.
Microcontroller Architecture— PIC18F Family
Railway Foundation Electronic, Electrical and Processor Engineering.
Microcontroller Architecture PIC18F Family
Programming 8-bit PIC Microcontrollers in C Martin Bates Elsevier 2008.
SENIOR DESIGN 10/3.
The domestic refrigerator-An example A car door mechanism.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
Lecture - 3 PIC18 family architecture and program development
9/20/6Lecture 21 -PIC Architecture1 PIC Architecture Programmers Model and Instruction Set.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
ECE/CS-352: Embedded Microcontroller Systems Embedded Microcontroller Systems.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
Minimum Systems and the PIC 16F84A Chapter Two Dr. Gheith Abandah1.
AVR Microcontrollers.
Parallel Ports, Power Supply and the Clock Oscillator Material to be covered  Parallel I/O ports  Interfacing external switches and LEDs  Clock Oscillator.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
I/O PORTS (Simplest Peripherals) PORT A: 6 bits wide (7th and 8th bit always read as 0) PORT B: 8 bits wide PORT C: 8 bits wide PORT D: 8 bits wide.
Microprocessors A practical approach Subjects Goals for this module Results Subjects of the module Plans Questions.
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.
بسمه تعالي AVR Microcontrollers. The ATmega8 Basic Features -1.
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
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.
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.
Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil.
EEE237 Introduction to Microprocessors Week x. SFRs.
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
Saxion University of Applied Sciences Advanced Microcontrollers A practical approach.
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Department of Electronic & Electrical Engineering Template program. Input / Output (IO) ● Template program. ● Introduction to IO ● Setting up for IO ●
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 Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
PIC12F629/675. “Wide variety” 8-84 pin RISC core, 12/14/16bit program word USART/AUSART, I 2 C, ADC, ICSP, ICD OTP/UV EPROM/FLASH/ROM Families: PIC12,
Department of Electronic & Electrical Engineering Lecture 3. ● Template program. ● Introduction to IO ● PORTA PORTB TRISA TRISB ● Using a subroutine ●
Components of a typical full-featured microcontroller.
AVR Architecture Prepared By: Avdhesh Soni ( ) Sarthak Patel ( ) Akshay Parekh ( ) Fenil Sachla ( ) Guided.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
I/O PORTS. General purpose I/O pins can be considered the simplest of peripherals. They allow the PICmicro™ to monitor and control other devices. To add.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
Embedded Microcontroller Systems
Embedded Microcontroller Systems
Microprocessors and Programming Department of Mechatronics Engineering
Microprocessor Systems Design I
Microprocessor Systems Design I
Micro-Controller: PIC16C74 < Architecture >
Microprocessor Systems Design I
PIC 16F877.
Microprocessor Systems Design I
The Arduino Microcontroller: Atmel AVR Atmega 328
مقدمه با توجه به اهميت و گسترش روزافزون كاربردهاي ميكروكنترلرها و محدوديت هايي كه ميكروكنترلرهاي خانواده ي MCS51 ايجاد مي كرد،شركت Microchipنسل جديدي.
Introduction to Microprocessors and Microcontrollers
Introducing the PIC Mid-Range Family and the 16F84A
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
Microprocessors and Programming Department of Mechatronics Engineering
Presentation transcript:

PIC microcontrollers

PIC Microcontrollers Families Eigenschappen De PIC16C84 Eigenschappen Pinnen Interne structuur Instructieset De PIC16F877 Eigenschappen Interne structuur

De PIC controller Families –PIC 16C5x reeks –PIC 16Cxxx reeks –PIC 17Cxxx reeks –PIC 18Cxxx reeks Met welke hebben wij te maken ? –PIC 16C84 –PIC 16F877 –12 bit program word –14 bit program word –16 bit program word

PIC Microcontrollers Families Eigenschappen De PIC16C84 Eigenschappen Pinnen Interne structuur Instructieset De PIC16F877 Eigenschappen Interne structuur

Eigenschappen Harvard Architectuur –Program en Data Memory gebruiken verschillende bus Long Word instructions Single Word instructions Single Cycle instructions Instruction Pipelining Reduced Instruction Set Register File Architecture: –bv. 16C84 heeft 36 8-bits registers Orthogonal (symmetric) instructions –Alle instructies kunnen op elk register gebruikt worden

RISC eigenschappen

Harvard structuur

PIC Microcontrollers Families Eigenschappen De PIC16C84 Eigenschappen Pinnen Interne structuur Instructieset De PIC16F877 Eigenschappen Interne structuur

De PIC 16C84 - eigenschappen Eigenschappen –35 instructies –1K-woord EEPROM –36 8-bit interne registers –64 bytes 8-bit RAM –Hardware stack met 8 levels voor jumps –4 interrupt levels –External INT op pin RB0 –TMR0 overflow –Port B (pins 7:4) change –EEPROM write –15 special functions hardware registers –Directe, indirecte en relatieve adressering

De PIC 16C84 - pinning Pinning –13 I/O pinnen –20 mA current sink  LEDs direct aan te sturen –External interrupt op RB0 –Timer en oscillator pinnen

De PIC 16C84 - memory 2 memory blockken –Program memory –Data memory Program memory –13 bit  8K woorden –Slechts 1K ingevuld –Reset vector op 0000h –Interrupt vector op 0004h

De PIC 16C84 - memory Data memory verdeeld in –Special functions register (SFR) –General purpose SRAM –EEPROM memory Banked SFR –Keuze via het status register

De PIC 16C84 – program counter Addressering in het program memory Program counter (13 bits) = PCH (5bit) + PCL (8bit) PCL is read/write PCL heeft memory boundary van 256 bytes PCH comes from PCLATH register Vb. 16C84 heeft 1K  CALL en GOTO hebben 11 bit address Controleer of PAGE BITS juist staan !

PIC 16C84 – PORT A Twee poorten : PORTA en PORTB Selectie van Input of Output door TRIS register –TRISA en TRISB –TRISA bit = 1  INPUT –TRISA bit = 0  OUTPUT Soorten pinnen –RA3:RA0 push-pull –RA4 open collector

PIC 16C84 – PORT B Selectie van Input of Output door TRISB register –TRISA en TRISB –TRISB bit = 1  High Z –TRISB bit = 0  OUTPUT Soorten pinnen –RB7:RB4 geven interrupt

PIC 16C84 – Timer Instelling gestuurd door OPTION register Functies: 8 bit read/write 8 bit prescaler Select : internal or external clock Interrupt on overflow

PIC 16C84 – Speciale functies EEPROM programmeerbaar in normale werking In-circuit serial programming Watchdog timer Power-up timer Code protection SLEEP mode voor low-current operation Clock met crystal of goedkoop RC circuit

PIC 16C84 – programmatie Definities –f : register file address, gaat van 0x00 tot 0x7f –b : bit address within an 8- bit file register –W: Working register (Accumulator) –d : destination Als d=0 : result in W Als d=1 : result in file register (default) –k : constant or label

PIC 16C84 – instruction set Algemeen Bit-oriented

PIC 16C84 – instruction set Literal and Control Voorbeeld: wis geheugen van 0x20 tot 0x2F movlw0x20;initialize W register B movwfFSR;put in FSR register LOOPclrfINDF;clear indirect with FSR incfFSR;increment FSR register btfssFSR,7;bit 7 test, skip if set gotoLOOP;if NO, goto LOOP CONTINUE :;if YES, continue :

PIC 16C84 – Vb. instructies MOVF reg7equ07h Wequ0 movfreg7,W

PIC 16C84 – Vb. instructies MOVWF

PIC 16C84 – Vb. instructies MOVLW

PIC 16C84 – Vb. gebruik Verwissel inhoud van w met de inhoud van reg Kortere methode movwftemp1;save w movfreg,W;save reg movwftemp2 movftemp1,W;old (w) -> reg movwfreg movftemp2,W;old (reg) -> w ; w = AA ; reg = xorwfreg,F;w = AA, reg = FF xorwfreg,W;w = 55, reg = FF xorwfreg,F;w = 55, reg = AA

PIC 16C84 – toepassing 1: seriële poort

PIC 16C84 – toepassing 2: LCD display

PIC Microcontrollers Families Eigenschappen De PIC16C84 Eigenschappen Pinnen Interne structuur Instructieset De PIC16F877 Eigenschappen Interne structuur

De PIC 16F877 Complexer 40 pins IC 8 K Woord (14 bit) Program memory 368 Bytes data memory 256 Bytes EEPROM Ook hier slechts 35 instructies. Speciale functies: –10 kanaals 8-bit analog input –SPI seriële poort –USART seriële communicatie –Brown-out detection –In-circuit programmable

PIC 16F877 - geheugen Program Memory Banked memory: instelbaar met het STATUS register

PIC 16F877 - geheugen Data Memory

PIC 16F877 – I/O poorten 3 Input/Output poorten –PORT A : push-pull op RA3:RA0 en RA5 Open collector op RA4

PIC 16F877 – I/O poorten PORT B : High Z inputs RB7:RB4 aangesloten op de interrupt

PIC 16F877 – I/O poorten PORT C : TRIS C=1 : INPUT TRIS C=0 : OUTPUT Meerdere functies. O.a. Schmitt trigger

PIC 16F877 – I/O poorten Andere poorten: –PORT D/TRIS D: Schmitt-trigger input buffer –PORT E/TRIS E : Schmitt-trigger input buffers –Analoge ingangen: verspreid over andere poorten