330 likes | 491 Views
CHAPTER I. A PIC Microcontroller Framework. Introduction. Microcomputer? A computer in which the processing unit is a microprocessor Usually - a general purpose computer (or PC) Embedded Controller
E N D
CHAPTER I A PIC Microcontroller Framework
Introduction • Microcomputer? • A computer in which the processing unit is a microprocessor • Usually - a general purpose computer (or PC) • Embedded Controller • is a controller (or computer) that is embedded into some device for some purpose other than to provide general purpose computing
Introduction • Microcontroller? • The microcontroller could be called a "one-chip solution". It typically includes: • CPU (central processing unit) • RAM (Random Access Memory) • EPROM/PROM/ROM (Erasable Programmable Read Only Memory) • I/O (input/output) - serial and parallel • timers • interrupt controller
Five Broad Markets • Consumer segment • Home appliances, Entertainment equipment • Automotive • Keyless entry, Anti-lock braking, Airbag, etc. • Office Automation • PC, Keyboards, copiers, printers • Telecommunications • Cellular phones, pagers, answering machine • Industrial Products • Door locks, automatic faucets, industrial machine
Microcontroller VS. Microprocessor (75Millions) (2.5 Billions) * John B. Peatman
No. 1990 Rank 1991 Rank 1992 Rank 1993 Rank 1994 Rank 1995-96 Rank 1997/8/9 Rank 1 Motorola Motorola Motorola Motorola Motorola Motorola Motorola 2 Mitsubishi Mitsubishi Mitsubishi Mitsubishi Mitsubishi Mitsubishi Microchip 3 NEC NEC Intel NEC NEC SGS-Thomson ST-Micro 4 Intel Intel NEC Hitachi Philips NEC NEC 5 Hitachi Hitachi Philips Philips Intel Microchip Mitsubishi 6 Philips Philips Hitachi Intel Microchip Philips Philips 7 Matsushita Matsushita Matsushita SGS-Thomson Zilog Zilog Siemens 8 National SGS-Thomson SGS-Thomson Microchip SGS-Thomson Hitachi Toshiba 9 Siemens Siemens National Matsushita Matsushita Fujitsu Hitachi 10 TI TI TI Toshiba Hitachi Intel Zilog 11 Sharp National Zilog National Toshiba Siemens Fujitsu 12 Oki Toshiba Toshiba Zilog National Toshiba Atmel 13 Toshiba Sony Siemens TI TI Matsushita National 14 SGS-Thomson Sharp Microchip Siemens Ricoh TI Sanyo 15 Zilog Oki Sharp Sharp Fujitsu National Matsushita 16 Matra MHS Zilog Sanyo Oki Siemens Temic TI 17 Sony Microchip Matra MHS Sony Sharp Sanyo Sony 18 Fujitsu Matra MHS Sony Sanyo Oki Ricoh Intel 19 AMD Fujitsu Oki Fujitsu Sony Oki LG Semicon 20 Microchip Sanyo Fujitsu AMD Temic Sharp Samsung Based on unit shipment volume, Source: Dataquest, July 2000 Worldwide 8-Bit MicrocontrollerMarket Share - Units
Peripheral Interface Controller (PIC) • PIC Microcontroller • Manufactured by Microchip Technology • 8-bit RISC microcontroller • Embedded (hidden or buried) intelligence • Available with a range of capabilities, 12-16 bit instruction, 8-44 pin part • Packaged in both DIP and surface-mount packages • Low cost
32kHZ Serial EEPROM MSSP TIMER1 A/D USART MCU CCP PORTB I/O PIC - Typical Application
PIC – WIDE POPULARITY • Fast • Performance 8-bit, microcontroller • Executes most of the instructions in 0.2us or five instructions per second (20MHz clock) • Smart • Set of development tools • Quick • Time to develop/market (Flash/OTP) • Cool • Low power consumption • Smooth • Upward migration
PIC – WIDE POPULARITY (Cont.) • Instruction set • Small - 35 instructions • Integration of operational features • Power-on reset and brown-out protection • Watchdog timer • Support four clock options • RC • X-TAL/Ceramic resonator • High-speed OSC • Low Power
PIC – WIDE POPULARITY (Cont.) • Programmable timer Options • Interrupt control • Up to 12 independent interrupt source • Powerful output pin control • Drive a load of up to 25 mA • I/O port expansion • Built-in serial peripheral interface can make use of standard shift-register to add number of I/O pins
PIC – WIDE POPULARITY (Cont.) • Serial Programming via two pins • Low cost programmer • Flash/EPROM/OTP/ROM options • Free (http://www.microchip.com) • MPLAB • Assembler and Simulator • Manuals • Application notes
Memory TechnologyFLASH Memory • Standard product family • Short lead times • Programmed by designer • In-Circuit Re-programmable • Can be erased and reprogrammed • In-Circuit Debugging capability • Can be used on any package or die • Most flexible solution • Highest relative cost at same geometry *From Microchip Seminar 2000
Memory TechnologyOTP/EPROM Memory • Parts available off the shelf • Short lead times • Lower cost than FLASH at same geometry • Programmed by designer • In-Circuit Programmable • More flexible than ROM *From Microchip Seminar 2000
Memory TechnologyROM Memory • Not off the shelf • Designer must provide code • Long lead times • Programmed at the factory • Least flexible solution • Lowest cost solution • Initial NRE (mask charge) • Minimum quantities required *From Microchip Seminar 2000
Memory Selection • CHOOSE FLASHfor debugging & development of both products • For Mass Distribution Product • Use OTP in initial production • Lower cost yet provides opportunity to change code • Once code stabilizes convert to ROM • Realize full cost savings *From Microchip Seminar 2000
ROM EPROM FLASH PIC18CRXX* PIC18C252 PIC18F252* 16Kw PIC16CR76* PIC18C242 PIC16C76 PIC18F242* PIC16F876 8Kw PIC16CR73* PIC16CR63 PIC16C73 PIC16C63 PIC16F873 4Kw PIC16F870* 2Kw PIC16CR72 PIC16C72 PIC16F872* * Planned Memory Technology *From Microchip Seminar 2000
Development Tools • Need to have complete tool solution • Language Tools for code development • Assemblers • C-Compilers • Simulator • Emulator • Debugger • Programmer • Need a tool that integrates them all together *From Microchip Seminar 2000
MPLAB® Integrated Development Environment Built-in Editor Source Level Debugger Project Manager Languages Simulators Emulators Programmers Third Party MPASM Assembler MPLAB-SIM Simulator PRO MATE®II MPLAB-ICE 2000 C Compilers† Hi-Tech, IAR, CCS MPLINK MPLIB MPLAB-ICD PICSTART® Plus MPLAB-C17 MPLAB-C18 ICEPIC† † Third Party Tool PICmicro MCU Development Tools* *From Microchip Seminar 2000
PICmicro MCU Development ToolsLanguage Products • MPASM • Microchip Universal Macro Assembler • Supports all PICmicro MCUs • MPLINK • Create executable files from object files created by MPASM or MPLAB-C17/C18 • May use libraries stored by MPLIB • MPLIB • Groups relocateable objects created by MPASM or MPLAB-C17/C18 *From Microchip Seminar 2000
PICmicro MCU Development ToolsMPLAB-C17 & MPLAB-C18 • Microchip compiler for PIC17CXXX and PIC18CXXX PICmicro MCUs • ANSI compatible • MPASM/MPLINK/MPLIB • Compatible at object level • Supports relocatable objects • Reliable Code Generators • Free 30 day copies available on the webwww.microchip.com *From Microchip Seminar 2000
PICmicro MCU Development ToolsMPLAB-SIM • Supports all PICmicro MCUs • Discrete event simulator instruction based • MPLAB compatible • Unlimited breakpoints • Unlimited trace points • Examine/modify registers • Watch variables • Time stamp • Stimulus injection • Available electronicallyFREE *From Microchip Seminar 2000
9” Modular Cable MPLAB-ICD Header PIC16F877 MPLAB-ICD Module RS-232 Cable +9V Power Supply Cable MPLAB-ICD Demo Board PICmicro MCU Development ToolsMPLAB-ICD In-Circuit Debugger *From Microchip Seminar 2000
PICmicro MCU Development ToolsMPLAB-ICD Features • Uses MPLAB IDE and PC serial port • Real-time code execution, Variable Watching • Single Step, One Hardware Breakpoint • 3.0V to 5.5V, 32kHz to 20MHz • Small system impact using only 2 I/O pins • Uses actual oscillator and other peripherals • Every PIC16F87X is a debugger *From Microchip Seminar 2000
PICmicro MCU Development ToolsMPLAB-ICE 2000 Host to Pod Cable *Emulator Pod *Processor Module Flex Circuit Cable *Device Adapter *SOIC Transition Socket *Each component ordered separately *From Microchip Seminar 2000
PICmicro MCU Development ToolsMPLAB-ICE System Components • Emulator pod(required) • MPLAB-ICE 2000, full-featured system • Processor module(required) • PICmicro specific support (contains the flex circuit cable) • Device adapter(required) • PICmicro and package specific support (DIP, PLCC, and PQFP/TQFP) • Transition socket(optional depending on package) • Required for SOIC, SSOP, PQFP, & TQFP • Transitions pin-out from Device Adapter tospecific surface mount package *From Microchip Seminar 2000
Emulator/Debugger Comparison Chart *From Microchip Seminar 2000
RS-232 Serial Interface 9V DC Input PICSTART Plus DEVELOPMENT PROGRAMMER Power ON POWER Programmer Active ACTIVE 40-Pin ZIF Socket to accommodate PICmicro MCUs from 8- to 40-pins. 68-pin PLCC can be programmed with an adapter Development SystemsPICSTART Plus Development Programmer • Low-cost Development Programmer • Upgrades done in MPLAB software. Firmware upgrades occasionally required for new PICmicro MCU sub-families • Uses serial programming algorithms for all ICSP capable devices • Also runs under WindowsNT! *From Microchip Seminar 2000
High Voltage I/O’s Precision Voltage Reference Amplifiers Filters A/D PICmicro Microcontroller Power Management - Regulators - Supervisory AC Power Battery LCD Drivers SRAM Serial NV Memory Interface Products Digital Peripherals LED Drivers Microchip Technology Inc.The Embedded Control Solutions Company®