Home

Megawin 8051 ISP

image

Contents

1. cccccececeeeeeeeeeceeceeeeeeeseceaeeeeeeeeesecnisaeeeeeeeeeteees 22 4 3 Actas an CP Programmer cntcdtnictdanecinmtnechinndnintcecebiteat danid d aehdcembbastedbauiaadnedanaaldaamatdetenctadeaeiies 23 4 3 1 Download Programming Data to the ICP Programmer sseeeeeseeeeeesrrsserrsseirrrssrerrnserrrssrernsseennns 23 4 3 2 Update the Target eccrine adie diet EEEE ae ead eats al ali ie 23 4 4 The Megawin Project File MPJ File cceeeeeseeseeseeeeeeeeeeeeseneseeneeeeeeeeesessseeeeeeneeeesnens 24 E cplckha ussedata vaedaest vasa E T T 24 Arcee rer rcey ever src a precree yee Tyr Tener Se eeere ereerh Pr re Serre repr errencree rarer 25 E E E dyes seaistreeinrianideeeue 26 AE E E EA 26 R T A a etre ee ee A T 27 e E E E E A 28 29 4 4 2 Load an MPJ File Information Zone 5 5 2 Dump the Infor Special Notes Special Notes 5 1 Definition of the Information Zone 6 7 Revision Histo for ISP for ICP mation Data ry This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer s User Manual v5 30a MAKE YOU WIN 1 Introduction ISP is the acronym of In System Programming and ICP is the acronym of In Circuit Programming Both these two programming methods make it possible that the user can update the application code under the software control without removing
2. 2 Update the driver to OE6A030D_8051ISPICP_v3 00 inf for Vista OS 1 Fix the AP bug Firmware upgrade will fail if host uses OHCI chip set v5 30 2 For ICP Programmer the user can select whether to update the hardware option 2007 10 05 or not 1 Fix the AP bug Wrong display in the H W Option area when MPC89E58 MPJ is loaded v5 30a 2 Modify description for HWENW Section 3 3 3 amp 3 3 4 2008 01 24 3 Correct description for ENLVRO from 3 8V to 3 7V Section 3 3 3 4 Update Section 2 1 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 30
3. Restriction P3 1 is used to drive an NPN transistor R gt 1K cry R_pull_up 10K r RS232 Transceiver Figure 4 P3 1 is used as it original TXD function No restriction 8051MCU UART s TXD ED Figure 3 P3 1 is used to drive an L Restriction R gt 510 if vcc 5 0V Pa R gt 330 if VCC 3 3V 8051MCU Figure 6 P3 1 is used to drive a high impedance input No restriction 8051MCU 28 Figure 5 Restriction R_pull_low gt 300K 8051MCU P3 1 is pulled low This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 ISP ICP Programmer MAKE YOU WIN 7Y MEGAWIN Cry User Manual v5 30a 7_ Special Notes for ICP When the Programmer is used as an ICP Programmer the user can select any of the Target Programming Area This feature however is not available if acting as an ISP Programmer In addition if AP memory or ISP memory is included in the programming area the corresponding memory space should be configured by properly setting the H W option regarding the IAP space and ISP space When chip was not locked previously the user can individually re program any area he wants However when the chip had been locked previously any re programming will be inhibited This is for security consideration It prevents from any re programming of a code with the malicious purpose So re programm
4. disabled Not scrambled LOCK disabled Not locked enabled Code dumped amp Device ID read on a universal Writer or Programmer is locked to OxFF for security enabled Oscillating gain is reduced down for EMI reduction OSCDN disabled Normal gain enabled Like HWBS the reset from RST pin can also cause MCU to boot from ISP memory HWBS2 disabled Where MCU boots from is determined by HWBS enabled Enable MCU to generate low voltage reset when VDD pin voltage drops below 3 7V ENLVRO disabled No low voltage reset ENROSC enabled Enable built in RC oscillator disabled Disable built in RC oscillator WDSFWP enabled The special function register WDTCR will be write protected except the bit CLRW disabled The special function register WDTCR is free to be written by software HWENW accompanied with arguments HWWIDL and HWPS 2 0 enabled Automatically enable Watch dog Timer by the hardware when the MCU is powered up In the WDTCR register the hardware will automatically It means that 1 set ENW bit 2 load HWWIDL into WIDL bit and 3 load HWPS 2 0 into PS 2 0 bits For example If HWWIDL and HWPS 2 0 are programmed to be 1 and 5 respectively then WDTCR will be initialized to be Ox2D when MCU is powered up as shown below WDTCR Vatch Dog Timer Control Register 7 6 5 4 3 2 1 0 WRF ENW CLRW WIDL feet load load HWWIDL HWPS 2 0 1 disabled No ac
5. binary format Step 3 Configure the wanted H W Option Step 4 Click Update Programmer Note In Step 2 you can load an MPJ file refer to Section 4 4 then Step 3 is not necessary 4 3 2 Update the Target How to update the target Step 1 3 The same as previous Step1 3 Step 4 Click Update Target This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 23 ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer CsA MAKE YOU WIN User Manual v5 30a 4 4 The Megawin Project File MPJ File In addition to the application code the Programmer may program the H W options to the target MCU at each time the Update Target button on the PC site AP is clicked or the ISP key on the Programmer is pressed And maybe the operating of application code depends on the H W options for example EN6T so the one who takes the programming task must set the correct H W options in addition to loading the correct application code To prevent from any mistake for example forget to set the correct H W options all the relevant programming information should be saved together in one file which we called the MPJ file 4 4 1 Save to an MPJ File The MPJ file includes all the relevant programming information appearing on the GUI they are 1 2 3 4 5 6 Programmer Type MCU Part No Control of Update H W Option Programm
6. Finish when the installation completes To check if the Programmer was correctly installed follow the listed steps 1 Open the My Computer folder 2 Open the Control Panel folder 3 Open the System 4 Click on the Hardware tab at the top of the dialog box then click on the Device Manager 5 Click on the plus sign in front of the Universal Serial Bus Controllers to check the device listing If the installation was completed successfully you may find an entry Megawin 8051 ISP ICP Programmer in the listing 3 2 Install the AP Run Setup exe in the 1 PC site AP folder to install the application program for the ISP ICP Programmer on your PC Using its default installing setting you will find the item Megawin Utilities Megawin 8051 ISP ICP Programmer v appearing in the Windows START menu Note the v means the current version and may be upgraded in the future 11 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 7 Y MEGAWIN OC MAKE YOU WIN Megawin 8051 ISP ICP Programmer User Manual v5 30a 3 3 Introduction to GUI of the PC site AP GUI means Graphic User Interface of the Application Program running in the Windows The PC site software AP Application Program integrates both functions of the ISP Programmer and the ICP Programmer The first thing the user needs to do is to select
7. Ltd 2007 All right reserved 13 Megawin 8051 ISP ICP Programmer User Manual v5 30a 7Y MEGAWIN OA makeyouwN ISP Programmer GUI for MPC89 series 3 3 1 Select MPC89 series Select ISP Programmer H Megawin 8051 ISP ICP Programmer 75 30 Update HAA Opti ee a Load File Update Target Update Programmer f Y MEGAWIN MAKE YOU WIN Programmer Type r MCU Part No MPC89L E 51 C CEILE Save MPJ i Exit Dump Target Info Programming Area t gt HAN Option Setting ISP memory HVVENVY HWWIDL 7 0 or 1 HYVPS p MG84FL516 0 7 IAP memory Set IAPLS Binary Code Buffer About the H W Option Setting The user should always configure proper H W Option before clicking Update Target or Update Programmer FZWDTCR enabled The WDTCR register will be initialized to its reset value 0x00 only by power on reset For example if WOTCR 0x2D it still keeps at 0x2D rather than 0x00 after RST pin S W or WDT reset disabled The WDTCR register will be initialized to its reset value 0x00 by all reset including power on RST pin S W and WDT reset enabled If the XTAL frequency is less than 25MHz this option can be enabled to reduce the internal OSCDN oscillating gain for lower EMI disabled Normal oscillating gain enabled MCU runs at 6T mode 6 clocks per machine cycle double speed compared to a traditional 8051 14 ENGT disabled MCU runs at 12T mode 1
8. shows how to open an MPJ file EY Megawin 8051 ISP ICP Programmer v5 30 JEX MEGAWIN TOS MAKE YOU WIN E a MCU Pat N Update HiV Opti arene aS a abs wes ae T Load File Update Target ol ISP C ICP MPC89L E 51 Programming Area Save MPJ Update Programmer _Update Programmer ohe A SU SP ie SA oie Bi Dore gate Exit Dump Target Info HAN Option Setting ISP mema a2 FI I HWENW ay jii HWAWIDL 7 SRi IAP memo rale b ry fE Pai ie HWVPS Set FF IAPLB in jo Binary Code Buffer 1 Open Searchin Tos z emam Batch CPU Z v1 40 PE2 82G516_isp mpj File Name N Open O File Type T HEX Files HEX v Cancel HEX Files HEX Bi Files BIN Select MPJ WMegawin Project Files MPI z it This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 25 Megawin 8051 ISP ICP Programmer User Manual v5 30a MEGAWIN wy 7 MAKE YOU WIN When the H W option LOCK or SB is enabled for code security there is no way to read out the contents of the target by neither a universal programmer nor the ISP Programmer For the purpose of user s product failure analysis in the future a special Flash area called Information Zone is defined to be readable by only the ISP Programmer even the target is locked or scrambled The
9. the Programmer Type when the AP is opened See the following figures for these two programmer types ISP Programmer Type Select Programmer Type as ISP Items for ISP H Megawin 8051 ISP ICP Programmer 5 30 CLA MESAWMIN Programmer Type gt f MCU Part No Update HAY Option ISP ICP Programming Area G g Load File Save MPJ Exit Update Target Update Programmer Dump Target Info HA Option Setting SP memory HVVWIDL 7 MPC826516 Oor 1 IAP memory MG84FL54 set FF api MOS4ELS 16 HES po Binary Code Buffer This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Bi ill 12 Megawin 8051 ISP ICP Programmer Y MEGAWIN OA ware vouwn User Manual v5 30a ICP Programmer Type Select Programmer Type Items for ICP as ICP H Megawin 8051 ISP ICP Programmer v5 30 Update HAY Option Yes C No MEGAWIN MAKE YOU WIN Programmer Type MCU Part No C ISP ICP MPC82G516 v MPC82G516 MG84FL516 AP C AP IAP AP IAP ISP HAN Option Setting ISP memary Set NA HWENW ee HVWWIDL IAP memary 0 or 1 Set FF IAPLB NA Oe 7 Binary Code Buffer Programming Area TAREE JISE Load File Save MPJ Exit Ee See This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co
10. the mounted MCU chip from the actual end product The tool Megawin 8051 ISP ICP Programmer see the following picture integrates these two functions into a USB stick That is it can function as an ISP Programmer and an ICP Programmer In addition because the programming data to be programmed to the target can be saved in the programmer s non volatile storage this programmer is able to work stand alone without host PC intervention This feature is especially useful in the field without a PC Picture of the ISP ICP Programmer Green LED ISP key Red LED ICP Interface ISP Interface USB LED USB Plug 4 SCL 4 N A 3 VCC 3 VCC 2 SDA 2 DTA 1 GND 1 GND 1 1 Two in One Functions ISP Programmer When acting as an ISP Programmer it functions like a bridge between the host which provides the new programming data and the target MCU which has the loader program running inside The loader program is the so called ISP code and should be pre programmed in the ISP memory of the target When powered on the target boots from the ISP memory and executes the ISP code to check if the ISP operation is requested If the ISP is requested the target receives the programming data from the Programmer and programs into the AP memory by in system programming method After ISP processing is completed the target will re boot from the AP memory to run the new application code when the Programmer is plugged out of the target If
11. user may put some useful product information there for Information Zone future failure analysis such as Product version F W version manufacturing date code and etc The Information Zone is just the name of the range where the ISP Programmer can read out data even the target 5 Note is locked or scrambled 5 1 Definition of the Information Zone The Information zone is defined in the 256 bytes just prior to the ISP memory as listed below For MPC89L E 51 52 53 it is located at 0x3700 0x37FF For MPC89L E 54 58 515 it is located at OxF700 OxF7FF For MPC82L E 52 it is located at 0x1B00 0x1BFF For MPC82L E 54 it is located at 0x3700 0x37FF For MPC82G516 it is located at OxFBOO OxFBFF For MG84F L454 it is located at 0x3BO0 0x3BFF For MG84FL516 it is located at OxFBOO OxFBFF An example of the Information zone of MPC89L E 54 58 515 oooof640h C9 C8 C7 C6 C5 C4 C3 C2 Ci CO BF BE BD BC BB B oooof650h B9 BS B7 B6 BS B4 B3 B2 Bi BO AF AE AD AC AB AA oooofs660h AS AS A A6 AS A4 A3 AZ Al AO OF 9E 9D 9C 9B 9a oooof670h 99 98 97 96 95 94 93 92 91 90 BF 8E SD 8C 8B Ba oooof680h 89 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A oooof690h 79 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6a Do0Of6a0h 69 68 67 66 65 64 63 62 61 60 SF SE 5D 5C 5B 5A User can use any HEX editor oooof 6bOh 59 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4a to dit his Information Data oooof6cOh 49 48 47 46 45 44 43 42 41 40 3F 3
12. 2 clocks per machine cycle like a traditional 8051 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved MAKE YOU WIN User Manual v5 30a ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer s 3 3 2 ISP Programmer GUI for MPC82 series and MG84 series Select ISP Programmer Select MPC82 series and MG84 series H Megawin 8051 ISP ICP Programmer v5 30 aig MEGAWIN MAKE YOU WIN gt Programmer Type MCU Part No Update HAA Option C ICP MG84L516 J D Programming Area METLE E Save MPJ A C JAF MPC89L E 63 ADAG MPC8SL E 54 Exit HAN Option Setting MPC8SL E 58 ISP memoary Load File HWENW SEL JNS E HWWIDL F m IAP memory orii Set FF APLIMG DATT E a g _ ilk Update Target Update Programmer Dump Target Info Binary Code Buffer About the H W Option Setting For these two series the user can not update the H W Option by ISP This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 15 3 Megawin 8051 ISP ICP Programmer MAKE YOU WIN fy ivy MEGA WIN User Manual v5 30a 3 3 ICP Programmer GUI for MPC82G516 Select ICP Programmer Select MPC82G516 H Megawin 8051 ISP ICP Programmer 5 30 Update HA Option 7 j Load File No Yes Program
13. E 3D 3C 3B 3a DOOOf6dOh 39 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2a 0000f6e0h 29 28 27 26 25 24 23 22 21 20 1F 1E 1D iC 1B ia goooof 6fOh 19 18 17 16 15 14 13 12 11 10 OF OE OD OC OB Oa o000f700h Information 1 Product Type gt URC_RS 2 Mfg Plant gt Gumi Korea 3 Mfg Date ener otras Information Data 4 F W Version gt 1 00 MCU Type oo00f710h oo000f72zO0h Oo000f730h oo0o00f740h O000f750h O000f760h Ooo00f770h o000f780h o000f790h o000f7a0h O000f7bOh O000f cOh ooo0f7d0h oooof 0000 Megawin MPC89L54 568 515 Text type 26 ASCII type 7eOh f7 fOh il Address This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved TLAS makEyYouwN Megawin 8051 ISP ICP Programmer User Manual v5 30a MEGA WIN To view the Information Data in the Information Zone click Dump Target Info Now the Information Data read 2 Dump the Information Data by the ISP Programmer will be displayed on the Binary Code Buffer as shown below 5 H Megawin 8051 ISP ICP Programmer 5 30 MEGAWIN MAKE YOU WIN Programmer Type MCU Part No Update HA Option 0 SER llel MPC8SL E 515 pE E 7 HWENW Programming Area G HAA Option Setting ISP memary Set x IAPLB Dump Information OK IAP memory Set Binary Code Buffer This document information is th
14. HWENW is enabled Set Now HWBS W og qa iis aaee ah ea ENST M AE uwes Po mE ag 7 lait il Clear Message Exit File C tmp ISP_Code_v5 00 BIN CodeSize 991 Bytes CheckSum 0x94A53 Step4 Configure the MCU s HIW Option This document information is the intellectual property of Megawin Technology Co Ltd 6 Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer s User Manual v5 30a MAKE YOU WIN 2 2 Using the Hi Lo ALL 11 Programmer for Chip Configuration Step 1 Configure the H W option Enable HWBS and select ISP Address 1 For MPC89L E 51 52 53 select 0x3800 0x3BFF 1K bytes for Megawin provided ISP code For MPC89L E 54 58 515 select OxF800 0xFBFF 1K bytes for Megawin provided ISP code For MPC82L E 52 select 0x1C00 0x1FFF 1K bytes for Megawin provided ISP code 4 For MPC82L E 54 select 0x3800 0x3DFF 1 5K bytes for Megawin provided ISP code For MPC82G516 select 0OxFC00 0xFFFF 1K bytes for Megawin provided ISP code For MG84FL54 select 0x3C00 0x3FFF 1K bytes for Megawin provided ISP code For MG84FL516 select 0xFC00 0xFFFF 1K bytes for Megawin provided ISP code See the following example For MPC89L E 51 52 53 Device Mfr MEGAWIN Type CCMPC893L51A Adaptor None Select ISP Address VO base addr LPT1 3BC Target Zone Byte Wide Device Start 00000000 Device End 00003BFF Co
15. SP ICP Programmer q 7 MAKE YOU WIN User Manual v5 30a 2 1 Using the Megawin 8051 Writer for Chip Configuration Please follow the steps also shown in the following picture Step1 Select the Part No Step2 Select the Programming Area SP memory Step3 Load the ISP code to the Writer s buffer Step4 Configure the MCU s H W Option select 1KB or 1 5KB for MPC82L E 54 for ISP memory and enable HWBS or HWBS2 Step5 Click Auto and select Program Option then click Run for auto programming Step3 f Load the ISP code Step1 Step2 ISP_by_COM BIN Select Part No Select Programming Area Megawin 8051 Writer v3 80 MEGAWIN MAKE YOU WIN Programming Area C AP memory IAP memory ISP memory C AP IAP ISP Check ID Part Number MPC89L54 H Binary Code Buffer Load File Save MPI Save Buffer Dump Target Click the Auto and select Program Option for auto processing Get Checksum HE Insert ISP code H W Option ISP memory Whole chip Program Read Set 0xF800 OxFBFF 1KB v Erase Option Option J Whole chip Erase i i Now I7 Check ID Set Now Set Now z Exit AP ny MOYCL Tr Gla Set IAPLB QU SB in ric M Erase Select LOCKE E eile V BlankCheck Program Option How tansk FZWDICR aie F Pogo 1s OSCDN Tr Gis E
16. Technology Co Ltd 2007 All right reserved YN MEGAWIN Megawin 8051 ISP ICP Programmer Us User Manual v5 30a MAKE YOU WIN Step 3 Change the Buff start to the ISP start address 1 For MPC89L E 51 52 53 change to 0x3800 2 For MPC89L E 54 58 515 change to 0xF800 3 For MPC82L E 52 change to 0x1C00 4 For MPC82L E 54 change to 0x3800 5 For MPC82G516 change to 0xFC00 6 For MG84FL54 change to 0x3C00 7 For MG84FL516 change to 0xFC00 Note Hi Lo will support MPC82G516 MG84FL54 and MG84FL516 in the future uP WPGM51 EXE 5 53 Gl Verify Compare Programmer Status Device Mfr MEGAWIN Type C CMPC89L51A Adaptor None VO base addr LPT1 3BC l Change the Buff start Target Zone Byte Wide Device Start 00000000 Device End 00003BFF Buffer Start 00000000 Buffer End 00003BFF Buffer Checksum 0000 File Format Buffer Status PC Memory Buffer Size Bytes 1024K File Formats File Status A Intel HEX File start 00000000 v MOTOROLA S Record File end 0000FFFF Unused Bytes Don t Care Buff start 00003800 _ C 00 C FF OK Cancel This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 7Y MEGAWIN CC MAKE YOU WIN Megawin 8051 ISP ICP Programmer User Manual v5 30a Step 4 Click the Auto button to p
17. able the RC oscillator and select XTALosc as OSCin WDTCR_WP enabled If CPU runs in AP memory the register WDTCR will be software write protected except the bit CLRW If CPU runs in ISP memory the register WDTCR will be software write protected except the bits CLRW PS2 PS1 and PSO disabled The register WDTCR can be freely written by software HWENW accompanied with arguments HWWIDL and HWPS 2 0 enabled Automatically enable Watch dog Timer by the hardware when the MCU is powered up It means that In the WDTCR register the hardware will automatically 1 set ENW bit 2 load HWWIDL into WIDL bit and 3 load HWPS 2 0 into PS 2 0 bits For example If HWWIDL and HWPS 2 0 are programmed to be 1 and 5 respectively then WDTCR will be initialized to be Ox2D when MCU is powered up as shown below WDTCR Vatch Dog Timer Control Register tJ 36 5 4 3 2 1 0 WRF ENW CLRW WIDL feo i load HWWIDL HWPS 2 0 1 disabled No action on Watch dog Timer when the MCU is powered up 19 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved User Manual v5 30a ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer Cs MAKE YOU WIN 4 Use the ISP ICP Programmer 4 1_ Operation Modes There are three operation modes for the ISP ICP Programmer based on its connection conditions 4 1 1_Mode 1 Connected
18. alten 12 3 3 1 ISP Programmer GUI for MPC89 series 000 0 eect ce eete ee ee center ee eae eee eeeaaeeeeeeaaeeeeeeaeeeeeenaeeeeeeeaes 14 3 3 2 ISP Programmer GUI for MPC82 series and MG84 SeTieS eect e cece eect eeteeeeeenaeeeeeeteeeeeeeaaes 15 3 3 3 ICP Programmer GUI for MPC82G516 0000 eee eeeeeee ee teee eee eeeeeeeeeeseeeeeeeseneaeeeseeeaeeeseeaaeeeseenaes 16 3 3 4 ICP Programmer GUI for MG84FL516 000 0 eect e ee enne ninnan AKNAN ANANA NA EKEN KRAANA TANEN KRANA NAERAA 18 4 Use the ISP ICP Programme ccccccccsesseecceeeseseeeeseeeeseeeeeseeaseeeeensnasees 20 4 1 Operation Modes c ccecceececeeeeeeeeaeeaeeeaaeeaaaeaaaeaaaeaaaeaaaaaaaeaaaaeaaaeaaeaaaaesaaeaaeaeaeaeaeaeeaeeeeeeees 20 4 1 1 Mode 1 Connected between host and target system eeeeeee center entree ee ttneee eee eeeeeeeneeeereaa 20 4 1 2 Mode 2 Connected to host Only 00 0 cece eee ne ene eerie ee eee ie ee ee eeee estate eeteeeenieeeereaa 21 4 1 3 Mode 3 Connected to target system only 0 00 0 eect ee eeteee eee ene ee eee eee ee teeeee tees eetieeeeeeneeeerena 21 4 2 Actas an ISP Programmer cs cccastinasiss doi pnetivanthanaratteedernasacaraunanendcuedetuthasakirlonbeabecatba mmloretiesiaanete 22 4 2 1 Download Programming Data to the ISP Programmet cccceccceeeeeeeeteeeeeeeeneeeeeenneeeeeenneeeerene 22 4 2 2 Update the Target creencia eeateins EEE nite nied ATE 22 4 2 3 Dump the Contents in the Information Zone
19. between host and target system In this condition the ISP ICP Programmer works with the PC site AP being executed Three main buttons can be clicked 1 The Update Programmer button which is used to download the programming data including Part No user s application code and H W option into the non volatile storage of the Programmer 2 The Update Target button which further programs the new application code and H W option into the Target MCU in addition to those the Update Programmer button does 3 The Dump Target Info button which dumps the Target Information Data described in Section 5 The user should select correct Part No then click Load File to load the new application code and configure the H W options if have before clicking the Update Programmer or Update Target button The ISP key can also be used to start the ISP or ICP processing after the Update Programmer is completed Of course the user may load the MPJ file described in Section 4 4 to restore all the programming data to the GUI of the AP The following figures show the connection diagram 1 When the Programmer acts as an ISP Programmer don t power on the target system before connecting ok After connecting ok then the user s system can be powered on At this time the target MCU keeps running in the ISP memory for ISP processing When ISP is finished disconnect this Programmer from the target system to let
20. e intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 27 Megawin 8051 ISP ICP Programmer User Manual v5 30a MAKE YOU WIN For the ISP operation the Target MCU s P3 1 pin is used as the DTA pin The best case is that P3 1 dedicates itself to the ISP operation However P3 1 can has its normal function while not in ISP operation as long as the Z 6 Special Notes for ISP When the ISP Programmer is not connected the state on P3 1 must be logic 1 when the MCU is just It is because when the MCU is powered on and boots from ISP memory the MCU will check P3 1 s state to determine which action will be taken 1 keep running the ISP code or 2 re boot to run user s application code If logic 0 is read it means ISP operation is requested by the user and the MCU will take action 1 for further ISP processing If logic 1 is read the MCU will take action 2 During ISP processing P3 1 functions for bi directional data transfer It may output logic 1 or logic 0 and also the ISP Programmer may send it logic 1 or logic 0 So user follow the rule powered on The following figures show the restriction on typical applications of P3 1 if P3 1 also functions for DTA pin of ISP Figure 2 P3 1 is used to drive a PNP transistor Restriction the user should check if it is harmful to the device component which is connected to P3 1 R gt 750 8051MCU Figure 1
21. he maximum code size is 16K 1K 15K bytes which includes IAP data For MG84FL516 the maximum code size is 64K 1K 63K bytes which includes IAP data Where minus 1K or 1 5K for MPC82L E 54 means subtracting the space of ISP memory Step 3 Configure the wanted H W Option Only available for MPC89 series Step 4 Click Update Programmer Note In Step 2 you can load an MPJ file refer to Section 4 4 then Step 3 is not necessary 4 2 2 Update the Target How to update the target Step 1 3 The same as previous Step1 3 Step 4 Click Update Target 4 2 3 Dump the Contents in the Information Zone How to dump the 256 bytes of target Information Data Please refer to Section 5 Step 1 Select Programmer Type as an ISP Programmer Step 2 Click Dump Target Info 22 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer TOA User Manual v5 30a MAKE YOU WIN 4 3 Actas an ICP Programmer 4 3 1 Download Programming Data to the ICP Programmer How to download new programming data including application code amp H W options into the Programmer Step 1 Select Programmer Type as ICP Programmer and select the wanted MCU Part No Step 2 Click Load File both HEX format and BIN format are acceptable and the code size is based on its
22. ing Area H W Option Setting and Binary Code Buffer Yeo as wa Ss an Click the button Save MPJ to save all the programming information in an MPJ file as shown below HJ Megawin 051 ISP ICP Programmer 5 30 MEGAWIN MAKE YOU WIN om Programmer Type r MCU Part No Update HA Option Load File Update Target C ISP ICP MPC82G516 X C No Yes l Save MPJ Update Programmer Programming Area C AP CC IAP ISP C AP IAP C AP IAP ISP HAN Option Setting ISP memary T HWENW LVFWP HWBS2 Set OxFCOO OxFFFF 1KB v HAANIDL 7 ENLYRC ENLYRO O or 1 HWBS ENROSC IAP memory SB M WDSFWP cA Ox6A00 HWPS m V LOCK fer Binary Code Buffer Save As swen Q Tos a endam l Batch CPU Z v1 40 PE2 File Type T Megawin Project File MPJ Y DA Tools SP_Code_v5 00 BIN This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Cancel 24 ZY MEGAWIN Megawin 8051 ISP ICP Programmer a MAKE YOU WIN User Manual v5 30a 4 4 2 Load an MPJ File Click Load File and select Megawin Project Files MPJ to select the MPJ file you want When the MPJ file is opened all the relevant programming information will be retrieved and restored to the GUI of the AP The following figure
23. ing must be inhibited when chip has been locked Once the chip was locked the only valid operation is to program a new code with Yes of Update H W Option is selected Of course you can also enable the LOCK bit again See the following figure Select Yes to un lock previous locked state H Megawin 051 ISP ICP Programmer v5 30 Ve MEGAWIN A MAKE YOU WIN u p A rogrammer Type Update HAA Option Load File Upei Tec C ISP ICP MPC82G516 v C No Yes Programming Area _ Save MPJ Update Programmer C APHAP f AP IAP ISP Exit MCU Part No AP C IAP C ISP HAN Option Setting ISP memory DxFC00 0xFFFF 1KB Le Eo Set Ox 0x 1KB v HY WIOL ENLYRC or 1 AP memory f HWPS IAPLB 0x8000 0 7 MoN Set e0 Binary Code Buffer HWBS2 ENLVRO lv ENROSC WDSFWP a v D itmp 8051 ISP ICP Programmeritest Green k bin Size 7168 Bytes Checksum 0x1AC3 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 29 ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer CAT MAKE YOU WIN User Manual v5 30a Revision History Revision Description Date v5 10 Add auto upgrade function for the firmware of the Programmer s MCU 2007 06 23 1 Update the included standard ISP code ISP_Code_v5 00 BIN for MPC89 series amp MPC82 series Yoan ISP_Code_v5 00_MG84 BIN for MG84 series OOE
24. ming Area Save MPJ AP C IAP C ISP C AP HAP C AP IAP ISP ae HAA Option Setting ISP memory M HWENW M LVFWP eee ea HVWWIDL F Qor1 m IAP memory Set FF IAPLB NA TA Binary Code Buffer About the H W Option Setting The user should always configure proper H W Option before clicking Update Target or Update Programmer ISP memory Select the size you want IAP memory Select the lower boundary address you want For example if Ox5A00 is wanted then just key in 5A and the IAP memory lower boundary address will automatically displayed in the IAPLB box LVFWP enabled Enable LVFWP Low Voltage Flash Write Protection while IAP or ISP programming disabled Disable LVFWP ENLVRC enabled Enable hardware to generate low voltage reset when V30 pin voltage drops below 2 4V disabled Disable low voltage reset 16 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 ISP ICP Programmer User Manual v5 30a fy MEGAWIN enabled When power on MCU will boot from ISP memory if ISP memory is configured HWBS disabled MCU always boots from AP memory SB enabled Code dumped on a universal Writer or Programmer is scrambled for security but Device ID can be read normally It is strongly recommended that the LOCK should also be enabled when SB is enabled
25. nfiguration 00003BFF ISP Address Option bits I Lock 3800 3BFF v 2C00 3BFF SB 3400 3BFF MOVCL Buffer End 00000000 Buffer Start Buffer Checksum 0000 Buffer Size Bytes 1024K a Buffer Status PC Memory NONE ENST Enable HWBS Meo FZWDTCR Erase Cox Cancel Read Program This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer LAS waccrou User Manual v5 30a Step 2 Load the ISP code to the Programmer s buffer As the following figure select Load File to Programmer Buffer to load the ISP code into the Programmer s buffer iy WPGM51 EXE 5 53 LEX HOR Edit Device Operation Setup About Compare Save File from Programmer Buffer Load Programmer Configuration Save Programmer Configuration Enable Job Function Exit Adaptor None VO base addr LPT1 3BC Target Zone Byte Wide Device Start 00000000 Device End 00003BFF Buffer Start 00000000 Buffer End 00003BFF Buffer Checksum 0000 Buffer Status PC Memory Buffer Size Bytes 1024K Load File To Programmer Buffer This document information is the intellectual property of Megawin Technology Co Ltd 8 Megawin
26. pport both ISP and ICP 2 ISP interface always uses P3 1 as DTA pin while ICP interface uses dedicated SDA and SCL pins This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 ISP ICP Programmer User Manual v5 30a MEGAWIN Z CAT MAKE YOU WIN 2 Chip Configuration for ISP To use the ISP function the user should configure the target MCU by the following two steps Use a universal programmer or Megawin 8051 Writer to configure SP memory with 1K bytes or 1 5K bytes for Program the Megawin provided standard ISP code in the 3 Target ISP code folder into the ISP memory Note MPC82L E 54 and make HWBS or HWBS2 option enabled ISP_Code_v5 00 bin is for MPC89 82 series MCU and JSP_Code_v5 00_MG84 bin is for MG84 series Step1 Step2 MCU To let users easily use the ISP function the Megawin 8051 products will have the following factory setting 1 ISP memory is configured with 1K or 1 5K bytes and HWBS option is enabled Note 2 The Megawin provided standard SP code is pre programmed So the user has no need to do the chip configuration before using the ISP function Contact Megawin for detailed product information This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 I
27. q 7 MAKE YOU WIN User Manual v5 30a sY MEGAWIN Megawin 8051 ISP ICP Programmer T E r AL LO Megawin 8051 ISP ICP Programmer User Manual By Vincent Y C Yu This document information is the intellectual property of Megawin Technology Co Ltd 1 Megawin Technology Co Ltd 2007 All right reserved fy S Megawin 8051 ISP ICP Programmer 4 4 1 Save to an MPJ File User Manual v5 30a MAKE YOU WIN Contents igh gets U eit 1 prenpeenrernenerrrreecetet ener nnn E OE eer ere 3 1 1 Two in One Functions rccicicotcciarixtaiexcactinantbecatensaieuanetantasabzarncennndeaniadas ecaute meantteatendassecatenactaneecan 3 1 2 Comparison between ISP and ICP 200 00 ceeceeceeeseeeceee cece eee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 4 2 Chip Configuration for ISP cieissictectaarnrtescesectceiaveoiswracduccanennnscetedaniaetuceusaancnuaiay 5 2 1 Using the Megawin 8051 Writer for Chip Configuration esseeseseeeeeeseeeseererrssssrerrrrrresesrreeeene 6 2 2 Using the Hi Lo ALL 11 Programmer for Chip Configuration cccceeeeeeeesttieeeeeeeeeeeeeeee 7 3 Install the ISP ICP ProgrammMe cccccccssesceeeeeeesseeeeeeeeeeeeeeeeseaseeeeensanes 11 Ol instal Mies Driver eesriie anea i g dasa ia a a NE aa S Egana 11 92 NSA WV AP eeen E aa E a E EE EAE EAA A Yaad O AEA 11 3 3 Introduction to GUI of the PC site AP iccdscsisticiveccrseetanaitecciatnentsantiadebcecnttacacsiatunldbennddrentannti
28. rogram the ISP code and H W option into 8051 Bi WPGM51 EXE ISP24 BIN ey on Device MEGAWIN Type MPC89L51A Adaptor None O base addr LPT1 3BC Target Zone Byte Wide Device Start 00000000 Device End 00003 Buffer Start 00000000 Buffer End 00003 Buffer Checksum 0517 Buffer Status PC Memory Buffer Size Bytes 1 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Mtr MEGAWIN Type MPC89L51A Serial No OFF Counter ID check Erase Device Blank check Program Verify Config as 1 lt 1 1 Ble alg ale aly lt I C Normal Even C Odd Close Block Setup SIN setup If you use even or odd mode the buffer will automatically expand to 2 times the device size 10 ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer s Zz User Manual v5 30a MAKE YOU WIN 3 Install the ISP ICP Programmer 3 1 Install the Driver Plug the ISP ICP Programmer into the PC s USB port and do as follows when the monitor shows a prompt about new hardware found Select No not this time click Next Select Install from a list or specific location click Next Select Search for the best driver in these locations and Include this location in the search click Browse Locate the driver folder 2 PC site Driver click OK Click Next The driver installation starts Click
29. so force MCU to boot from ISP memory if ISP memory is configured disabled Where MCU boots from is determined by HWBS 18 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 ISP ICP Programmer User Manual v5 30a MEGAWIN MAKE YOU WIN fy CAST SB enabled Code dumped on a universal Writer or Programmer is scrambled for security but Device ID can be read normally It is strongly recommended that the LOCK should also be enabled when SB is enabled disabled Not scrambled LOCK enabled Code dumped amp Device ID read on a universal Writer or Programmer is locked to OxFF for security disabled Not locked LVFWP enabled Enable LVFWP Low Voltage Flash Write Protection while IAP or ISP programming disabled Disable LVFWP ENLVR1 enabled MCU to generate low voltage reset when VDD pin voltage drops below LVD1 disabled No low voltage reset ENLVR2 enabled MCU to generate low voltage reset when VDD pin voltage drops below LVD2 disabled No low voltage reset FAPD disabled Disable Flash Auto Power Down enabled Enable Flash Auto Power Down to save power while normal operating ENROSC enabled Enable built in RC oscillator 6MHz disabled Disable built in RC oscillator WDTRCO enabled Enable the RC oscillator and select RCosc as OSCin disabled Dis
30. ss than 30cm gt vec CZ MEGAWIN p3 1 2 exp ISP Programmer vss gt ee When the Programmer acts as an ICP Programmer Target System ICP Target MCU Interface Act as ICP Programmer YS 2s l ocp scr sch TVDD VDD l less than 30cm gt X C22 MEGAWIN ocD_ spa gt i anb ICP Programmer vss e2 21 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved User Manual v5 30a ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer Us MAKE YOU WIN 4 2 Actas an ISP Programmer 4 2 1 Download Programming Data to the ISP Programmer How to download new programming data including application code amp H W options into the Programmer Step 1 Select Programmer Type as ISP Programmer and select the wanted MCU Part No Step 2 Click Load File both HEX format and BIN format are acceptable and the code size is based on its binary format For MPC89L E 51 52 53 the maximum code size is 15K 1K 14K bytes which includes IAP data For MPC89L E 54 58 515 the maximum code size is 63K 1K 62K bytes which includes IAP data For MPC82L E 52 the maximum code size is 8K 1K 7K bytes which includes IAP data For MPC82L E 54 the maximum code size is 15 5K 1 5K 14K bytes which includes IAP data For MPC82G516 the maximum code size is 64K 1K 63K bytes which includes IAP data For MG84FL54 t
31. the ISP ICP Programmer works with the PC site AP being executed and only the Update Programmer button can be clicked User can download the programming data into the non volatile storage in the Programmer for later stand alone operation PC ISP ICP Programmer See MEGAWIN COMES _USBY enn ICP Programmer 4 1 3 Mode 3 Connected to target system only In this condition the Programmer works stand alone without the AP s intervention 1 When acting as an ISP Programmer connect the Programmer to the target system before the system is powered up Then power on the system and press the ISP key to start ISP processing The green and red LEDs show the processing result Now the user can disconnect the Programmer to let the system start running the new application code 2 When acting as an ICP Programmer connect the Programmer to the target system at any time regardless of the system s power state Then press the ISP key to start ICP processing while the system is powered on The green and red LEDs show the processing result And once the processing is finished the system will automatically run the new application code When the Programmer acts as an ISP Programmer Target System inter t TargetMmCU eres Act as ISP Programmer l i l I yp HE le
32. the ISP is not requested the target will directly re boot from the AP memory for normal running of the application code ICP Programmer When acting as an ICP Programmer it actually functions fully like a universal programmer except it adopts a serial interface with only four pins used for programming So there is no need to have a loader program embedded inside It provides all the programming functions which a universal programmer can support such as 1 erase the device 2 program the device 3 verify the device and 4 program all the device H W options including the security bits This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer CAST User Manual v5 30a MAKE YOU WIN 1 2 Comparison between ISP and ICP The following table shows the comparison between ISP and ICP and the parts that support them Compared Items ISP ICP MPC89L E 51 52 53 MPC89L E 54 58 515 MPC82L E 52 Note1 Parts that support ISP or ICP MPAA gd Si incre ne MPC82G516 ote MG84FL516 MG84FL54 MG84FL516 Erase Program and Verify Yes Yes Update target s H W option Partial or None Yes Interface GND DTAVcCN GND SDAVCC SCL Chip configuration before using ISP code pre programmed Not Need ISP or ICP amp HWBS enabled Note 1 So far only the MPC82G516 and MG84FL516 su
33. the target MCU run the new application code 2 When the Programmer acts as an ICP Programmer the target system can be powered on before or after the connecting And the target MCU will automatically run the new application code without need of disconnecting from the target system after ICP is finished The LEDs show the processing result If ISP ICP processing succeeds the green LED will turn on otherwise the red LED will turn on When the Programmer acts as an ISP Programmer Target System ISP PC Interf TargetMCU nierace Act as ISP Programmer j sY voh Yee 1 less than 30cm X mi vee liA MEGAWIN USB DTA I SDA gt P3 1 _ __ 1 enp ISP Programmer yag p END s j l a When the Programmer acts as an ICP Programmer Target System ICP PC Interf TargetMCU nierace Act as ICP Programmer ocD scrisa sY VoD mi less than 300m y ie lt 7 MEGAWIN USB OCD_SDA S 4____ ICP Programmer f I VSS f 20 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer Cs User Manual v5 30a MAKE YOU WIN 4 1 2 Mode 2 Connected to host only In this condition
34. tion on Watch dog Timer when the MCU is powered up This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 17 Zz User Manual v5 30a MAKE YOU WIN ZY gt MEGAWIN Megawin 8051 ISP ICP Programmer Cs 3 3 4 ICP Programmer GUI for MG84FL516 Select ICP Programmer Select MG84FL516 H Megawin 8051 ISP ICP Programmer 5 30 Programmer Type nr MCU Part No Update HAY Option Load File Update Target C ISP Mean CNo Yes Programming Area Save MPJ Update Programmer f AP Cc IAP C ISP C AP IAP C AP IAP ISP Exit ee HAW Option Setting SP memo i ry M HWENW HWBS ENLVR2 Set NA HVWWIDL f ee z ENRCO IAP memory oori I LOCK C WDTRCO Set FF IAPLB NA Oe 7 z Bo Mes Binary Code Buffer About the H W Option Setting The user should always configure proper H W Option before clicking Update Target or Update Programmer ISP memory Select the size you want IAP memory Select the lower boundary address you want For example if Ox5A00 is wanted then just key in 5A The IAP memory lower boundary address will automatically displayed in the IAPLB box HWBS enabled When power on MCU will boot from ISP memory if ISP memory is configured disabled MCU always boots from AP memory HWBS2 enabled In addition to power on reset the reset from RST pin will al

Download Pdf Manuals

image

Related Search

Related Contents

Drill Doctor XP2 Instructions / Assembly  34847_AE stand fan IM L-O.indd  COSTRUZIONI METALLICHE (STRUTTURALI)  User Manual - FTP Directory Listing  設置・施工手順書  User`s Manual - SuperDroid Robots  Instruction manual (PDF Format)  LINE BACK - 産業用鉛蓄電池|株式会社 GSユアサ  Nos Nouvelles    

Copyright © All rights reserved.
Failed to retrieve file