Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

PIC Lecture

Scott Herdic
March 10, 2006
Overview
• Microcontroller
Overview
• Processor Architecture
• Product Families
• Additional Features
• Getting Started with
PICs
Microcontroller Overview

Peatman, John. Embedded Design with the PIC18F452 Microcontroller. Prentice Hall 2003
Microcontroller Overview

Peatman, John. Embedded Design with the PIC18F452 Microcontroller. Prentice Hall 2003
Processor Architecture
• Von Neumann
– Single data bus for
instructions and data
– Motorola HC11

• Harvard
– Separate memory spaces
for data and instruction
– Fetch instruction and data
simultaneously
– Microchip PIC
Product Families
• Produce 8 bit and 16 bit
microcontrollers
• Over 230 variants of the
PIC microcontroller
• Organized into 7
product families
Product Families
HC11
• 8-bit Comparison
– PIC10 •48/52 pins
• 6 pins, 2 MIPs, 768 Bytes, $0.43
•3 MIPs
– PIC12
•12 kBs
• 8 pins, 5 MIPs, 3.5 kBs, $1.47
•$5.48
– PIC16
• 14 - 80 pins, 10 MIPs, 14,3 kBs, $2.71
– PIC18
• 18 - 128 pins, 12 MIPs, 131 kBs, $5.79
Product Families
• 16-bit: dsPIC30F
– 18 to 80 pins, 30 MIPs, 144kB
– Single Core Integrating MCU and DSP
• FFT, Digital Filters, Matrix Operations
– 16 x 16 Working Register Array
– Three Operand Instruction: C =A+B
– Optimized for C Programming
Additional Features Available
• Internal Oscillator • Quadrature Encoder
• 16 ADC channels Interface
• 5 Timers • Voltage Comparators
• 5 PWM channels • RF Transmitters
• Capture/Compare • Watchdog Timer
• USB communications • Sleep Mode
• Serial Communications • Brown Out Reset
• CAN Communication
Getting Started With PICs
What You Need:
• PIC Microcontrollers
• Reference Materials
• Code Development Environment
• Programmer

Optional Accessories:
• Program Debugger
PIC Microcontrollers
• Samples
– Available from http://sample.microchip.com
– Limit 30 chips per month
• Maximum of 5 unique part numbers per order
• 3 pieces of each part number
• Limited to 2 orders each month

• Purchase
– Digikey, Mouser, Newark, etc.
Microchip Reference Material
• Microchip Website: http://www.microchip.com
– Product Data Sheets, Application Notes, Development Tools, Discussion Forum

• Embedded Design with the


PIC18F542 Microcontroller
– http://www.picbook.com

• ECE4175 – Embedded
Microcontroller Design
MPLAB IDE
• Integrated Development
Environment
• Free Download
(http://www.microchip.com)
• Integrates with other
Microchip development
tools
(Programmers/Debuggers)
Visual Initializer
• Included with MPLAB
• Permits Drag & Drop setup
of chip peripherals (i.e.
ADC, Timers,
Communications, etc.)
• Generates assembly
language program that is
combined with user code
• Eliminates manual setup of
peripherals – Minimizes
programming errors
Programmer - PICSTART Plus
• Serial communication w/ PC
• Remove chip from circuit for
programming
• Works on DIP packages (adapters
required for other packages)
• Integrated with MPLAB
• Cost: $199 from Microchip
Software Debugger - MPLAB SIM
• Included with free
MPLAB download
• Simulates code
execution
• Allows
– Set unlimited
breakpoints in code
– Watch values in registers
– Modify registers
– Apply stimulus to pins
Hardware Debugger - ICD2
• Debugger/Programmer
• Integrates with MPLAB
• Works in Application Circuit
• Allows:
– Pause Program
– Set Breakpoints
– Examine Register/Variable
Values
– Modify Register/Variable Values
• Occupies 2 I/O pins
• USB and Serial Interface w/ PC
• Cost: $159 from Microchip
Questions???

You might also like