11
கணினி மற்றும் தொழில்நுட்ப செய்திகள் - Computer & Technical Informations / Re: How to Program an 8051 Microcontroller Using Keil
« Last post by SiVa000000 on November 07, 2025, 11:21:41 AM »Uploading Code to Megawin Microcontroller
As we have already established there are multiple ways to upload the code to the MG82F6D17. Through OCD ICE or ISP Programmer or through UART. We will be showing two methods that include using OCD ICE and UART.
Using OCD ICE Adapter
First to uploading using OCD ICE, connect the OCD pins of the microcontroller to the OCD ICE adapter as shown below-

For MG82F6D17, we will only be using five lines including the VDD and GND. The CLK pin is not used in this case. To open the programmer UI, you can run ICPProgremmer.exe directly from the Database Installer folder from (EN)8051_OCD_ICE_For_Keil_v3.19.0.4.zip file or from the Keil installation directory (for me it was C:\Keil_v5\C51\INC\Megawin\ ICPProgrammer.exe). Select the Correct MCU Part Number

Click “Load File” and choose loading AP(Code) or IAP(Data). “Load File” can be clicked repeatedly to load different files. While loading IAP(Data), users have to key in Address. HEX and BIN data formats are supported for file loading.

Click “Insert ISP-Code” may choose to insert Megawin-provided ISP code or User-defined ISP code. If the ISP function is not needed, this step can be omitted.

H/W Option Setting let you configure ISP memory, IAP memory and fuse bits. Click on Update target to upload the firmware.

As we have already established there are multiple ways to upload the code to the MG82F6D17. Through OCD ICE or ISP Programmer or through UART. We will be showing two methods that include using OCD ICE and UART.
Using OCD ICE Adapter
First to uploading using OCD ICE, connect the OCD pins of the microcontroller to the OCD ICE adapter as shown below-

For MG82F6D17, we will only be using five lines including the VDD and GND. The CLK pin is not used in this case. To open the programmer UI, you can run ICPProgremmer.exe directly from the Database Installer folder from (EN)8051_OCD_ICE_For_Keil_v3.19.0.4.zip file or from the Keil installation directory (for me it was C:\Keil_v5\C51\INC\Megawin\ ICPProgrammer.exe). Select the Correct MCU Part Number

Click “Load File” and choose loading AP(Code) or IAP(Data). “Load File” can be clicked repeatedly to load different files. While loading IAP(Data), users have to key in Address. HEX and BIN data formats are supported for file loading.

Click “Insert ISP-Code” may choose to insert Megawin-provided ISP code or User-defined ISP code. If the ISP function is not needed, this step can be omitted.

H/W Option Setting let you configure ISP memory, IAP memory and fuse bits. Click on Update target to upload the firmware.


Recent Posts



















