29
1 EECE416: Microcomputer Fundamentals and Design PIC - Introduction PIC16F877 Dr. Charles J. Kim Howard University

PIC - Introduction · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

Embed Size (px)

Citation preview

Page 1: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

1

EECE416: Microcomputer Fundamentals and Design

PIC - Introduction

PIC16F877

Dr. Charles J. Kim

Howard University

faculty
Typewritten Text
WWW.MWFTR.COM
Page 2: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

2

Peripheral Interface Controller

PIC: Peripheral Interface ControllerMicrochip Technology (www.microchip.com)Harvard Architecture

Page 3: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

3

PIC- continued

Origin: Harvard Architecture for DAPRA ProjectBeaten by Princeton (Single memory)Picked by Signetics 8x300PIC for General InstrumentsCompensation for poor I/OGI spun off into Arizona Microchip Technology (1985)- Microchip Technology

Page 4: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

4

PIC -continuedA Large Register Set: 368 Bytes + WRISC Architecture--pipelining35 fixed length (14-bit) single-cycle instructions

Page 5: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

5

PIC-continued8-bit machineOperating Speed: Up to 20 MHz8K 14-bit Words FLASH Memory (for Program)368 Bytes RAM (for Data)256 Bytes EEPROM (for Data)Power Saving Mode

Page 6: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

6

PIC -continued

Low-power consumption:< 2 mA typical @ 5V, 4 MHz20 mA typical @ 3V, 32 kHz< 1 mA typical standby current

Wide Operating Voltage: 2.0 – 5.0 VTimers

Timer0: 8-bit timer/counter with 8-bit prescalerTimer1: 16-bit timer/counter with prescaler, can be incremented during sleep via external crystal/clockTimer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

Page 7: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

7

Capture, Compare, PWM modulesCapture is 16-bit, max. resolution is 12.5 nsCompare is 16-bit, max. resolution is 200 nsPWM max. resolution is 10-bit

10-bit multi-channel A-to-D Converter I2C (Inter IC)BusUSART for Serial Communication5 I/O Ports: A, B, C, D, and E

PIC -continued

Page 8: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

8

16F87x Family

Page 9: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

9

PIN and PACKAGE

DIP

QFP

PLCC

Page 10: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

10

PIN

Page 11: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

11

F877 Architecture

Page 12: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

12

BLOCK Diagram

14

8AD

TXRX

W

Page 13: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

13

ALU and W register

Page 14: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

14

PROGRAM MEMORY

13-bit PCAddressable up to 8Kx14-bitFLASH Memory Reset Vector: $0000Interrupt: $0004

Page 15: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

15

DATA memory (“Register File”)

Partitioned into 4 Banks (or Pages): 0-3Each Bank: 128 BytesUpper Locations: GPR (General Purpose) Reg.--RAMLower Location: SFR (Special Function) Reg.BANK SELECTION:

Status RegisterRP1: Status<6>RP0: Status<5>

Page 16: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

16

Register File Map

Page 17: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

17

Special Function Registers (bank 0)

Page 18: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

18

Special Function Registers (bank 1)

Page 19: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

19

Special Function Registers(bank 2 & 3)

Page 20: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

20

Input/Output Ports

Page 21: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

21

Interrupts

Page 22: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

22

16F877 Hex Code Download

PIC Programmer

Page 23: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

23

Boot Loader Option

Page 24: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

24

PIC16F877 Bootloader

Page 25: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

25

Minimum Hardware for Boot Loaded Platform

Page 26: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

26

Commercially Available PIC16F877 Board

Page 27: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

27

PIC-40B-USB Schematic

Page 28: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

28

PIC-40B-USB Schematic (PIC area only)

Page 29: PIC - Introduction  · PDF filePIC - Introduction PIC16F877 ... 16F877 Hex Code Download. aPIC Programmer. 23. Boot Loader Option. 24. ... Microsoft PowerPoint - pic-01-INTRO.ppt

29

Other PIC Board (Not fully evaluated yet)DLP-245PB-G-USBNot evaluatedProblem in Bootloader downloading

Problem in USB driver with Windows