Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.

Slides:



Advertisements
Similar presentations
Introduction to PIC Microcontrollers
Advertisements

8051 Core Specification.
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
STREET LIGHTS THAT GLOW FOR 1/2KM ONLY ON DETECTING VEHICLE MOVEMENT
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
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 29: Microcontroller intro.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
BILAL AHMED BHATTI B.E Electronics (Specialization in AVIONICS)
Submitted by:. CONTENTS Introduction Block diagram Power supply PIC Microcontroller BLDC Motor Opto-isolator MOSFET IR LED & Photodiode Keypad LCD Schematic.
GSM BASED ENERGY METER BILLING WITH LOAD CONTROL Submitted By.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
VEHICLE THEFT INTIMATION TO THE OWNER ON HIS CELL PHONE BY GSM
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
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.
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.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
SOLAR CELL PARAMETERS MEASUREMENT
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.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
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.
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,
CPE 323 Introduction to Embedded Computer Systems: The MSP430X Architecture Instructor: Dr Aleksandar Milenkovic.
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.
HJD Institute of Technical Education & Research- Kera(Kutch) The 8051 Microcontroller architecture PREPARED BY: RAYMA SOHIL( )
INTRODUCTION TO PIC MICROCONTROLLERS INTRODUCTION TO PIC MICROCONTROLLERS Dr.Y.Narasimha Murthy Ph.D SRI SAIBABA NATIONAL COLLEGE(AUTONOMOUS)
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Criteria for choosing a microcontroller A microcontroller must meet the task at hand efficiency and cost effectively. Speed. What is highest speed of.
Special Features. Device Configuration bits Revision Device Configuration bits Revision On-chip Power-on Reset (POR) Revision On-chip Power-on Reset (POR)
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:
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
VEHICLE MOVEMENT SENSED LED STREET LIGHT WITH IDLE TIME DIMMING
PIC CONTROLLED DYNAMIC TIME BASED CITY TRAFFIC SIGNAL
MULTIPLE SENSOR DATA ACQUISITION
MEASURING SOLAR PHOTOVOLTAIC POWER
PORTABLE PROGRAMMABLE MEDICATION REMINDER
Medication Reminder using PIC Microcontroller
Networking of Multiple street junction signals for better traffic management Submitted by:
DTMF BASED REMOTE INDUSTRIAL LOAD AND/OR AGRICULTURAL PUMP CONTROL
Microprocessors and Programming Department of Mechatronics Engineering
Microprocessor Systems Design I
Microprocessor Systems Design I
DENSITY BASED TRAFFIC LIGHT TIMING CONTROL
Micro-Controller: PIC16C74 < Architecture >
Microprocessor Systems Design I
SYNCHRONIZED TRAFFIC JUNCTION SIGNALING (GET GREEN SIGNAL ALL-THROUGH AT ANY STREET JUNCTION)-A NEW CONCEPT TO EASE TRAFFIC CONGESTION IN METROS Submitted.
Project Title EVM IN PIC Under the Guidance of Submitted by.
PIC 16F877.
Microprocessor Systems Design I
RFID SECURITY ACCESS CONTROL SYSTEM
Introduction to Microprocessors and Microcontrollers
PIC Microcontroller What is PC LATH?????.
EE Embedded Systems Fall 2015
Architectural Overview
Introducing the PIC Mid-Range Family and the 16F84A
AVR – ATmega103(ATMEL) Architecture & Summary
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
A PROJECT ON PASSWORD BASED CONTROL SYSTEM. A PROJECT ON PASSWORD BASED CONTROL SYSTEM.
Microprocessors and Programming Department of Mechatronics Engineering
Presentation transcript:

Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x

Prepared by Eng. Musa Alyaman2 PIC16F87XA

Prepared by Eng. Musa Alyaman3 Devices Included in this Data Sheet PIC16F873A PIC16F874A PIC16F876A PIC16F877A

Prepared by Eng. Musa Alyaman4 High Performance RISC CPU Only 35 single word instructions to learn All single cycle instructions except for program branches, which are two-cycle Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory Pin out compatible to other 28-pin or 40/44-pin PIC16CXXX and PIC16FXXX microcontrollers

Prepared by Eng. Musa Alyaman5 Peripheral Features Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 16-bit timer/counter with crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Two Capture, Compare, PWM modules - Capture is 16-bit, max. resolution is 12.5 ns - Compare is 16-bit, max. resolution is 200 ns - PWM max. resolution is 10-bit Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection Brown-out detection circuitry for Brown-out Reset (BOR)

