1. Introduction to the PIC Microcontroller BEE 3213: Microprocessor & Microcontroller
2.
3.
4. µC vs General-Purpose µ P Microcontroller Microprocessor Devices Microchip’s PIC’s series, Atmel’s AVR series Intel’s x86 family (8086, 80286, 80386, 80486 & the Pentium) or (Motorola’s PowerPC family) Components Internal CPU, RAM, ROM, I/O ports and timers External RAM, ROM, and I/O ports Application Perform specific function: A small set of signal processing functions for digital signal processor Perform more tasks that related to general requirements: calculations of software, personal computer
5. µC vs General-Purpose µ P Cont… CPU / μ P Register Control Unit ALU DATA BUS CPU / μ P Register Control Unit ALU ADDRESS BUS CONTROL BUS μ C RAM ROM I/O Timer Serial COM
6. µC vs General-Purpose µ P Cont… Microprocessor-based System Microcontroller-based System
19. PIC Clock Generator Cont… Capacitor selection for ceramic resonators Capacitor selection for crystal resonators
20.
21.
22.
23.
24.
25.
26.
27.
28. Center Processing Unit (CPU) execute Memory Assembler (translator) Decoder MOVLW 0x20 Program Memory Temporary storage 11 00xx 0010 0000 opcode Fetch instruction Fetch instruction
29.
30. Center Processing Unit (CPU) Cont… ALU STATUS register 8-bit literal (from instruction word) WREG register 8-bit 8-bit 8-bit Z, DC, C flags Carry bit
37. SFR File Memory Legend: x = unknown, u = unchanged, - = unimplemented, read as '0', q = value depends on condition Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a slave register for PC<12:8>. The contents of PCLATH can be transferred to the upper byte of the program counter, but the contents of PC<12:8> are never transferred to PCLATH. 2: The TO and PD status bits in the STATUS register are not affected by a MCLR Reset. 3: Other (non power-up) RESETS include: external RESET through MCLR and the Watchdog Timer Reset. 4: On any device RESET, these pins are configured as inputs. 5: This is the value that will be in the port output latch.