Megawin MLink OCD8 User manual

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page1/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
OCD8_MLink
User Manual

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page2/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
Index
1. Introduction ............................................................................................................3
2. Install and Uninstall ................................................................................................4
3. Setting.....................................................................................................................5
4. Start Debug .............................................................................................................7
5. ICP8 Programmer....................................................................................................8
5.1. On-Line Mode Update.................................................................................................... 8
5.2. Off-Line Mode Update.................................................................................................. 10
5.3. Other............................................................................................................................. 11
6. Revision History ....................................................................................................12

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page3/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
1. Introduction
OCD8_MLink is an ICE development kit used by megawin in Keil C IDE. It supports
8bit chips of the megawin 8051 series; this kit provides OCD (On-Chip-Debug)
real-time debugging function. Users only need to reserve 6 pins for megawin.
OCD-ICE development tool (MLink) is fine.
In addition, the megawin ICP8_Programmer software is also provided in the package,
which can perform program code, program hardware option and offline mode
functions through MLink.
megawin OCD-ICE development tool (MLink)
Users only need to reserve 6 pins such as CLK, SCL/SWCLK, VCC, SDA/SWDIO, GND
and RST to connect to MLink.
PS. The VCC pin of MLink does not provide power to the user's system board, the
user needs to provide the power by himself!

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page4/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
2. Install and Uninstall
Execute "Setup.exe" in the package directory, and then press "Browse" to find the
directory of Keil C IDE (c:\Keil_v3 in the example in the figure, and then press "Install"
to install.
If the Keil C IDE directory has a package installed, you can click "Uninstall" to uninstall
it.

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page5/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
3. Setting
After the installation is complete, open the Keil C IDE project and enter the project
options (Options for Target…)
Step 1. Set Device
On the Device page, select the Database as "megawin MLink Device Database", and
then you can see the megawin chip part-no supported by OCD8 MLink below; select
the part-no to be debugged.
PS. Due to the Keil IDE problem, when selecting the chip model, the parameters may
not be brought out; it is recommended to select another chip model when selecting
the chip model, and then select the model to be debugged; and check the "Dialog
DLL" below in the next Step 2. "Whether it is "OCD8_MLink.DLL"!

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page6/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
Step 2. Set Debug
On the Debug page, select Use as "megawin MLink", and then tick the two options
"Load Application at Startup" and "Run to main()" below.
PS. Check if the "Dialog DLL" below is "OCD8_MLink.DLL"!

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page7/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
4. Start Debug
Press "Start/Stop Debug Session" to enter the debugging screen.
Registers can see the register value of the current chip.
Memory displays data according to the address settings, as follows:
C: Flash Data
I: iData
X: xData
S: EEPROM (if supported by this part-no)
For other settings and operations, please refer to the instructions of Keil C IDE

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page8/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
5. ICP8 Programmer
You can execute "ICP8_Programmer.exe" directly from the package directory, or by
Tools\megawin MLink ICP8 in Keil C IDE.
5.1. On-Line Mode Update
Step 1. Select Part No
Select a MCU Part No to be updated. If it is found to be incorrect, ID fail will be raised.
After selecting a different Part No, the Code Buffer will be cleared automatically.

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page9/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
Step 2. Load File
Load Bin or Hex file to buffer, after clicking “OK”, users need to choose whether to
place it in the AP area (read into the buffer at 0x00) or IAP (users can define any
location to read into the buffer). Clicking “OK” to see update results in Code Buffer.
Users can Load File repeatedly and overlay files on each other. If users execute Load
File repeatedly, the overlapping file will be overwritten by the last file read. If there is
a blank between the read position of the previous and last files, 0xFF will be filled in.
Check “Clear Buffer” in the “Select Insert Area” dialog. After clicking “OK”, all the
Code Buffer will be cleared and then read into the File.
Step 3. Insert ISP-code
If users need to use ISP function, please click “Insert ISP-code” to insert megawin's
standard ISP code, or choose their own developed ISP code. After clicking “OK”, the
AP will automatically place the ISP code in the address corresponding to the Code
Buffer and set the necessary H/W Options setting concurrently.
Step 4. H/W Options
Customers can set OR setting by themselves. For the description of the setting value,
please refer to the “Datasheet”.
Step 5. Update
Click "Update" to execute programming. Before programming, "Whole Chip Erase"
will be executed, including the hardware options before programming, and then the
code and hardware options set this time will be program.

OCD8_MLink
User Manual v1.2.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd page10/12
© Megawin Technology Co., Ltd. 2020 All rights reserved
5.2. Off-Line Mode Update
Step 1. Select Part No
Step 2. Load File
Step 3. Insert ISP-code
Step 4. H/W Options
Step 5. Off-Line Mode
Click “Off-Line Mode”to download setting (flash & H/W options setting) to MLink.
Furthermore, users can also set Max Counter and Serial Number. Max Counter can
control the number of times that MLink can perform off-line programming. Its
default value is 0 (meaning unlimited). After Serial Number Enable, 12 strings and 8
numbers can be set and be placed in any position of the Code Buffer. The Serial
Number function can even be implemented by Auto Increment Number.
Click “Read Info” to read the current Off-Line setting in MLink.
Table of contents
Popular Microcontroller manuals by other brands

AMS
AMS AS7261 Demo Kit user guide

Novatek
Novatek NT6861 manual

Espressif Systems
Espressif Systems ESP8266 SDK AT Instruction Set

Nuvoton
Nuvoton ISD61S00 ChipCorder Design guide

STMicrolectronics
STMicrolectronics ST7 Assembler Linker user manual

Texas Instruments
Texas Instruments Chipcon CC2420DK user manual

Texas Instruments
Texas Instruments TMS320F2837 D Series Workshop Guide and Lab Manual

CYPRES
CYPRES CY14NVSRAMKIT-001 user guide

Texas Instruments
Texas Instruments INA-DUAL-2AMP-EVM user guide

Espressif Systems
Espressif Systems ESP8266EX Programming guide

Abov
Abov AC33M8128L user manual

Laird
Laird BL654PA user guide





