EE Embedded Systems Fall 2015

Slides:



Advertisements
Similar presentations
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Advertisements

16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
ASPPRATECH.
Microprocessor and Microcontroller Based Systems
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
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.
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.
The Microprocessor-based PC System Microprocessor Course Electrical Engineering Department University of Indonesia.
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
MACHINE CYCLE AND T-STATE
Chapter Microcontroller
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
CPE 323 Introduction to Embedded Computer Systems: The MSP430X Architecture Instructor: Dr Aleksandar Milenkovic.
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
The 8085A is a general-purpose microprocessor with low hardware overhead requirements. Within the 8085A are contained the functions of clock generation,
An Introduction to Embedded Systems, and the PIC Microcontroller Lecture 8: Interrupts The aims of this session are to explore the structure and application.
Introduction to Microcontroller Technology
Embedded Microcontroller Systems
Embedded Systems Programming
COURSE OUTCOMES OF Microprocessor and programming
Everybody.
The 8085 Microprocessor Architecture
Embedded Microcontroller Systems
Computing Systems Organization
For further information
Microprocessors and Programming Department of Mechatronics Engineering
Microprocessor Systems Design I
UNIT – Microcontroller.
Microprocessor Systems Design I
CPU Sequencing 6/30/2018.
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Microprocessor Systems Design I
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Introduction of microprocessor
The 8255 Programmable Peripheral Interface
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
INTRODUCTION TO MICROPROCESSORS
Microprocessor Systems Design I
contains 8086 processor and several additional functional chips: clock generator 2 independent DMA channels PIC 3 programmable 16-bit timers.
INTRODUCTION TO MICROPROCESSORS
E3165 DIGITAL ELECTRONIC SYSTEM
INTRODUCTION TO MICROPROCESSORS
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Chapter 1: The 8051 Microcontrollers
Introduction to Microprocessors and Microcontrollers
Tiny Computers, Hidden Control
EE Embedded Systems Fall 2015
8255.
EE Embedded Systems Fall 2015
Parallel communication interface 8255
Architecture & Support Components
Introducing the PIC Mid-Range Family and the 16F84A
BIC 10503: COMPUTER ARCHITECTURE
Interrupts.
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
Computer System Overview
COMP3221: Microprocessors and Embedded Systems
Microprocessor I 7/18/2019.
CPU Sequencing 7/20/2019.
Microprocessors and Programming Department of Mechatronics Engineering
Presentation transcript:

EE 22442 - Embedded Systems Fall 2015 Chapter Seven: Larger Systems and the PIC 16F873A/ 16F874A/ 16F877A EE 22442 - Embedded Systems Fall 2015 Belal H. Sababha, Ph.D. Assistant Professor of Electrical & Computer Engineering Computer Engineering Department King Abdullah II Faculty of Engineering Princess Sumaya University for Technology Amman, 11941, Jordan Phone: +962-6-535-9949 ext. 222 Email: b.sababha@psut.edu.jo Web: http://www.psut.edu.jo/sites/bsababha

Introduction A microcontroller is essentially made up of: Microprocessor core plus memory plus peripherals More ‘power’ can be added to a microcontroller by enhancing any of these areas. As the 16F84A and 16F873A are both members of the same family, the core and instruction set remain constant, but the ability to engage in embedded control is dramatically enhanced by the addition of an excellent range of ‘new’ peripherals.

The main idea – the PIC 16F87XA

The 16F873A block diagram and CPU Overview of the Central Processing Unit and core Overview of memory The 13 program address lines from the Program Counter, which can address 2^13 (i.e. 8192) memory locations, are now fully exploited in the 16F876A with its 8K of program memory, and half used in the ’873A. One bus size which has changed is the ‘Direct Addr’, shown here as seven bits Overview of peripherals

16F873A Status Register

16F873A memory and memory maps The 16F873A program memory The 13-bit Program Counter word is able to address the whole memory space. It is surprising to see in the figure that there are two ‘pages’ of program memory. The situation is worse for the 16F876A/877A controllers, each has four pages of program memory. The fact that program memory has to be paged in this way is due to the way the program address, held in the Program Counter, is generated in different situations.

Program Counter The Program Counter is 13 bits long. Its lower 8 bits form the PCL register. The upper five bits of the Program Counter are not readable, but can be written to via the lower five bits of the PCLATH register. The contents of PCLATH are transferred to the upper bits of the Program Counter whenever PCL is written to. In normal program execution, the Program Counter is incremented after every instruction. However, there are three other ways by which the program can change the Program Counter value.

Manipulating the Program Counter

Manipulating the Program Counter .. cntd 1. By Stack transfers 2. By call and goto instructions These two instructions are formatted to provide only 11 bits of addressing. These 11 bits can address a range of 2^11, or 2K words, and thus represent the pages in Figure 7.4. When these instructions are used, the two ‘missing’ address bits are taken from bits 4 and 3 of the PCLATH register. It is up to the programmer to recognize if a branch over a page is to occur, and to set the bits appropriately. The data sheet [Ref. 7.1] contains an example of how to do this. 3. By writing to the PCL register The PCL is written to directly in situations like the ‘computed go to’, as described in Section 5.4. Now only the lower eight bits of the Program Counter, in PCL, are adjusted directly and it is as if the programmer is working with 256-word pages. If an address boundary is to be crossed in a computed go to, then PCLATH must be set to the right value. For larger look-up tables this can be quite challenging; Ref. 5.1 gives examples of how to do it.

The 16F873A data memory and Special Function Registers

The 16F873A interrupts

The interrupt registers Figure 7.11: The PIC 16F87XA INTCON register

The interrupt registers … cnt’d

The interrupt registers … cnt’d

The 16F873A parallel ports The PIC 16F873A has three ports, A, B and C. Ports A and B are similar to the ports of the 16F84A, except that more alternate functions are crowded onto the pins. Port A is now 6-bit, a 1-bit advance on the five bits of the 16F84A Port A.

The 16F873A Port A The six bits of Port A appear on pins 2–7 of the 16F873A The port can be used for general-purpose bi-directional digital data. It is also shared with the Analog functions, notably the analog-to-digital converter (ADC) module and the comparators. On powerup the port bits are set as analog inputs. To use the port for digital purposes the ADCON1 register, described in Chapter 11, must be set appropriately. As with the 16F84A, the important Timer 0 input is on bit 4 of Port A.

The 16F873A Port A … cnt’d The port pins are no longer simply controlled by the port ‘TRIS’ register. Other SFRs can have a major impact, disabling or reallocating a resource. This can lead to considerable programming frustration. A port may appear not to work because a peripheral SFR setting has reallocated its function.

16F873A Port B and PORT C The 16F873A Port B: same as 16F84A The 16F873A Port C: The Port C interconnection can be seen on pins 11–18 of the 16F873A (Figure 7.1). It is the most complex of the 16F873A ports. Its pins can simply be used as general-purpose digital input/output (I/O). Port C pins are shared with some of the more complex microcontroller peripherals, including those dealing with serial communication.

The challenge of testing an embedded system

Test and diagnostic tools Oscilloscopes and logic analyzers In-circuit emulators On-chip debuggers

Taking things further – the 16F874A/16F877A Ports D and E The 16F874A and 16F877A have two extra ports. The 8-bit Port D and the 3-bit Port E. Either port can be used for general-purpose I/O, like any of the other ports. An alternative function for Port E is to provide three further analog inputs. Because of this, Port E is also under the control of one of the registers that control the ADC, ADCON1. The setting of this determines whether the port is used for digital or analog signals.

Figure 7.26: The TRISE register