Prepared by Eng. Musa Alyaman6 Analog Features 10-bit, up to 8 channel Analog-to-Digital Converter (A/D) Brown-out Reset (BOR) Analog Comparator module with: - Two analog comparators - Programmable on-chip voltage reference (VREF) module - Comparator outputs are externally accessible

Prepared by Eng. Musa Alyaman7 Special Microcontroller Features 100,000 erase/write cycle Enhanced FLASH program memory typical 1,000,000 erase/write cycle Data EEPROM memory typical Data EEPROM Retention > 40 years In-Circuit Serial Programming™ (ICSP™) via two pins Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation Programmable code protection Power saving SLEEP mode Selectable oscillator options In-Circuit Debug (ICD) via two pins

Prepared by Eng. Musa Alyaman8 CMOS Technology Low power, high speed FLASH/EEPROM technology Wide operating voltage range (2.0V to 5.5V) Commercial and Industrial temperature ranges Low power consumption

Prepared by Eng. Musa Alyaman9 PIC16F87XA DEVICE FEATURES

Prepared by Eng. Musa Alyaman10 The Core 16F873/16F876

Prepared by Eng. Musa Alyaman11 The Core 16F874/16F877

Prepared by Eng. Musa Alyaman12 Program Memory

Prepared by Eng. Musa Alyaman13 Program Memory Paging PCL and PCLATH The program counter (PC) is 13 bits wide. The low byte comes from the PCL register, which is a readable and writable register. The upper bits (PC ) are not readable, but are indirectly writable through the PCLATH register. On any RESET, the upper bits of the PC will be cleared. The following Figure shows the two situations for the loading of the PC. The upper example in the figure shows how the PC is loaded on a write to PCL (PCLATH → PCH). The lower example in the figure shows how the PC is loaded during a CALL or GOTO instruction (PCLATH → PCH).

Prepared by Eng. Musa Alyaman14 Program Memory Paging

Prepared by Eng. Musa Alyaman15 Program Memory Paging COMPUTED GOTO A computed GOTO is accomplished by adding an offset to the program counter (ADDWF PCL). When doing a table read using a computed GOTO method, care should be exercised if the table location crosses a PCL memory boundary (each 256 byte block). STACK The PIC16F87XA family has an 8-level deep x 13-bit wide hardware stack. The stack space is not part of either program or data space and the stack pointer is not readable or writable. 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. The stack operates as a circular buffer. This means that after the stack has been PUSHed eight times, the ninth push overwrites the value that was stored from the first push. The tenth push overwrites the second push (and so on). Call & Goto All PIC16F87XA devices are capable of addressing a continuous 8K word block of program memory. The CALL and GOTO instructions provide only 11 bits of address to allow branching within any 2K program memory page. When doing a CALL or GOTO instruction, the upper 2 bits of the address are provided by PCLATH. When doing a CALL or GOTO instruction, the user must ensure that the page select bits are programmed so that the desired program memory page is addressed. If a return from a CALL instruction (or interrupt) is executed, the entire 13-bit PC is popped off the stack. Therefore, manipulation of the PCLATH bits is not required for the return instructions (which POPs the address from the stack).

Prepared by Eng. Musa Alyaman16 Program Memory Paging

Prepared by Eng. Musa Alyaman17 Program Memory Paging

Prepared by Eng. Musa Alyaman18 Program Memory Paging

Prepared by Eng. Musa Alyaman19 Data Memory

Prepared by Eng. Musa Alyaman20 DIRECT/INDIRECT ADDRESSING

Prepared by Eng. Musa Alyaman21 CONFIGURATION WORD (ADDRESS 2007h)

Prepared by Eng. Musa Alyaman22 Status Register

Prepared by Eng. Musa Alyaman23 INTERRUPT LOGIC

Prepared by Eng. Musa Alyaman24 INTCON Register

Prepared by Eng. Musa Alyaman25 PIE1 Register

Prepared by Eng. Musa Alyaman26 PIR1 Register

Prepared by Eng. Musa Alyaman27 PIE2 Register

Prepared by Eng. Musa Alyaman28 PIR2 Register

Prepared by Eng. Musa Alyaman29 References 1. An Introduction to the Design of Small-Scale Embedded Systems, 1st Ed. By: Tim Wilmshurst Palgrave, The PIC Microcontroller Book 3. Computer Organization & Design by Patterson & Hennessy. 4. Intel Website MicroChip web site 6. The PIClist internet site.