Home

PICflash User Manual

image

Contents

1. cccccsseecceececeeeeceeeceeeeceeeceueeseusesusessesessesenaess 9 5 0 Keyboard Shortcuts and Command Line Parameters cooocccccccnocononononcconnnnnnnonannonnnnnnnnnonannonnnnonannnnnss 10 page pa Introduction to PICflash with mikrolCD Programmer The PlCflash programmer with mikrolCD support is a great tool used for programming PIC16F and PIC18F microcontrollers from MICROCHIP It is of unique design and easy to use which makes it a very popular tool among beginners and professional users alike The PICflash programmer communicates to the microcontroller through a USB cable which is also used for powering the programmer In addition it is a low power consumption device which makes it ideal for working with portable PCs In order to use this programmer it is necessary to have the appropriate software provided on the product CD installed on your PC The mikrolCD debugger is an integral part of the PlCflash programmer that enables you to run a program step by step while monitoring the state of all registers within the microcontroller If you simply want to load the program in some PIC microcontroller you may use the PICflash programmer and the HEX code generated in any PIC compiler If you also want to debug simulate the program in real environment using the mikrolCD debugger you have to use some of our PIC compilers for program writing as they provide mikrolCD support The mikrolCD debugger may be used with all MikroE
2. PICflash programmer with mikrolCD support is a high performance tool used for programming PIC16F and PIC18F microcontroller families from MICROCHIP The PICflash programmer communicates to the microcontroller through a USB cable which is also used for powering the programmer MikroElektronika SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD oli wk sim ple TO OUR VALUED CUSTOMERS I want to express my thanks to you for being interested in our products and for having confidence in mikroElektronika The primary aim of our company is to design and produce high quality electronic products and to constantly improve the performance thereof in order to better suit your needs Nebojsa Matic General Manager The Microchip name and logo PIC and dsPIC are registered trademarks of Microchip Technology Incorporated in the U S A and other countries All other trademarks mentioned herein are property of their respective companies and are only used for the purpose of identification or explanation and to the owner s benefit with no intent to infringe TABLE OF CONTENTS Introduction to PICflash Programmer aia Piedras 4 1 0 leo cia o AA 5 2 0 mikrolCD In Circuit Debugger aa rrsrrrrsssssssssssssssasssssasa 6 SD SDI G A e Ue T 4 0 Practical Example of Using PICflash Programment
3. Before you start software installation make sure that the P Cflash programmer is not connected to the PC PICFLASH with mikrolCD v7 13 Setup Step 1 Start installation Welcome to the PICFLASH with Insert the product CD into your PC drive After a few seconds a list with all ii papua MikroElektronika s products will appear on the screen To start the process a E indeed the installation of of installing the P Cflash software click on the setup icon provided in the N ae n S It is recommended that you close all other applications PICflash section on the product CD G before starting Setup This will make it possible to update relevant system files without having to reboot your de computer CD Drive zip PICFlash_setup exe meee Chick Next to continue You can also download the P Cflash programmer free of charge from our website The installation starts from your hard drive in this case A welcome window appears Click Next to proceed PICFLASH with mikrolCD v7 13 Set Step 2 Licence Agreement with mikrolCD v7 13 Setup License Agreement Please review the license terms before installing PICFLASH with mikroICD 7 13 Before you start the installation procedure please review the licence agreement terms To accept them select the option accept the terms in the Press Page Down to see the rest of the agreement Li cence Ag reemen t and click N ex t I mikroElektronika Associates License Statement and Lim
4. Fail sale Clk Monitor Ensbled 2 Click the Load option to open the window to select the HEX code to be loaded into the microcontroller Click the Write option to start programming the microcontroller Low Voltage Program Dissbied In Circuit Debugger CO Disabled Brown out Reset Sel set to 4 09 Y Calbration word Protect Cal Word Y CODE Y DATA EEPROM MMMM MMM Nh te TIPICO Y LITIO RR AR AAA ID Locations 3FFF 3FFF 3FFF 3FFF Program Memory Size 8 K Device Status Idle Type DATA Size 256 Bytes Address h Revision MBN 26 The Progress bar shows the programming progress expressed as a percentage File C PROGRAM FILES MIKROELEXTRONIKA MIKROC PRO FOR PICIEXAMPLESIDEVELOPMENT SYSTEMS EASYPICS LCO L CD HEX Device P1C16F887 Operation None The PICflash program enables a HEX code generated in some of PIC compilers to be loaded into the microcontroller The HEX code should be first loaded into the programmer s buffer by clicking the Load option then into the microcontroller by clicking the Write option within the programmer s main window The programming progress will be shown in the Progress bar in the bottom right corner of the same window Compiling program i mikroC PRO for PIC C Program Files Mikroele PHI Pied O Write a program in a compiler File Edit View Project Run Tools Help gt and generate a HEX code HE a B amp 4 Bin D 2 HOM 2 10 gt Uee u
5. O In the PICflash programmer s Ea CJ 2 RS idos A 0111 2FC23AA7 main window select the appropriate 2 Led c 1011 F43E0021A microcontroller and load the HEX char i Hex DA67F0541 code into the programmer s buffer Elvoid Move Delay Click the Write button to program 50 Delay ms 500 the microcontroller bil tira Fae T i fel L I mib hie hud wr EE void maini EEA pa 0 soto E L i On the left side of The PICflash C1ON bit D a mere a programmer s main window C20N bit D ptes E ios mat there are several options for a e a microcontroller settings A number of options which will make the programming process E rara sr Me z ws easier are provided on the right Pair L PAE NA PO OA de ee VITALES ee a A side of the window 2 0 mikroICD In Circuit Debugger The mikrolCD In Circuit Debugger is an integral part of the PICflash programmer It is used for testing and debugging programs The process of testing and debugging is performed by monitoring the state of all registers within the microcontroller which operates in real environment The mikrolCD software is integrated in all compilers designed by mikroElektronika such as mikroBASIC PROS for PIC mikroC PRO for PIC and mikroPASCAL PRO for PIC In order to enable the process of debugging within the compiler it is necessary to select options Build Type ICD Debug and Debugger mikrolC
6. p Microcontroller type for example P16F877A P18F452 etc f File name must be enclosed in quotation marks b Blank check q Close the PICflash program after programming PICflash exe w pPIC16F877A v f C somefile hex This command is used for loading C somefile hex into the PIC16F877A microcontroller This file is verified immediately after being loaded PICflash exe r pPIC16F877A This command is used for reading the PIC16F877A program memory PICflash exe e pPIC16F877A This command is used for erasing program from the PIC16F877A microcontroller DISCLAIMER All the products owned by MikroElektronika are protected by copyright law and international copyright treaty Therefore this manual is to be treated as any other copyright material No part of this manual including product and software described herein may be reproduced stored in a retrieval system translated or transmitted in any form or by any means without the prior written permission of MikroElektronika The manual PDF edition can be printed for private or local use but not for distribution Any modification of this manual is prohibited MikroElektronika provides this manual as is without warranty of any kind either expressed or implied including but not limited to the implied warranties or conditions of merchantability or fitness for a particular purpose MikroElektronika shall assume no responsibility or liability for any errors omissio
7. D before the program is loaded into the microcontroller As soon as the mikrolCD debugger starts up the window as shown in figure below appears The mikro CD debugger communicates with the PC through the microcontroller pins used for programming Therefore these pins cannot be used as I O pins while the process of debugging is in progress Watch Values a mikrolCD debugger options Icon commands t bh bh o oe OT m i Start Debugger F9 Run Pause Debugger F6 Stop Debugger Ctrl F2 Step Into F7 Step Over F8 Step Out Ctrl F8 dk Add PM Remove X gt Properties lg Add All Select variable from list A complete list of registers within the programmed microcontroller Search for variable by assembly name A list of selected registers to be moni 7 Peripherals Freeze tored The state of these registers p nee changes during the program execution Address which can be viewed in this window 00 Double click on the Value field enables you to change data format The mikrolCD debugger also offers functions such as running a program step by step single stepping pausing the program execution to examine the state of currently active registers using breakpoints tracking the values of some variables etc Here is an example of program execution using the Step Over command Toggle Breakpoint F5 Show Hide Breakpoints Shift F4 Clear Breakpoints Ctrl Shift F4 Each of these commands is ac
8. a Beren Did Deiri bcti stat del eibar ached Palese Ok Hamim ras lon Valle Progr ar lr nr ui Deba eget Meet fel pet ie P a a lda A CEEE ID Lt share IF FFF WFF WFF Pig iiy Sam 8 K Dat rt lla Tri CATA Sos PS Bpis hibe Oly Parar Pii E oo FEO A E Ea Td Mo A Pa PO DAPR DO ADO AA PDA E a AA Bawa PAET pai at sr ega 11 pen Loa Era RE gt mmm 42 My Aeceri Documents Code Prod ect tore DOGO PFN dd Write Unable te poto ON SOOO COPA Pd ADO OP Prieta AA CIO A e el Egin as atum eed ode aa a Cal wd 7 CALA miot PEE PEE TEE TET TIE CPE FEY PEE PET PEE cO gtis Prog Memory Sie BE m Erur bia Ty Page Ci io PSG Bpi biie Sh Erur MINE 26 Barse PICA PE Jerri Fearn 10 Keyboard Shortcuts Command Line Example 1 Example 2 Example 3 5 0 Keyboard Shortcuts and Command Line Parameters Alt E Erase microcontroller s memory Alt B Program memory blank check Alt W Write HEX code into PIC Alt V Verify loaded HEX code Alt R Read program memory Alt D Change microcontroller type Ctrl S Save HEX code Ctrl O Open Load file with HEX code Ctrl R Reload HEX code The PICflash programmer may also be activated from the command line thus enabling you to use it from some other software compiler etc Here is a list of the command line parameters W Write to PIC V Verify e Erase PIC r Read from PIC
9. ard NOTE Before you use the P Cflash programmer it is necessary to install the appropriate drivers For more information refer to the nstalling USB Drivers manual Cancel 4 0 Practical Example of Using PICflash Programmer After the software installation is complete connect the programmer to your PC using a USB cable The USB connection will be automatically established which is indicated by the USB LINK LED diode s illumination Step 1 Start up the PICflash programmer Start up the PICflash programmer installed on your PC Click the Device option in order to select the microcontroller to be programmed The PICflash programmer will automatically set default parameters for working with the respective microcontroller Step 2 Load a HE X file into the programmer Click the Load HEX option to open the Open window as shown in figure on the right Select the relevant file with the HEX extension and click the Open button The file will be automatically loaded into the programmer s buffer Step 3 Load the HEX code into the microcontroller Click the Write option in the upper right corner of the main window to start programming the microcontroller The programming progress will be shown in the bottom right corner of the same window ATH 1 11 th mehr Eje gewe gier pii UR on piar a TE DA ici erl Wabia Pate Cosi Fasser Up Times adii Miber Dear indias Dama IE Potet
10. dered on the taget device The PiCflash programmer s hardware is built in all MikroElektronika s development systems designed for working with PIC microcontrollers O On board PICflash programmer s hardware Stand alone PlCflash programmer s hardware 1 0 PICflash Programmer s Operation The PICflash programmer is easy to use as all the options necessary for its operation are provided in a simple window which will appear either by clicking on the PICFLASH icon or automatically by starting the compiling process Build And Program option The options used for setting configuration bits are provided on the left side of the window whereas the options for loading HEX file into the programmer and the microcontroller are provided on the right side of the window t mikroLlektronika PicrLASH v7 13 with mikrolCD ed File Device Buffer Windows USB About History Configuration Bits MLE To load the program into the microcontroller do the following Device CECEN Code Protect O None Watchdog Timer Disabis 0000h 1FFFA Al Power Up Timer Oscillator Read Selectthe microcontroller to be programmed and the PICflash will automatically set default parameters for working with the respective microcontroller FLASH Program Memory Master Clear Enabled Write Enable Data EE Protect Dissbied O Write protection Off Brown Out Detect 800 Enabled 0000h OOFFh Protected Mii a 0000h 07FFh Protected
11. ited Warranty IMPORTANT READ CAREFULLY This license statement and limited warranty constitute a legal agreement License Agreement between you either as an individual or a single entity and mikroElektronika CmikroElektronika Associates For software product Software identified above including any software media and accompanying on line or printed documentation Tf you accept the terms of the agreement select the First option below You must accept the agreement to install PICFLASH with mikroICD v7 13 Click Next to continue S I accept the terms in the License Agreement I do not accept the terms in the License Agreement PICFLASH with mikroICD Step 3 Choose Components PICFLASH with mikrolCD v7 13 Setup Choose Components oo Choose which features of PICFLASH with mikroICD v7 13 you To make your choice simple this installation step offers you only one want to install compone nt to choose Click Next Check the components you want to install and uncheck the components you don t want to install Click Next to continue Select components to install PICFLASH A Position your mouse over a component to see ts description Space required 9 1MB PICFLASH with mikrolCD 8 PiCflash with mikrolICD EN e Step 4 Choose Installation Location PICFLASH with mikrolCD v7 13 Setup Choose Install Location Now you should specify the folder to install the P Cflash program in If y
12. lektronika s compilers for PIC16 PIC18 PIC24 PIC30 and PIC33 families The PlCflash program contains an option for selecting the Ele Qee Dfe Windows LS Abot tistory microcontroller to be programmed The latest version of Configuration ats this software with updated list of supported microcontrollers r Code Protect gt i Oscillator r can be downloaded free of charge from our website at Watchdog Timer dsshied 0000h 1PFFh Al www mikroe com mikroLlektronika PICFLASH v7 13 with mikrolCD Power Up Timer Disatied FLASH Program Memory Master Clear fnetled Write Enable Data EE Protect Onebed O write protection Off Brown Out Detect B00 Enebied 0000h GOA Protected oa air aoii 0000h 07PFh Protected Fail safe ik Monitor fretted Low Voltage Program Dsabied in Circu t Debugger CD Owebied Brown out Reset Sel sat 10407 DODD OF PPR Protected Y Calibration word Protect Cal Word Y DATA EEPROM CODE DATA ID Locabors 3FFF 3FFF 3FFF 3FFF Clear lt Options Prog esa Prog wa Memory See 8 K Device Satus Idle Type DATA Soe 256 Bytes address Oh Revision File C PROGRAM FILES MIKROELEK TRON IA MIXROC PRO FOR PIC EXAMPLES DEVEL OPMENT SYSTEMS EAS PICS COL COHEN Device PIC 14f 887 Operabon None PICflash with mikroICD software is used for programming PIC microcontrollers from MICROCHIP It is also available as a stand alone device used for programming PIC microcontrollers built into sol
13. ns and inaccuracies that may appear in this manual In no event shall MikroElektronika its directors officers employees or distributors be liable for any indirect specific incidental or consequential damages including damages for loss of business profits and business information business interruption or any other pecuniary loss arising out of the use of this manual or product even if MikroElektronika has been advised of the possibility of such damages MikroElektronika reserves the right to change information contained in this manual at any time without prior notice if necessary HIGH RISK ACTIVITIES The products of MikroElektronika are not fault tolerant nor designed manufactured or intended for use or resale as on line control equipment in hazardous environments requiring fail safe performance such as in the operation of nuclear facilities aircraft navigation or communication systems air traffic control direct life support machines or weapon systems in which the failure of Software could lead directly to death personal injury or severe physical or environmental damage High Risk Activities MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities Copyright 2003 2009 by MikroElektronika All rights reserved G LUO9 olItu 2lJo Je sn oe uo3 0 ajejisay JOU op siesodoJd ssausng Jo sju uluuoo suonsanb Aue ol NOK J a Y noddns ua uo
14. o onlLu MMM paou sono hue a wos oJyIwu MMAM l ousciom ino usn osea sonpad und Piode aJo iwga 0 juem no Jl 5 Cd 1Y OM Q4GGdglAd HO SNOILN TOS 4JdVAGdVH ANY JYYMLJOS me m E ES
15. ou TAEA COA A A want to install it in a folder different from default click Browse and select j j 2 Setup will install PICFLASH with mikroICD v7 13 in the Following Folder To install in a different another folder on your hard disc Then click Next lf you choose the default folder click Browse and select another folder Click Install to start the installation folder the program will be installed on the following location C Program Files Mikroelektronika PICFLASH mikroICD Destination Folder C Program Files MikroelektronikalPICFLASH mikrolCD Space required 9 1MB Space available 9 4GB PICFLASH with mikrolCD Step S Installation Details PICFLASH with mikrolCD v7 13 Setup Installing The PiCflash programmer installation starts immediately The installation Ries He NN OA SERIA installed progress will be shown on the screen lf you are interested in details about the installation click the Show details button Extract PICFLASH exe TITITITTTITTT www ww s PICFLASH with mikroTCD Step 6 Completing Installation PICFLASH with mikrolCD v7 13 Setup nn I mn C leting the PICFLASH with Windows will inform you in the window as shown in figure on the right that pe ae Bg Setup aa the PICflash programmer has been successfully installed Click Finish to de an complete the installation E N decir with mikroICD v7 13 has been installed on your Click Finish to close this wiz
16. tivated via keyboard shortcuts or by clicking appropriate icon within the Watch Values window mikrolCD Watch Values window Step 1 In this example the 31st program line is highlighted in blue which Duri p means that it will be executed ed operation the program line to be executed next is a Vee nese The curent state of all ighlighted in blue while the breakpoints are highlighted in E PAN I red The Run command executes the program in real time E PORTC Ox0D registers within the microontroller until it encounters a breakpoint z ay ms 1000 can be viewed in the mikrolCD Watch Values window Watch Yahirs w B FORTC OxFF Gh or 4 oo or m E amp void maini i de add Mo TE ie Addall TRISC Oxoid get PORTE pine to be ov Select vasable pen kit PORTE Ox00 i Tien OFF LEDs on PORTO PORTE Seach hor variable by strambi name Delay _ms 1000 30 do y 31 PORTE nF F Turn OF Bata on POST Delay ms 1000 j Step 2 a i After the Step Over command F8 is executed the e107 mE il soon a 7 i astiti microcontroller will execute the 31st program line The next line 32nd to be executed is highlighted in blue The state of registers being changed during the execution of this instruction may be viewed now in the Watch Values window NOTE For more information on the mikrolCD debugger refer to the mikrolCD Debugger manual page mw 3 0 Software Installation

Download Pdf Manuals

image

Related Search

Related Contents

B1 Bass Module  Guide d`utilisation des équipements de transformation du manioc  Bibliographie Alain Supiot septembre 2010-2  ックス  Cisco 831  Manuel d`utilisation  

Copyright © All rights reserved.
Failed to retrieve file