PIC Introduction PDF
PIC Introduction PDF
PIC Introduction PDF
MICROCONTROLLERS
Peeyush.K.P.
Amrita School of Engineering
Coimbatore
What is an Embedded System?
Communication
Avionics
Automobile
Consumer
Electronics
Office Equipments
Household
2 Appliances
What is an Embedded system?
4
Vending Machines
5
Sojourner
6
GPS Receivers
7
Why Embedded systems?
Reduced number of components.
Reduced size.
Reduced cost.
Reduced power consumption.
Easier upgradation.
Easier troubleshooting & maintenance.
Best suited for specific controlling applications.
Why uC?
Microprocessor:
• Requires ‘external’ support hardware
• E.g., External RAM, ROM, Peripherals.
• Application:Processing-Arithmetic,logic operations.
Microcontroller:
• Very little external support hardware/Stand alone.
• Most RAM, ROM and peripherals on chip.
• “Computer on a chip”, or “System on chip” (SOC)
• E.g., PIC = Peripheral Interface Controller
• Application: Controlling purposes.
Microcontroller
VARIOUS MICROCONTROLLERS
8 bit microcontrollers
Microchip - PIC 12 & 16 Series.
Atmel - 89c51
Intel - 8051
Motorola - 68HCxx series
16 bit microcontrollers
Microchip - PIC 18 series
32 bit microcontrollers
ARM Processors
DSP based microcontrollers
Shark
Two Different Architectures
RISC vs. CISC
00
01
02
..
..
FF
Roll Over
00
Sink/Source Current – 25ma
The PIC Family: Cores
PICs come with 1 of 3 CPU ‘cores’:
The Base-line : 12bit cores with 33 instructions.
Eg:12C50x, 12C67x
The Mid-Range : 14bit cores with 35 instructions.
Eg:16C5x,16Cxxx
The High-End : 16bit cores with 58 instructions.
Eg:17C4x,17C7xx
‘Enhanced’ 16bit cores with 77 instructions: 18Cxxx
Areas of Application.
Base-line
Inexpensive controllers, glue logic, simple tasks.
E.g., quadrature decoding, digital interfacing.
Mid-range
Multitasking programs, serial communication.
E.g., Cheap data acquisition system and digital I/O
system for PC off COM ports, data logging.
High-end
RTOS, low end DSP, communications, big moosey
applications.
E.g., FEC converter, Rocket Flight Computer, cheap
FFT chip.
Program Memory (ROM)-size
FLASH
Re-writable (even by chip itself)
Much faster to develop on!
Finite number of writes (~100k Writes)
PIC Examples: Any ‘F’ part: 16F84, 16F87x,
18Fxxx (future)
Data Memory (RAM-volatile)
PICs use general purpose “file registers” for RAM (each
register is 8bits for all PICs)
Total pins 18 18 28 40 28 40
Instruction
Data Bus
Bus
Must be
involved in all
arithmetic
operations
Most
important
register in
the PIC
PIC16F877A Memory
The PIC16F877A has an 8192 (8k) 14bit instruction
program memory
www.greytechnologies.net
INSTRUCTION SET
1) Move Literal Value To Work Register
Syntax : MOVLW <LITERAL>
Eg: MOVLW 0X02