Lecture 6 Microcontrollers in Embedded Systemsweb.iyte.edu.tr/~tolgaayav/courses/ceng314/lecture6A.pdf · Lecture 6 Microcontrollers in Embedded Systems Asst. Prof. Tolga Ayav, Ph.D.

Post on 19-Mar-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

CENG 314Embedded Computer Systems

Lecture 6Microcontrollers in Embedded Systems

Asst. Prof. Tolga Ayav, Ph.D.

Department of Computer Engineeringİzmir Institute of Technology

Another Definition of “Embedded System”

The basic idea of an embedded system is asimple one. If we take any engineering product thatneeds control, and if a computer is incorporated within that product to undertake the control, then we have an embedded system. An embedded system can be defined as:

A system whose principal function is notcomputational, but which is controlled by a computer.

Computer ReviewCPU+Data Mem.+Prog.Mem.+I/ORISC vs. CISCMemory: Volatile, Non-volatile (ROM)Memory Organization: Von-Neumann vs Harvard

Microcontrollers

Some Microprocessors and Microcontrollers

A gathering of microprocessors and microcontrollers –old and new. From left to right: PIC 12F508, PIC16F84A, PIC 16C72, Motorola 68HC05B16, PIC 16F877, Motorola 68000

Microchip and PIC Microcontroller

The PIC was originally a design of the company General Instruments.It was intended for simple control applications, hence the name –Peripheral Interface Controller.

The simple CPUwas a RISC structure, with a single Working register and just 30 instructions. The output pins could source or sink much more current than most other microprocessors of the time. Already thetrademarks of the PIC were emerging – simplicity, stand-alone, high speed and low cost.General Instruments sold off its semiconductor division to a group of venture capitalists.Microchip stayed firmly entrenched in the 8-bit world. Despite the huge advances that have been made, we can still see features of the old General Instruments microcontroller, even in the most recent designs.

PIC Microcontrollers Today

Low-costSelf-contained8-bitHarvard structurePipelinedRISCSingle accumulator (the working or W register)Fixed reset and interrupt vectors

Comparison of PIC Families

The 12 Series familyDesigned for really tiny applicationsVery simple architectureIncludes EEPROM, A/D and RAMSame instruction set with 16C5xx seriesCommonly used in a broad range of applications

The 12F508 architecture

The 16 Series FamilyWe will concentrate on 16F84, the more common model.

16F84

Pinout Description

16F84 Memory Features

16F84 Program Memory and Stack

Status Register

Register File Map

16F84 Configuration Word

EECON Special Function Register (Address

88H)

Register File Summary

Direct/Indirect Addressing

Example Code to Clear Memory

(Direct Addressing)

Clock/Instruction Cycle

Instruction Pipeline Flow

External Reset

Power-on resetPOR with discharge diode and protective resistorUser reset button

top related