Microchip PICSTART Plus Mechatronics Getting Started Guide
PICSTART® PLUS M ECHATRONICS GETTING STARTED GUIDE
PICSTART® PLUS MECHATRONICS GETTING STARTED GUIDE
Information contained in this publication regarding device applications and the like is intended by way of suggestion only. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information. Use of Microchip's products as critical components in life support systems is not authorized except with express written approval by Microchip.
© 1999 Microchip Technology Incorporated. All rights reserved.
The Microchip logo, name, PIC, PICmicro, and PICSTART are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
IBM and PC/AT are registered trademarks of International Business Machines Corporation.
Windows and MS-DOS are registered trademarks of Microsoft Corporation.
All product/company trademarks mentioned herein are the property of their respective companies.
Table of Contents
Chapter 1. Getting Started with the PICSTART® Plus Mechatronics Kit .....5
1.1 Introduction .....5
Chapter 2. Installing MPLAB-v4.11 or Later .....7
2.1 CD-ROM Installation .....7
2.2 Connecting the PICSTART Plus Programmer .....12
Chapter 3. Your First Project for Version 4.11 or Later .....15
3.1 Entering Source Code .....22
3.2 Building the Project Code .....23
Chapter 4. About the Demonstration Program .....25
4.1 Instruction Definition .....26
4.2 Flowchart of the Program Code .....28
Chapter 5. Demonstrating the Simulator .....29
5.1 Asynchronous Stimulus .....29
5.2 Sleep Mode .....37
5.3 Animate .....37
5.4 Watch Windows .....38
5.5 Break Points .....40
Chapter 6. Programming Your Code into the PIC12C509 .....41
Appendix A. Programming a PIC12C509 MCU with the 8-pin Pong Game .....45
Appendix B. How to Get Help and Recommended Reading .....49
Appendix C. Correcting PICSTART® Plus Communications Problems .....53
Appendix D. Glossary .....55
Chapter 1. Getting Started with the PICSTART $ ^{®} $ Plus Mechatronics Kit
1.0 Introduction
Microchip strives to give engineers new tools and choices for implementing state-of-the-art control designs. Our minimal footprint microcontrollers are a case in point. There is a great deal of smarts packed into a tiny space in our 8-bit microcontrollers. As your designs grow in complexity, the code you write (later) can be easily transitioned to larger Microchip microcontrollers with more peripheral resources.
In order to help you get acquainted with the benefits gained by incorporating a microcontroller into your design, we will guide you through the steps in setting up your system, writing a short program, and programming your first PICmicro $ ^{\circledR} $ MCU.
To get started, you need to install Microchip's MPLAB™ Integrated Development Environment (IDE). PICSTART® Plus Mechatronics Kit, and MPLAB IDE, which is supplied on CD-ROM.
NOTES:
Chapter 2. Installing MPLAB-v4.11 or Later
2.1 CD-ROM Installation
- Insert the MPLAB CD-ROM into your CD-ROM drive.
If running Windows $ ^{\circledR} $95 with autoplay turned on, MPLAB $ ^{TM} $ should begin loading. If running Windows95 with autoplay turned off click the START button in the lower left-hand corner of your computer screen.
If running Windows 3.1x, select File from the tool bar.
- Select Run... from the menu to bring up the dialog box. Enter the drive letter for your CD-ROM (i.e., e:) Click OK.

Run ? X Type the name of a program, folder, or document, and Windows will open it for you. Open: OK Cancel Browse...
Click the Browse button. To begin the installation program, double-click on Mp41100.

File Edit View Help
Mplab_411 (E.) Acrobat Devsys Floppy Installation Manuals MPLAB-C17 Demo Picdem
1 object(s) selected 8.59MB
Note: Future versions of MPLAB will have higher revisions numbers (for example: Mp50000) and are available from Microchip's web site at www.microchip.com under "Development Tools."
- The Select Components window enables you to select which components you want to install. A checkmark in the box will install the component. For this application using the PICSTART $ ^{®} $ Plus programmer, select the components as shown in the diagram. Click Next to proceed or Back to edit the previous selections.
Note: If you have a PICMASTER $ ^{\circledR} $ emulator or a PRO MATE $ ^{\circledR} $ programmer, you will want to select the components for them as well.
MPLAB v4.11 Installation

2
Select Components
- The Select