🚀 Step-by-Step Working Procedure: First Project – Let’s Blink an LEDTo get started, let’s learn how to create a new project for the
MG82F6D17 microcontroller in
Keil µVision.
Step 1: Create a new folder for your project with your desired name.
Example:
MyFirstProjectStep 2: Inside this folder, create a subfolder named
Source.
Example structure:
MyFirstProject\
├── Source\
Step 3: Open the
MG82F6D17 Driver ZIP file and extract the following files from:
Code\Sample\Source
into your newly created
Source folder.
Download MG82F6D17 Driver: Click here to download the MG82F6D17 Driver
Now open the
Keil µVision IDE and select
New µVision Project from the Project menu.

Now open the previously created folder, name the project, and click
Save as shown below.

Select
MG82F6D17 from the list and click
OK.
Note: If it is not shown in the list, check that the database is installed properly or reinstall the database file.

Click on
No if prompted to copy the ‘STARTUP.A51’ file.

Now in the µVision window, under
Target → Source Group 1, right-click on
Source Group 1 and select
Add New Item to Group 'Source Group 1'.

In the new window, select
C File, name the file as
Main, select the
Source folder we created earlier, and click
Add.

Again, in the project window, right-click on
Source Group 1 and select
Add Existing Files to Group 'Source Group 1'.

Select the following files from
Source/Driver/Source folder and click
Add.

Right-click on
Target 1 and select
Options for Target 'Target 1' or press
ALT + F7 to open the options window.

In the options, window tick
Use On-chip ROM and
Use On-chip XRAM options

Go to the
Output tab and enable
Create Hex File option

In the
C51 tab selects Included paths and add the following folder location

I you want to use the
OCD ICE adapter for Debug and programming make the following changes too and press Ok to close the window.
