You are on page 1of 24

UNIVERSITY OF SOUTHERN MINDANAO

Microprocessors
(CpE 323)
Prepared by:
JEANNALEN P. LUNOD
Department of Computer Engineering
Topic Outline
• The Peripheral Interface Controller (PIC)
• Definition
• Block Diagram - Internal Structure of PIC
• Hardware of the PIC

Microprocessors - The Peripheral Interface Controller (PIC) 2


Intended Learning Outcomes
• ILO1: define what is PIC
• ILO2: define what is RISC
• ILO3: understand the block diagram of
the internal structure of the PIC
• ILO4: identify the pin assignment of the
PIC

Microprocessors - The Peripheral Interface Controller (PIC) 3


Meet the PIC!
PIC 16F84A

Microprocessors - The Peripheral Interface Controller (PIC) 4


What is PIC ?
• PIC (Peripheral
Interface Controller)
is the IC which was
developed to control
peripheral devices,
alleviating the load
from the main CPU.

Microprocessors - The Peripheral Interface Controller (PIC) 5


What is PIC ?
• is an 8-bit microcontroller of RISC (Reduced
Instruction Set Computer) architecture.
• uses a total number of 35 instructions .
• has a total of 18 pins and is mostly found in
a DIP18 type of case.

Microprocessors - The Peripheral Interface Controller (PIC) 6


The PIC is the small
computer
• Maximum clock
operating frequency
is about 20 MHz.
• Memory capacity is
about 1K to 14K
words.

Microprocessors - The Peripheral Interface Controller (PIC) 7


Block Diagram

Microprocessors - The Peripheral Interface Controller (PIC) 8


Block Diagram cont…
• Flash/Program Memory
• for storing a program. It can be erased
and rewritten almost 100 times.
• 1 word is 14 bits long and 1024 words (1K
words) can be stored.
• Even if power is switched off the
contents of the flash memory will not be
lost.

Microprocessors - The Peripheral Interface Controller (PIC) 9


Block Diagram cont…
• EEPROM
• Electrically Erasable Programmable Read
Only Memory
• usually used for storing important data
that will be secured even in power failure.
• nonvolatile memory, the contents are
not lost when power is turned off.

Microprocessors - The Peripheral Interface Controller (PIC) 10


Block Diagram cont…
• EEPROM
• total capacity of 64 bytes and the
number of times it can be rewritten to is
limited to about 1,000,000
• It is used to store data which will not
change frequently. Data can be safely
stored for 40 years.

Microprocessors - The Peripheral Interface Controller (PIC) 11


Block Diagram cont…
• RAM
• Random-Access Memory
• memory used by a program to store
temporary data during its execution.
• Central Processing Unit (CPU)
• coordinates the work and executes the
program.

Microprocessors - The Peripheral Interface Controller (PIC) 12


Block Diagram cont…
• Ports
• There are 2 ports: portA (5 bits) and
portB (8 bits).
• These 13 pins can be configured as
input/output.

Microprocessors - The Peripheral Interface Controller (PIC) 13


Hardware of the PIC16F84A
• Pin
Diagram

Microprocessors - The Peripheral Interface Controller (PIC) 14


• Notice the arrows
• Input - if towards the pin
• Output – if away from the pin
• Input/output – if to and from the pin (bi-
directional)

Microprocessors - The Peripheral Interface Controller (PIC) 15


Pin Diagram
• OSC1/CLKIN – Oscillator crystal
input/External clock source input.
• OSC2/CLKOUT – Oscillator crystal
output/Connects to crystal or resonator in
crystal oscillator mode.
• MCLR(inv) – Master clear (reset) input.
Programming voltage input. This pin is an
active low reset to the device.

Microprocessors - The Peripheral Interface Controller (PIC) 16


Pin Diagram (cont.)
• RA0 - RA3 – Bi-directional I/O port.
• RA4/T0CKI – Bi-directional I/O port/Clock
input to the TMR0 timer/counter.
• RB0/INT – Bi-directional I/O port/External
interrupt pin.
• RB1 - RB7 – Bi-directional I/O port.
• VSS – Ground
• VDD – Positive supply (+2.0V to +5.5V)

Microprocessors - The Peripheral Interface Controller (PIC) 17


Summary
• PIC (Peripheral Interface Controller) is the IC
which was developed to control peripheral
devices, alleviating the load from the main
CPU.
• is an 8-bit microcontroller of RISC (Reduced
Instruction Set Computer) architecture and
uses a total number of 35 instructions

Microprocessors - The Peripheral Interface Controller (PIC) 18


• Flash/Program Memory is used for storing a
program.
• Even if power is switched off, the contents of
the flash memory will not be lost.
• EEPROM stands for Electrically Erasable
Programmable Read Only Memory.
• Its contents are not lost when power is
turned off

Microprocessors - The Peripheral Interface Controller (PIC) 19


• RAM stands for Random-Access Memory.
• It is the memory used by a program to store
temporary data during its execution.
• Central Processing Unit (CPU) coordinates
the work and executes the program.
• There are 2 ports: portA (5 bits) and portB (8
bits).
• These 13 pins can be configured as
input/output.
Microprocessors - The Peripheral Interface Controller (PIC) 20
• The PIC16F84A has 18 pins:
1. Pin 1 - RA2
2. Pin 2 - RA3
3. Pin 3 - RA4/TOCKI
4. Pin 4 - MCLR
5. Pin 5 - VSS
6. Pin 6 - RB0/INT
7. Pin 7 - RB1

Microprocessors - The Peripheral Interface Controller (PIC) 21


8. Pin 8 - RB2
9. Pin 9 - RB3
10.Pin 10 - RB4
11. Pin 11 - RB5
12.Pin 12 - RB6
13.Pin 13 - RB7
14.Pin 14 - VDD
15.Pin 15 - OSC2/CLKOUT
Microprocessors - The Peripheral Interface Controller (PIC) 22
16.Pin 16 - OSC1/CLKIN
17. Pin 17 - RA0
18.Pin 18 - RA1

Microprocessors - The Peripheral Interface Controller (PIC) 23


References
• Duran, F. (2011). Introduction to PIC16
Microcontroller Programming and Interfacing.
Unpublished.
• Peren, G. B. (2004). The Right PIC.
• Wilmshurst, T. (2010). Designing Embedded
Systems with PIC Microcontrollers: Principles
and Applications 2nd Ed.

Microprocessors - The Peripheral Interface Controller (PIC) 24

You might also like