Home
Megawin 8051 ISP
Contents
1. Note 1 So far only the MPC82G516 and MG84FL516 support 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 2012 All rights reserved 8051 ISP ICP Programmer User Manual v6 01 V 4 7 MEGAWIN CLA FZ MAKE You win 2 Chip Configuration for ISP To use the ISP function the user should configure the target MCU by use the Insert ISP code function in Megawin 8051 Writer or Megawin 8051 Writer U1 And set the ISP memory with 1K bytes or 1 5K bytes for MPC82L E 54 and make HWBS or HWBS2 option enabled Note 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 2 The Megawin provided standard ISP 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 2012 All rights reserved SYN MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 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
2. The only and default option for Update H W Option is Yes a Megawin 8051 ISP ICP Programmer MEGAWIN MAKE YOU WIN Programmer Type MCU Part No CISPR i ICP I Update HAN Option gt C i Ye mPce2cst 6 du i Egen Area AP C IAP oC ISP AP HAP C Whole chip Load File Update Target Save MPJ Update Programmer Exit bump taraet inte ih m HAN Option Setting memory ir HWENW FT LVFWP I HWBS2 IAP memory E Fu oat FF wrt Om s Falk E Binary Code Buffer IN This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 26 ZY Y MEGAWIN 8051 ISP ICP Programmer lt a MAKE YOU WIN User Manual v6 01 8 Special Notes for Auto Reload Code Enable this function the contents of the Binary Code Buffer will be reloaded according to the file path once the application is changed from inactive state to active state Megawin 8051 ISP ICP Programmer 6_01 MEGAWIN MAKE YOU WIN Programmer Type MCU Part No Fr RE A AT 89 Series z mPceaL s1 pute Target Programming Area Save MPJ Update Programmer G f p my i i Dump Target Info HA Options Setting ISP memory I FZWDTCR Set M AUX RAM HVWY IDL 0 or 1 M OSCDN IAP memory I KEEP IAP DATA Set jook v HWPS 0 7 I ENGT
3. il Programming Area Save meu Update Programmer i AP C IAP oC ISP AP HAP C Whole chip Exit Dur AEA J ip dia Hn HAN Option Setting w oo Ce tie ee an oom E en rc eer me e rer 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 0x5A00 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 SP memory is configured disabled MCU always boots from AP memory HWBS2 enabled In addition to power on reset the reset from RST pin will also force MCU to boot from ISP memory if ISP memory is configured disabled Where MCU boots from is determined by HWBS This document information is the intellectual property of Megawin Technology Co Ltd 15 Megawin Technology Co Ltd 2012 All rights reserved 8051 ISP ICP Programmer User Manual v6 01 Yd MEGAWIN MAKE YOU WIN enabled Code dumped on a universal Writer or Programmer is scrambled for security but Device ID can be read normally t is strongly recommended that the LOCK should also be enabled when SB is enabled SB disa
4. Load File Wo Yes Exit I ENROSC Mee 3516 MG84FL516 P AP IAP C Whole chip TF LVFWP I ENLYRC I HWBS SB M WDSFWP I Lock pi r r Programming Area C JAP F HWENW HWWIDL Fr ICP Programmer Type Update Target Save MPJ Update Programmer M HWBS2 I ENLVRO lAP memory AP HAY Option Setting ISP memory Set mm 7 0 or 1 Set FF IAPLB ny TR f m Binary Code Buffer This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 10 ZY Y MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 MAKE YOU WIN 3 3 1 ISP Programmer GUI for MPC89 series Select ISP Programmer Select MPC89 series MEGAWIN MAKE YOU WIN m Update HV Option C Yes Load File Update Target Save MPJ Update Programmer gt Programming Area HM PC89L E 52 CAP C JAF MPC89L E 53 OY 3 Exit Dump Target Info HN Option Setting ISP memory MPC82L E 54 MPC826516 DORRE MGB4FL54 STE MG84FL516 HWPS p Set FF IAPL on F mil MG87FL E 51 Ss MG87FL E 52 r 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 val
5. SB Ble Binary Code Buffer 00000000 02 TU ARE EE SSE 00000010 0B u 4u u su 8u 00000020 C7 er salle 00000030 75 00000040 75 00000050 OF 00000060 C3 00000070 46 00000080 E5 00000090 82 00000040 80 000000B0 50 Uv Auto Reload Code CM 23itest BIN Size 0x7 9C Checksum 0x52A8 This document information is the intellectual property of Megawin Technology Co Ltd 27 Megawin Technology Co Ltd 2012 All rights reserved 8051 ISP ICP Programmer User Manual v6 01 MAKE YOU WIN 7Y MEGAWIN Uis 9 About Information Right click on the Title bar of Megawin 8051 ISP ICP Programmer application and it will show up the About Dialog Bogrammer Lor F Restore i Move Size 4 _ Minimize Update HAN Option Fei maxintee Load File C No Yes Alt F4 Save MPJ Update Programmer SP Whole chip bites sell Exit Dump Target Info I FZWDTCR k Update Target TF HWENW HVYWIDL i 0 or 1 m zZz E amaaa IAP memory st FF IAPLB ona Megawin 8051 ISP ICP Programmer v5 41 Copyright C 2007 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 28 SYD MAKE YOU WIN Revision History MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 Da
6. and do as follows when the monitor shows a prompt about new hardware found 1 Select No not this time click Next 2 Select Install from a list or specific location click Next 3 Select Search for the best driver in these locations and Include this location in the search click Browse 4 Locate the driver folder 2 PC site Driver click OK 5 Click Next The driver installation starts 6 Click 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 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights re
7. 1 IAP memory El EH 7 PaaS HWPS Ej E FF NA 7 Set IAPLB MA 0 7 7 m Binary Code Buffer Al 2x Open Look in E Rind e ef EJ 82G516_isp mpj bad File name 82G 516_isp Q WorkiTest patterniRndil um 0x00E8 Files of type Megawin Project Files MPJ x Cancel Ma Pro SET Files MPJ Select MPJ EFEMi This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 22 8051 ISP ICP Programmer User Manual v6 01 MEGAWIN fy 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 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 b
8. 4 1 1 Mode 1 Connected between host and target system sssseeesssesresrrssrrssrrssrrssirssrrnssrnssrnssrrssnns 17 4 1 2 Mode 2 Connected to host only ceceeeeeeeeceeeeeceeeeeceaeeeeaeeceeeeeeeaaeeseneeseaeeesaaeeesaaeseeeeeseeeesaeeseaeees 18 4 1 3 Mode 3 Connected to target system only W W u u ddsseeeeereere reen tern kner tr en kr en renerne ee 18 4 2 Actasan ISP Programme 252245 eee an a a E a a AE ERE 19 4 2 1 Download Programming Data to the ISP Programmer ssessseeessesresrrssrrssrrssrnssrrsssrnssrnssrrssrnssrns 19 4 2 2 Update the Target 235 ar ie Ea re ek ere araia le Eee reddere Der eee aa iaaa an 19 4 2 3 Dump the Contents in the Information Zone cccceceeeeeeeeteeeeeeeeeeeee sents seaaeeeeeeeseeeetaeeseaeeseeeees 19 4 3 Act as an ICP Programmer ss ccccsacosecxsusccays tasdtcaniscoxdbctaninhenddavactinidadissdethadaiuseecetameticenaheaeczuavetes 20 Download Programming Data to the ICP Programmet ccccsceceeceeeeceeeeeaeeeeeeesecaeeesaeeeeneeteaees 20 4 3 2 Update the Target ea Een ie eds a aaa sal aae Naa E aaa aaa Aaaa 20 E PE A A T A E ace 21 PEA E E S 21 A A E A EE ar ER 22 E ENE E E E E E E SA 23 E TA E N S E EA 23 a EE E E A N A E TE 24 ee ee ee ee 25 26 soi teed aaa A T ETE aceereeenenece 2 2 4 4 2 Load an MPJ File 5 Information Zone 5 1 5 2 Dump the Information Data Special Notes for ISP Special Notes for ICP Special Notes for Auto Reload Code About Informa
9. 9 add the 8051 ISP Writer U2 tool description PLOSE V5 45 MG82FG216 MG82FG232 and MG82FG248 now have following option bit available 2009 03 16 for user to configure ENLVRC ENLVRO OSCDN ENROSC HWENW V5 50 Add support for MG87FL E 04 and MG82FL E 308 316 in the ISP Programmer 2009 09 01 1 Supported the Multi Load file function vas 2 Available in Windows 7 operation system OONN V5 60 Add support for MG82FL E 532 564 in the ISP Programmer 2010 03 26 V5 61 Special Release 2010 06 02 V5 70 Add support for MG82FE216 in the ISP Programmer 2010 07 05 V5 80 Add support for MG82FE632 664 in the ISP Programmer 2010 12 22 V5 81 Modify auto upgrade function for the firmware of the Programmer s MCU 2011 01 V5 82 The ISP ICP programmer supports Serial Number function when operate in Mode 3 2011 02 V5 83 Correct the IAP setting error on ICP programmer 2011 04 1 Add support for MG86FL E 104 in the ISP Programmer vaan 2 Remove the MG84FL516 in ISP and ICP Programmer 201103 V5 91 Support new function on U2 Writer 2012 05 V6 00 Add support for MG86FL E 508 in the ISP Programmer 2012 07 1 Add Auto Reload Code function kai 2 Add version information on the title of the main window 20 1209 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 29
10. Co Ltd 2012 All rights reserved 8051 ISP ICP Programmer User Manual v6 01 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 V LAS MAKE YOU WIN 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 O 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 user follow the rule data transfer It may output logic 1 or logic 0 and also the ISP Programmer may send it logic 1 or logic 0 So the user should check if it is harmful to the device component which is connected to P3 1 P3 1 is used to drive a PNP transistor powered on Restriction R gt 750 The following figures show the restriction on typical applications of P3 1 if P3 1 also functions for DTA pin of ISP Figure 2 8051MCU Figure 1 P3 1 is used to drive an NPN transistor Restriction R gt 1K R_pull_up 10K RS232 Transc
11. HWWIDL into WIDL bit and 2 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 Vvatch Dog Timer Control Register i i ee ee ee Ee load 6 feai ins 1 HWPS 2 0 ii JIN 7 HWWIDL disabled No action on Watch dog Timer when the MCU is powered up 16 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved SYN MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 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 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 us
12. ISP Writer U2 see the following picture can be treated as an ISP Programmer with Target System It is used for mass production Cascade to Gang4 or Gang8 mode to update the MCU chip application code before mount to the end product Picture of the ISP Writer U2 Green LED Red LED USB LED Cascade IN Cascade Out gt f2 a 2 won Plo w eta f USB Plug G ec pails 2z v Socket for Power Switch Target HCI JE I ISP key 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 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 func
13. Programmer Uy MAKE YOU WIN User Manual v6 01 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 Programmer Type MCU Part No Control of Update H W Option Programming Area H W Option Setting and Binary Code Buffer 5 6 wm re VB TH NY WH Click the button Save MPJ to save all the programming information in an MPJ file as shown below ETS MEGAWIN MAKE YOU WIN r Programmer Type r MCU Part No Update HAN Option 7 Ea Load File Update Target C ISP ICP mPce2G516 7 C No Yes J gt Programming Area AP CIP oC ISP AP HAP Whole chip Update Programmer Bump harget Info
14. 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 19 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved SVT 8051 ISP ICP Programmer LAST MEGAWIN User aaa v6 01 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 CP 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 Step 3 Configure the wanted H W Option Step 4 Click Update Programmer Step 5 Set the Maximum number of devices programmed zero for no limits 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 2012 All rights reserved 20 Y MEGAWIN 8051 ISP ICP
15. 01 gt 2006 01 01 Information Data OOO00f780h 4 F W Version 0000 790n gt 1 00 0000 7A40h 0000 7b0n eee 0000 7c0h Pos 0000 740h MCU Type O000f7eO0h Megawin ooo0 7f 0h MPC89L54 58 515 Address ASCII type Text type This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 23 User Manual v6 01 8051 ISP ICP Programmer V 27 3 MEGAWIN HLA Make You win 5 2 Dump the Information Data To view the Information Data in the Information Zone click Dump Target Info Now the Information Data read by the ISP Programmer will be displayed on the Binary Code Buffer as shown below ER EH Megawin 8051 ISP ICP Programmer MEGAWIN MAKE YOU WIN Update HAN Option Load File Update Target Update Programmer Programmer Type MCU Part No SP ICP eces 7 Ng Yes Programming Area Save MPJ Er va SP APHAP Wwhale ch C Af C JAP CIGR APHAR C Wwhale chip Exit Dump Target Info F HWENW IT FAWDTCR 7 M OSCDN ja T ENG is r r r HAN Option Setting ISP memory 2 NA sat ae HWWIDL f 0 or 1 HWPS m 7 IAP memoy set FF IAPLB n 0 7 Binary Code Buffer This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology
16. SC enabled Enable built in RC oscillator disabled Disable built in RC oscillator 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 WDSFWP 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 W DL bit and If HWWIDL and HWPS 2 0 are programmed to be 1 and 5 respectively then WDTCR will be 1 2 3 load HWPS 2 0 into PS 2 0 bits For example initialized to be 0x2D when MCU is powered up as shown below BE ee TE EO CLRW WIDL fioa VWatch Dog Timer Control Register 5 fiosa HWPS 2 0 ES fea 1 HWWIDL disabled No action on Watch dog Timer when the MCU is powered up ir JIN 7 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 14 SY MEGAWIN 8051 ISP ICP Programmer MAKE YOU WIN User Manual v6 01 3 3 4 ICP Programmer GUI for MG84FL516 Select ICP Programmer Select MG84FL516 Megawin 8051 ISP ICP Programmer IEGAWI 7 JAKE YOU WIN Programmer Type E r Update HAN Option aanerer e Ske UN Load File Update Target C ISP 6 MGS4FL516 dll ONG ves ih
17. SYN MEGAWIN 8051 ISP ICP Programmer TAS MAKE YOU WIN User Manual v6 01 Megawin 8051 ISP ICP Programmer amp 8051 ISP Writer U2 User Manual SYD 8051 ISP ICP Programmer User Manual v6 01 4 3 1 4 4 The Megawin Project File MPJ File 4 4 1 Save to an MPJ File MAKE YOU WIN Contents Igiigets 0 e s g SEE E E recent rec omer en 3 1 1 Two In One FUNCOMS seriusna e rene ates E E re E KE beder 4 1 2 Comparison between ISP and ICP W W u u sssseeeerrr eee reen 6 2 Chip Configuration for ISP sezcvccsccecaceannuterereedevesanettcatevese aetna aden eeeceeee 7 3 Install the ISP ICP Programmer ssccssisicnnnotssannnnneensarnmcccashsinxxebenbennneneedenxnnnncccsiihe 8 3A Install Drivenes a ated dec eee eee Dace eee 8 3 2 Install the AP erarnan aA lence shales acai EEE NAE Aa N Aa aSa a 8 3 3 Introduction to GUI of the PC site AP W W u u u u dsssseeereeer erne 9 3 3 1 ISP Programmer GUI for MPC89 series W W Wu u u u dsseeerereer renere tre kreere kreere 11 3 3 2 ISP Programmer GUI for MPC82 MG84 MG87 SEVICS c cccceeeeeeeeeeeeeeceaeeeeaaeceeeeeetaeeeeaeeseeeeess 12 3 3 3 ICP Programmer GUI for MPC82G516 W W u u u usssseeeeer ennen reen kreere kreere renerne 13 3 3 4 ICP Programmer GUI for MG84FL516 00 eee cee ee cece nerne kreere nr en renerne 15 4 Use the ISP ICP Programmer eaceiaviecnccatireicsansinnncoxecssnmmnactinainnaacenwoaceenccues 17 4 1 Operation ModS 255 Er E E N E eon ERE A R EES 17
18. an 30cm vec CZ MEGA WIN ues p3 17 i ISP Programmer vss gt l i EEN When the Programmer acts as an ICP Programmer Target System ICP PC TargetMCU mtertace Act as ICP Programmer I OCD SCL Sch jj voDt i i less than 30cm gt wee CO MEGA WIN une ocp_sDA t exp ICP Programmer I VOSS HT j I 17 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved SYN MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 MAKE YOU WIN 4 1 2 Mode 2 Connected to host only In this condition 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 e C MEGAWIN USBy Er ICP Programmer GND 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 a
19. bled 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 enabled Enable LVFWP Low Voltage Flash Write Protection while IAP or ISP programming LVFWP disabled Disable LVEWP 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 enabled Enable Flash Auto Power Down to save power while normal operating FAPD disabled Disable Flash Auto Power Down 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 Disable the RC oscillator and select XTALosc as OSCin enabled If CPU runs in AP memory the register WDTCR will be software write protected except the bit CLRW WDTCR_WP 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
20. cluding 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 the 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 For MG87L E 51 52 the maximum code size is 8K 1K 7K 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 Step 5 Set the Maximum number of devices programmed zero for no limits 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
21. eiver Figure 4 P3 1 is used as it original TXD function No restriction 8051MCU UART s TXD Figure 3 P3 1 is used to drive an L Restriction R gt 510 if vCC 5 0V RE R gt 330 if VCC 3 3V Figure 6 P3 1 is used to drive a high impedance input No restriction 8051MCU 8051MCU 25 Figure 5 Restriction R_pull_low gt 300K P3 1 is pulled low 8051MCU This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved 2Y MEGAWIN ir MAKE YOU WIN 8051 ISP ICP Programmer User Manual v6 01 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 programming must be inhibited when chip has been locked The only and default option for Update H W Option is Yes
22. elow For MPC89L E 51 52 53 it is located at 0x3700 0x37FF 54 58 515 it is located at 0xF700 gt 0xF7FF For MPC89L E 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 MG84FL54 it is located at 0x3BO0 0x3BFF For MG84FL516 it is located at O0xFBOO OxFBFF For MG87FL E 51 52 it is located at 0x1BO0 0x1BFF An example of the Information zone of MPC89L E 54 58 515 0000 640h C9 C8 C7 C6 C5 C4 C3 C2 Ci CO BF BE BD BC BB B 0000 650h B9 BS B7 B6 BS B4 B3 B2 Bi BO AF AE AD AC AB AA 0000 660h AQ AS A A6 AS A4 A3 AZ Al AO OF 9E 9D 9C 9B 94 0000 670h 99 98 97 96 95 94 93 92 91 90 BF BE 8D BC 8B BA 0000 680h 89 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 74 0000 690h 79 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 64 0000 640h 69 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B S User can use any HEX editor 0000 6b0h 59 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4a to edit his Infomalon Data 0000 6cOh 49 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 34 0000 6d0h 39 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2a 0000 6e0h 29 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1a oooof 6fOh 19 18 17 16 15 14 13 12 11 10 OF OE OD OC OB OA o000f700h OO000f710h Information 0000 720h 1 Product Type 0000 730n gt URC_RS 0000 740n 2 Mfg Plant 0000f750h gt Gumi Korea 0000 760n 3 Mfg Date 0000 77
23. er 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 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 Target MCU Interface Act as ISP Programmer l l i VDD b o less th
24. g kir MG87FL E 51 0 7 i MG87FL E 52 m Binary Code Buffer rs m About the H W Option Setting For these 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 2012 All rights reserved ZY Y MEGAWIN 8051 ISP ICP Programmer User Manual v6 01 MAKE YOU WIN 3 3 3 ICP Programmer GUI for MPC82G516 Select ICP Pr grammer Select MPC82G516 Megawin 8051 ISP ICP Programmer Aa vi Programmer i ir Update HAN Option Load File Update Target C ISP fires C No Yes i Save MPJ Update Programmer Programming Area AP C IAP C ISP C AP AP Whole chip Exit bimp heraget ita HAN Option Setting ISP memory O HWENW TT LVFWP I HWBS52 Set NA x I ENLYRC TT ENLVRO ENDE i T Hwes I ENROSC 1AP memary SB HF WDSFWP j HWPS p F Lock E F 7 st F IAPLB NA 1 OT i Bonen z 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 0x5A00 is wanted then just key in 5A and the IAP memory lower boundary address wi
25. gt HAY Option Setting ISP memory TF HWENW I HWBS2 Set 0xFC00 0xFFFF 1KB ENIDE ENLYRC I ENLYRO gor Mawes I ENROSC i I 38 TT WDSFWP HWPS IV LOCK M set 54 IAPLB 0x5400 m Binary Code Buffer IAP memory 0 7 eA M O8CDN ia Save in And 4e c Ea File name 82G516_ispl Save as type Megawin Project File MPJ M Cancel ZA urm 0x00E8 Q WvorkiTest patterniRndil This document information is the intellectual property of Megawin Technology Co Ltd 21 Megawin Technology Co Ltd 2012 All rights reserved SYN 8051 ISP ICP Programmer CAT MEGAWIN User Aaa v6 01 MAKE YOU WIN 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 shows how to open an MPJ file Megawin 8051 ISP ICP Programmer J MEGAWIN MAKE YOU WIN on r Programmer Type MCU Part No Update HAN Option 7 Load File Update Target ISP C ICP MPC89L6 51 7 C No fe Yes say MP Update Programmer Programming Area C AP C JAP C ISP G APHAP Whole ch MS ALS Exit Dump Target Info HAN Option Setting ISP memo y I HWENW M FZWDTCR P Set ns HAWIDL M 0 or
26. ll 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 13 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved User Manual v6 01 8051 ISP ICP Programmer Y MEGAWIN MAKE YOU WIN enabled When power on MCU will boot from ISP memory if SP 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 t is strongly recommended that the LOCK should also be enabled when SB is enabled 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 enabled Like HWBS the reset from RST pin can also cause MCU to boot from ISP memory disabled Normal gain 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 ENRO
27. nd 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 ISP Target MCU Inte aor Act as ISP Programmer VDD m less than 30cm gt vec CLD MEGA WIN Cc SDA P3 1 ea l enn ISP Programmer Noa eee f When the Programmer acts as an ICP Programmer Target System ICP Target MCU celica Act as ICP Programmer ocp_scLL Sch HE VDD i less than 30cm eee CLD MEGA WIN gt SDA OCD_SDA 4 enn ICP Programmer yss 1s F aS SS 18 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved fy 8051 ISP ICP Programmer MEGA WIN User ea v6 01 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 in
28. served VD 8051 ISP ICP Programmer BLAST MEGAWIN User Hae v6 01 MAKE YOU WIN 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 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 CLP MEGAWIN Programmer Type MCU PartNo Update HAW Option Load File Update Target ISP C ICP mPcegLieyst CHo erves MPC89L E 51 Programming Area l Save MPJ Update Programmer CAR CIRR C nae CcHip i up Exit Dump Target Info HAW Option Setting ISP mema di I FZWDTCR ie Set NA HWWIDL Fr z Sah 0 or 1 IAP memory MG84FL54 E E Fr MG84FL516 HWPS 5 is in FF i Set bask MG87FL E 51 0 7 I El E HMGS7FL E 52 i r Binary Code Buffer This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved LA Make You win 8051 ISP ICP Programmer User Manual v6 01 MEGAWIN i bimp redenta Select Programmer Type as ICP Items for ICP Update HAN Option toaarne
29. te 2007 06 23 2007 07 17 Description 2007 10 05 2008 01 24 2008 07 09 Revision v5 10 Add auto upgrade function for the firmware of the Programmer s MCU 1 Update the included standard ISP code ISP_Code_v5 00 BIN for MPC89 series amp MPC82 series 2008 11 13 v5 20 v5 30 ISP Code v5 00 MG84 BIN for MG84 series 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 2 For ICP Programmer the user can select whether to update the hardware option 1 Fix the AP bug Wrong display in the H W Option area when MPC89E58 MPJ is 2009 01 06 or not loaded v5 30a 2 Modify description for HWENW Section 3 3 3 amp 3 3 4 3 Correct description for ENLVRO from 3 8V to 3 7V Section 3 3 3 4 Update Section 2 1 v5 40 Add support for MG87FL51 52 and MG87FE51 52 in the ISP Programmer 1 In the Programming Area the radio button name of AP IAP ISP changes to V5 41 Whole chip i 2 When operate Update Target and Update Programmer functions the only default option of Update H W Option is Yes V5 42 Add support for MG87FL E 2051 4051 6051 in the ISP Programmer V5 43 Add support for MG82FG216 232 248 in the ISP Programmer 2009 02 04 1 Add the Set Max count variable in Update Programmer function V5 44
30. tion 6 7 8 9 Revision History Definition of the Information Zone This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved SVN 8051 ISP ICP Programmer AS MEGAWIN User bek v6 01 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 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 ICP Interface ISP Interface USB LED USB Plug 4 SCL 4 N A 3 VCC 3 VEE 2 SDA 2 DTA 1 GND 1 GND This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved sY MEGAWIN 8051 ISP ICP Programmer T 7 MAKE YOU WIN User Manual v6 01 The tool of Megawin 8051
31. tions 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 This document information is the intellectual property of Megawin Technology Co Ltd 4 Megawin Technology Co Ltd 2012 All rights reserved SYN MEGAWIN 8051 ISP ICP Programmer LAS User Manual v6 01 MAKE YOU WIN 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 2012 All rights reserved fy 8051 ISP ICP Programmer MEGA WIN User aa v6 01 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 ICP ISP MPC89L E 51 52 53 MPC89L E 54 58 515 Compared Items MPC82L E 52 ae MPC82L E 54 MPC82G516 Parts that support ISP or ICP MPC82G516 Yete7 MG84FL516 MG84FL54 MG84FL516 0167 MG87FL E 51 52 Erase Program and Verify Yes Yes Update target s H W option Partial or None Yes Interface GND DTA VGC Note2 GND SDA VCC SCL Yete2 Chip configuration before using ISP code pre programmed ISP or ICP amp HWBS enabled Nel Need
32. ue 0x00 only by power on reset For example if WOTCR 0x2D it still keeps at Ox2D 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 OSCDN enabled If the XTAL frequency is less than 25MHz this option can be enabled to reduce the internal oscillating gain for lower EMI disabled Normal oscillating gain ENGT enabled MCU runs at 6T mode 6 clocks per machine cycle double speed compared to a traditional 8051 disabled MCU runs at 12T mode 12 clocks per machine cycle like a traditional 8051 11 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2012 All rights reserved YA 8051 ISP ICP Programmer sy MEGAWIN User A anaes v6 01 MAKE YOU WIN 3 3 2 ISP Programmer GUI for MPC82 MG84 MG87 series Select ISP Programmer Select MPC82 MG84 MG87 series 8051 ISP ICP Programmer MEGAWIN MAKE YOU WIN ir Update HAN Option Load File Update Target X fe ho C Yes Save MPJ Update Programmer g Dump Target Info AR VW hole chipr LL Exit ae tain ia HAN Option Setting r ISP memory cp sve 82L E 52 HWENW a et NA MPC82L E 54 MPC82G516 ee T 0 or r r IAP memory MG84FL54 A MG84FL516 HWPS FF AP F aa
Download Pdf Manuals
Related Search
Related Contents
LCD Display Monitor User's Guide TD-Z421 TD-Z471 CZ305 manual_ENG.indd SOYO Computer Hardware Super 7 Mainboard User's Manual Service Manual 安全作業のために Installation and operating instructions EN Structure des schémas de parcours du courant Copyright © All rights reserved.
Failed to retrieve file