Picmicro Mid-Range MCU Family Reference Manual

Total Page:16

File Type:pdf, Size:1020Kb

Picmicro Mid-Range MCU Family Reference Manual M PICmicro™ Mid-Range MCU Family Reference Manual 1997 Microchip Technology Inc. December 1997 /DS33023A M Internationally Recognized Quality System Certifications Microchip’s Quality System embodies the requirements of ISO9001:1994. Our Microchip Chandler and Tempe Design and Manufacturing facilities have been certified to ISO 9001. The Microchip Kaohsiung Test facility, and primary Assembly houses have been certified to ISO 9002. ISO certification plans are in-process for an esti- mated certification grant by year-end 1997. In addition, Microchip has received numerous customer certifica- tions, including a Delco issued certificate of compliance to AEC-A100/QS9000. Microchip received ISO 9001 Quality System certifica- tion for its worldwide headquarters, design, and wafer fabrication facilities in January, 1997. Our field-pro- grammable PICmicro™ 8-bit MCUs, Serial EEPROMs, related specialty memory products and development systems conform to the stringent quality standards of the International Standard Organization (ISO). “All rights reserved. Copyright © 1997, Microchip Technology Trademarks Incorporated, USA. Information contained in this publication regarding device applications and the like is intended through The Microchip name, logo, PIC, KEELOQ, PICMASTER, suggestion only and may be superseded by updates. No rep- PICSTART, PRO MATE, and SEEVAL are registered resentation or warranty is given and no liability is assumed by trademarks of Microchip Technology Incorporated in the Microchip Technology Incorporated with respect to the accu- U.S.A. racy or use of such information, or infringement of patents or other intellectual property rights arising from such use or oth- MPLAB, PICmicro, ICSP and In-Circuit Serial Programming erwise. Use of Microchip’s products as critical components in are trademarks of Microchip Technology Incorporated. life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, Serialized Quick-Turn Production is a Service Mark of Micro- implicitly or otherwise, under any intellectual property rights. chip Technology Incorporated. The Microchip logo and name are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All other trademarks mentioned herein are property of their All rights reserved. All other trademarks mentioned herein are respective companies. the property of their respective companies. No licenses are conveyed, implicitly or otherwise, under any intellectual prop- erty rights.” December 1997 /DS33023A 1997 Microchip Technology Inc. M Table of Contents PAGE SECTION 1. INTRODUCTION 1-1 Introduction .......................................................................................................................................................1-2 Manual Objective ..............................................................................................................................................1-3 Device Structure ...............................................................................................................................................1-4 Development Support .......................................................................................................................................1-6 Device Varieties ...............................................................................................................................................1-7 Style and Symbol Conventions ......................................................................................................................1-12 Related Documents ........................................................................................................................................1-14 Related Application Notes ..............................................................................................................................1-17 Revision History .............................................................................................................................................1-18 SECTION 2. OSCILLATOR 2-1 Introduction .......................................................................................................................................................2-2 Oscillator Configurations ..................................................................................................................................2-2 Crystal Oscillators / Ceramic Resonators .........................................................................................................2-4 External RC Oscillator ....................................................................................................................................2-12 Internal 4 MHz RC Oscillator ..........................................................................................................................2-13 Effects of Sleep Mode on the On-chip Oscillator ............................................................................................2-17 Effects of Device Reset on the On-chip Oscillator .........................................................................................2-17 Design Tips ....................................................................................................................................................2-18 Related Application Notes ..............................................................................................................................2-19 Revision History .............................................................................................................................................2-20 SECTION 3. RESET 3-1 Introduction .......................................................................................................................................................3-2 Power-on Reset (POR), Power-up Timer (PWRT), Oscillator Start-up Timer (OST), Brown-out Reset (BOR), and Parity Error Reset (PER) ..............................3-4 Registers and Status Bit Values .....................................................................................................................3-10 Design Tips ....................................................................................................................................................3-16 Related Application Notes ..............................................................................................................................3-17 Revision History .............................................................................................................................................3-18 SECTION 4. ARCHITECTURE 4-1 Introduction .......................................................................................................................................................4-2 Clocking Scheme/Instruction Cycle ..................................................................................................................4-5 Instruction Flow/Pipelining ................................................................................................................................4-6 I/O Descriptions ................................................................................................................................................4-7 Design Tips ....................................................................................................................................................4-12 Related Application Notes ..............................................................................................................................4-13 Revision History .............................................................................................................................................4-14 1997 Microchip Technology Inc. DS00097D-page iii M Table of Contents PAGE SECTION 5. CPU AND ALU 5-1 Introduction .......................................................................................................................................................5-2 General Instruction Format ...............................................................................................................................5-4 Central Processing Unit (CPU) .........................................................................................................................5-4 Instruction Clock ...............................................................................................................................................5-4 Arithmetic Logical Unit (ALU) ...........................................................................................................................5-5 STATUS Register .............................................................................................................................................5-6 OPTION_REG Register ...................................................................................................................................5-8 PCON Register .................................................................................................................................................5-9 Design Tips ....................................................................................................................................................5-10 Related Application Notes ..............................................................................................................................5-11 Revision History .............................................................................................................................................5-12
Recommended publications
  • Programming-8Bit-PIC
    Foreword Embedded microcontrollers are everywhere today. In the average household you will find them far beyond the obvious places like cell phones, calculators, and MP3 players. Hardly any new appliance arrives in the home without at least one controller and, most likely, there will be several—one microcontroller for the user interface (buttons and display), another to control the motor, and perhaps even an overall system manager. This applies whether the appliance in question is a washing machine, garage door opener, curling iron, or toothbrush. If the product uses a rechargeable battery, modern high density battery chemistries require intelligent chargers. A decade ago, there were significant barriers to learning how to use microcontrollers. The cheapest programmer was about a hundred dollars and application development required both erasable windowed parts—which cost about ten times the price of the one time programmable (OTP) version—and a UV Eraser to erase the windowed part. Debugging tools were the realm of professionals alone. Now most microcontrollers use Flash-based program memory that is electrically erasable. This means the device can be reprogrammed in the circuit—no UV eraser required and no special packages needed for development. The total cost to get started today is about twenty-five dollars which buys a PICkit™ 2 Starter Kit, providing programming and debugging for many Microchip Technology Inc. MCUs. Microchip Technology has always offered a free Integrated Development Environment (IDE) including an assembler and a simulator. It has never been less expensive to get started with embedded microcontrollers than it is today. While MPLAB® includes the assembler for free, assembly code is more cumbersome to write, in the first place, and also more difficult to maintain.
    [Show full text]
  • Extreme Low Power (XLP) PIC® Microcontrollers
    XLP PIC® MCUs eXtreme Low Power (XLP) PIC® Microcontrollers www.microchip.com/xlp Looking Beyond Low-Power MCUs Microchip’s XLP PIC® MCUs As more wearables, wireless sensor networks, and other Internet of Things (IoT) enabled smart devices are getting powered from battery, energy conservation becomes paramount. Today’s connected appli- cations must consume little power and, in extreme cases, last for up to 20+ years while running from a single battery. To enable applica- tions like these, products with Microchip’s eXtreme Low Power (XLP) technology offer the industry’s lowest Run and Sleep currents. Benefits of XLP PIC MCUs Low Sleep Currents Battery-Friendly VBAT Battery Back-Up Large Portfolio of XLP with Flexible Wake-Up Features • Automatic switch-over MCUs Sources • Enable battery lifetime upon loss of VDD • 8–121 pins, • Sleep current down greater than 20 years • Maintains Real-Time 4 KB–1 MB Flash to 9 nA • Low-power supervisors Clock/Calendar (RTCC) • Wide selection of • Brown-Out Reset (BOR) for safer operation and user registers packages down to 45 nA (BOR, WDT) • Powered seperately • Active mode currents as • Real-time clock down to • Core Independent Pe- from 1.8–3.6V source low as 30 µA/MHz with 300 nA ripherals (CIPs) take the (coin cell) efficient instruction set • Watch-Dog Timer (WDT) load off the CPU and per- with over 90% single- down to 200 nA form extremely complex cycle instructions tasks in self-sustaining mode at lowest possible energy requirement XLP PIC MCU Application Examples Internet of Things Smart Energy
    [Show full text]
  • MPLAB XC8 PIC Assembler User's Guide
    MPLAB® XC8 PIC® Assembler User's Guide Notice to Customers All documentation becomes dated and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions can differ from those in this document. Please refer to our web site (https://www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA,” where “XXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Topics to open a list of available online help files. © 2020 Microchip Technology Inc. User Guide DS50002974A-page 1 Table of Contents Notice to Customers.......................................................................................................................................1 1. Preface....................................................................................................................................................4 1.1. Conventions Used in This Guide..................................................................................................4 1.2. Recommended Reading...............................................................................................................5 1.3. Document Revision History..........................................................................................................5
    [Show full text]
  • MPLAB XC8 PIC Assembler User's Guide for Embedded Engineers
    MPLAB® XC8 PIC Assembler User's Guide for Embedded Engineers Notice to Customers All documentation becomes dated and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions can differ from those in this document. Please refer to our web site (https://www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA,” where “XXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Topics to open a list of available online help files. © 2020 Microchip Technology Inc. User Guide 50002994A-page 1 Table of Contents 1. Preface....................................................................................................................................................4 Notice to Customers................................................................................................................................1 1.1. Conventions Used in This Guide..................................................................................................4 1.2. Recommended Reading...............................................................................................................5 1.3. Document Revision History..........................................................................................................5
    [Show full text]
  • Experience of Teaching the Pic Microcontrollers
    Session 1520 EXPERIENCE OF TEACHING THE PIC MICROCONTROLLERS Han-Way Huang, Shu-Jen Chen Minnesota State University, Mankato, Minnesota/ DeVry University, Tinley Park, Illinois Abstract This paper reports our experience in teaching the Microchip 8-bit PIC microcontrollers. The 8-bit Motorola 68HC11 microcontroller has been taught extensively in our introductory microprocessor courses and used in many student design projects in the last twelve years. However, the microcontroller market place has changed considerably in the recent years. Motorola stopped new development for the 68HC11 and introduced the 8- bit 68HC908 and the 16-bit HCS12 with the hope that customers will migrate their low- end and high-end applications of the 68HC11 to these microcontrollers, respectively. On the other hand, 8-bit microcontrollers from other vendors also gain significant market share in the last few years. The Microchip 8-bit microcontrollers are among the most popular microcontrollers in use today. In addition to the SPI, USART, timer functions, and A/D converter available in the 68HC11 [6], the PIC microcontrollers from Microchip also provide peripheral functions such as CAN, I2C, and PWM. The controller-area- network (CAN) has been widely used in automotive and process control applications. The Inter-Integrated Circuit (I2C) has been widely used in interfacing peripheral chips to the microcontroller whereas the Pulse Width Modulation (PWM) function has been used extensively in motor control. After considering the change in microcontrollers and the technology evolution, we decided to teach the Microchip 8-bit microcontrollers. 1 Several major issues need to be addressed before a new microcontroller can be taught: textbook, demo boards, and development software and hardware tools.
    [Show full text]
  • Mplab C18 C Compiler Getting Started
    MPLAB® C18 C COMPILER GETTING STARTED © 2005 Microchip Technology Inc. DS51295F Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device Trademarks applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, Accuron, and may be superseded by updates. It is your responsibility to dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, ensure that your application meets with your specifications.
    [Show full text]
  • COOLANT OIL CONTROL SYSTEM in VMC MACHINE ”Is the Bonafide Work Of
    COOLANT OIL CONTROL SYSTEM IN VMC MACHINE A PROJECT REPORT Submitted by RAJAGANAPATHY.S (13BEI111) GOWTHAMVEL.P (13BEI018) SANTHOSE PRABU.R (13BEI050) in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING in ELECTRONICS AND INSTRUMENTATION ENGINEERING KUMARAGURU COLLEGE OF TECHNOLOGY (An Autonomous Institution, Affiliated to Anna University,Chennai) COIMBATORE 641049 APRIL 2017 1 COOLANT OIL CONTROL SYSTEM IN VMC MACHINE A PROJECT REPORT Submitted by RAJAGANAPATHY.S (13BEI111) GOWTHAMVEL.P (13BEI018) SANTHOSE PRABU.R (13BEI050) in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING in ELECTRONICS AND INSTRUMENTATION ENGINEERING KUMARAGURU COLLEGE OF TECHNOLOGY (An Autonomous Institution, Affiliated to Anna University,Chennai) COIMBATORE 641049 APRIL 2017 2 BONAFIDE CERTIFICATE Certified that this project report “COOLANT OIL CONTROL SYSTEM IN VMC MACHINE ”is the bonafide work of RAJAGANAPATHY.S (13BEI111) GOWTHAMVEL.P (13BEI018) SANTHOSE PRABU.R (13BEI050) who carried out the project work under my supervision. SIGNATURE SIGNATURE Dr.N.EZHILARASI Mr.S.SARAVANA KUMAR HEAD OF THE DEPARTMENT SUPERVISOR Dept. of Electronics and Instrumentation Assistant Professor Kumaraguru College of Technology Dept. of Electronics and Instrumentation Coimbatore-641049 Kumaraguru College of Technology Coimbatore-641049 The candidates were examined by us in the project viva voce examination held on INTERNAL EXAMINER EXTERNAL EXAMINER 3 ACKNOWLDEGEMENT The satisfaction that accompanies the successful completion of any task would be incomplete without mentioning about the people whose constant guidance and encouragement crowns all effort with success. We are greatly indebted to our beloved Principal Dr.R.S.KUMAR, who has been the backbone of all our deeds. We express our gratitude to Dr.N.EZHILARASI, Head, Department of Electronics and Instrumentation Engineering, Kumaraguru College of Technology for her constant encouragement.
    [Show full text]
  • MPLAB Snap In-Circuit Debugger Information Sheet
    MPLAB® SNAP IN-CIRCUIT DEBUGGER MPLAB® Snap In-Circuit Debugger Information Sheet INTRODUCTION The MPLAB® Snap In-Circuit Debugger (PG164100) is an ultra-low priced debugging solution for projects not requiring high-voltage programming or advanced debug features. Therefore, it supports many of Microchip’s newer MCU offerings but not some legacy products. With a nominal feature set, the debugger is geared toward developers who don’t require advanced features. It is not intended for production programming. Note: Refer to the MPLAB® PICkit™ 4 In-Circuit Debugger and the MPLAB X IDE User’s Guides or online help for additional information. • Description • Features • MPLAB Snap In-Circuit Debugger Components • Additional Items Needed • MPLAB Snap vs. MPLAB PICkit 4 Comparison • Pinout Information • LEDs • Debugger to Target Communication • Debugger Options Selection • Troubleshooting DESCRIPTION The MPLAB Snap In-Circuit Debugger allows fast and easy debugging and programming using the powerful graphical user interface of MPLAB X IDE (Integrated Development Environment) or MPLAB IPE (Integrated Programming Environment). The debugger works with Microchip PIC®, dsPIC® Flash, AVR®, or DSC® devices. It will also work with 32-bit based microcontroller, such as SAM, CEC and PIC32 devices. The MPLAB Snap connects to the computer using a high-speed 2.0 USB interface and connects to the target via a Microchip debug 8-pin Single In-Line (SIL) connector. The SIL connector uses two device I/O pins and the reset line to implement in-circuit debugging and In-Circuit Serial Programming™ (ICSP™). The MPLAB Snap supports advanced interfaces such as 4-wire JTAG and Serial Wire Debug with streaming Data Gateway, while being backward compatible for demo boards, headers and target systems using 2-wire JTAG and ICSP.
    [Show full text]
  • Custom Control Module for the Teach-Robot
    Custom Control Module for the Teach-Robot David Cumbow, Christopher Dufault and John O’Connor CSCI 595 Spring 2007 June 15, 2007 Abstract This paper is being presented not only as a final report for the CSCI 595 course, but also as a point of reference for the control module made by David Cumbow, Christopher Dufault and John O’Connor during the course of this class. All data within this document is released under the Creative Commons License and is free to use with proper reference. 1 Contents 1 Introduction 3 1.1 Vision . 3 1.2 Plan and Research . 3 1.3 Building the Module . 3 2 Hardware and Software Information 3 2.1 Motors . 3 2.2 Arm Pinout . 4 2.3 H-Bridge . 4 2.4 Microcontroller . 4 2.5 Sample Microcontroller Source Code . 4 3 Conclusion 5 2 1 Introduction Going into this Independent Study, we had a vague idea of what we wanted to complete. While there were many options to continue previous projects or complete a project based on the OOPic Microcontroller, we wanted something different. Given this we chose to create a control module for a set of robotic arms made by Baden-Baden that were purchased by the school many years ago. With very little online and physical documentation for the arms, we were certain this was going to be a challenge. 1.1 Vision Our vision for this project is to create a fully programmable control module with the ability to monitor feedback from the motors to calculate the position of the arm in space.
    [Show full text]
  • Flowcode 7 Installed
    Getting Started Guide Getting Started Guide Introduction Flowcode is an Integrated Development Environment (IDE) for programming microcontrollers such as 8, 16 and 32bit PIC, Arduino and ARM devices. It achieves this by using flowcharts instead of text based languages, thus making programming simpler and faster. Flowcode also contains hundreds of pre-made component libraries, allowing users to interface with a host of sensors, inputs and outputs and electro-mechanical components with ease. Despite its simplicity and ease of use, Flowcode is a powerful tool allowing users to develop even the most complex of embedded systems. Flowcode supports both Matrix and 3rd party hardware. In this guide we will create examples based on three different sets of hardware; 1. Matrix EB006 multi-programmer and EB083 development board 2. Arduino Uno and Matrix EB083 development board 3. Microchip Xpress development board Prerequisites • A Windows based PC with a copy of Flowcode 7 installed Should haves for this guide • Supported hardware – a list covered in this guide is provided above • USB cable to both power and program the microcontroller of choice What we’ll cover in this guide? This guide will be split into two main sections: In section 1 we will provide an overview of the Flowcode IDE. How users interact with the environment, add components to the simulation panel and create flowcharts. In section 2 we will run through three examples which will increase in complexity and teach you how to create microcontroller programs. Copyright © 2016 Matrix Technology Solutions Ltd. 2 Getting Started Guide Section 1: The Flowcode IDE In this section we will provide an overview of Flowcode, detailing the programming interface and how users interact with it to create microcontroller programs.
    [Show full text]
  • MPLAB IDE Simulator, Editor User's Guide
    MPLAB® IDE SIMULATOR, EDITOR USER’S GUIDE 2002 Microchip Technology Inc. DS51025E Note the following details of the code protection feature on PICmicro® MCUs. • The PICmicro family meets the specifications contained in the Microchip Data Sheet. • Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowl- edge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet. The person doing so may be engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable”. • Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our product. If you have any further questions about this matter, please contact the local sales office nearest to you. Information contained in this publication regarding device Trademarks applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to The Microchip name and logo, the Microchip logo, KEELOQ, ensure that your application meets with your specifications. MPLAB, PIC, PICmicro, PICSTART and PRO MATE are No representation or warranty is given and no liability is registered trademarks of Microchip Technology Incorporated assumed by Microchip Technology Incorporated with respect in the U.S.A.
    [Show full text]
  • Start Now with Small Flash PIC®Microcontrollers
    Small Flash PIC®Microcontrollers Start Now with Small Flash PIC®Microcontrollers www.microchip.com/startnow Embedded design engineers face new and continually changing Lots of options and the obstacles when developing the next generation of products. Innovation ability to easily migrate can result in how a particular application is implemented or simply the methods used to minimize development and project costs. The START NOW with engineers at Microchip recognize the many challenges that must be overcome for successful project development – from maintaining a Microchip’s easy-to-learn product launch schedule, meeting the technical product definition or Baseline and Mid-Range containing development costs. Architectures Several new products have been introduced to overcome these obstacles. The newest The Baseline and Mid-Range PIC® members of the 8-bit Flash PIC microcontroller series, ranging in performance and microcontroller’s modified Harvard pin count, add to an extensive portfolio of versatile, easy-to-use products. A host of RISC instruction set provides an programming and development tools work within Microchip’s free MPLAB® Integrated easy migration path from 6 to 80 Development Environment (IDE) to help embedded designers navigate through the difficult pins and from 384 bytes to 128 phases of their development life cycle while utilizing a common set of tools. Kbytes of program memory. With just So don’t wait until your design is off course, START NOW with small PIC microcontrollers over 30 instructions and seamless and development tools and let us help you succeed. migration between product families, PIC microcontrollers are easy to use A simple solution to complex application challenges.
    [Show full text]