Microcontrollers: views : 16

Nuvoton basic steps to write code/programming using Keil IDE (Nuvoton beginner tutotial)

To write you first code for your Nuvoton microcontroller chip you need a laptop with Keil IE software installed on it. A hardware that burn your binary (hex code generated from keil IDE) to the microcontroller. Here i am using Nu-Link Plus burner to upload code to microcontroller. Software to download code can be directly from Keil or you can use Nuvoton Numicro ICP programming tool 3.10 8051 T1 series. Here i will tell you basic steps to start coding and downloading hex code to your Nuvoton microcontroller
Nuvoton basic steps to write code/programming using Keil IDE (Nuvoton beginner tutotial)
Nuvoton microcontroller programming tools


Start new project in keil IDE

Open Keil IDE software and at to menu,click on project > new uvision project as shown in image below. Next you will ask to name a project to create a file to your folder. Then select your target microcontroller group/series and click ok. Then you will ask to Copy "MS51_STARTUP.A51" to project folder and add file to project, click on "yes".

Start new project in keil IDE
new uvision project
Start new project in keil IDE
select microcontroller group or series


Add source code file to your project to start writing your code on it

Right click on source group 1 > add new item to source group 1 > select programming language (i am choosing c language here) and name your file anything but commonly named as main.c and click on "add". Then paste this code to the main.c file which is already created and open by you.

/* BLINKY.C - LED Flasher for the Keil MCBx51 Evaluation Board with 80C51 device*/
                  
#include <REG51F.H>

// When you have enabled the option Stop Program Execution with Serial
// Interrupt, the Monitor-51 uses the serial interrupt of the UART.
// It is therefore required to reserve the memory locations for the interrupt
// vector.  You can do this by adding one of the following code lines:

// char code reserve [3] _at_ 0x23;   // when using on-chip UART for communication
// char code reserve [3] _at_  0x3;   // when using off-chip UART for communication

void wait (void)  {                   /* wait function */
  ;                                   /* only to delay for LED flashes */
}

void main (void)  {
  unsigned int i;                     /* Delay var */
  unsigned char j;                    /* LED var */

  while (1) {                         /* Loop forever */
    for (j=0x01; j< 0x80; j<<=1)  {   /* Blink LED 0, 1, 2, 3, 4, 5, 6 */
      P1 = j;                         /* Output to LED Port */
      for (i = 0; i < 10000; i++)  {  /* Delay for 10000 Counts */
       wait ();                       /* call wait function */
      }
    }

    for (j=0x80; j> 0x01; j>>=1)  {   /* Blink LED 6, 5, 4, 3, 2, 1 */
      P1 = j;                         /* Output to LED Port */
      for (i = 0; i < 10000; i++)  {  /* Delay for 10000 Counts */
       wait ();                       /* call wait function */
      }
    }
  }
}
 

Add source code file to your project to start writing your code on it
add source code to keil project


Add package for Nuvoton microcontroller

You need to download Nuvoton Microcontroller package for keil IDE. This package is attached below, download it and unzip it get these folders:

  1. Document
  2. MS51DA9AE_MS51BA9AE
  3. MS51FB9AE_MS51XB9AE_MS51XB9BE
  4. MS51FC0AE_MS51XC0BE_MS51EB0AE_MS51EC0AE_MS51TC0AE_MS51PC0AE
  5. LICENSE.txt
  6. NOTICE.txt

Copy these to a new folder name as "library" in your project folder. Then go to the target settings and click of "A51" tab and add link to the folder that contain LibraryDeviceInclude and LibraryStdDriverinc. as show in image bellow

Add package for Nuvoton microcontroller
include library paths in keil for nuvoton
1) https-groomix.info-blogs-uploads-Microcontrollers-8281-8284-file-Download-Nuvoton-package-for-Keil-IDE-MS51BSP-KEIL-master.zip Download


Share this page with your friends
share via Whatsapp

Posted By :
Mahesh Nigam
(Scientist)
2023-05-01 01:51
See Author's other Published Topics

Airtel cheating ther customers by incomplete description of recharge pack of Big companies like Airtel, also cheating their customers by providing incomplete or confusing description of their recharge plans
Big companies like Airtel, also cheating their customers by providing incomplete or confusing description of their recharge plans
साहस और धैर्य का प्रतिक कारगिल विजय दिवस  of साहस और धैर्य का प्रतिक कारगिल विजय दिवस
साहस और धैर्य का प्रतिक कारगिल विजय दिवस
Vaisakhi  of Vaisakhi
Vaisakhi
3 मार्च - विश्व वन्यजीव दिवस of 3 मार्च - विश्व वन्यजीव दिवस
3 मार्च - विश्व वन्यजीव दिवस
1 मार्च- विश्व प्रशंसा दिवस of 1 मार्च- विश्व प्रशंसा दिवस
1 मार्च- विश्व प्रशंसा दिवस
1 मार्च- विश्व नागरिक सुरक्षा दिवस of 1 मार्च- विश्व नागरिक सुरक्षा दिवस
1 मार्च- विश्व नागरिक सुरक्षा दिवस
1 मार्च - शून्य भेदभाव दिवस of 1 march शून्य भेदभाव दिवस
1 march शून्य भेदभाव दिवस
करती रही of पूरा नही बस थोड़ा सा ही समझा होता ....
पूरा नही बस थोड़ा सा ही समझा होता ....
वैलेंटाइन of वैलेंटाइन डे मनाने के पीछे एक रोचक तथ्य व 7 से 14 तक वैलेंटाइन सेलिब्रेट करने की सूची
वैलेंटाइन डे मनाने के पीछे एक रोचक तथ्य व 7 से 14 तक वैलेंटाइन सेलिब्रेट करने की सूची
National Test Agency of UGC NET December 2023 results and download its subject wise cut-off
UGC NET December 2023 results and download its subject wise cut-off
परीक्षा पे चर्चा  of परीक्षा पे चर्चा युवाओं के लिए तनाव मुक्त माहौल बनाने के लिए प्रधान मंत्री नरेंद्र मोदी के नेतृत्व में बड़े आंदोलन - 'एग्जाम वॉरियर्स' का हिस्सा है।
परीक्षा पे चर्चा युवाओं के लिए तनाव मुक्त माहौल बनाने के लिए प्रधान मंत्री नरेंद्र मोदी के नेतृत्व में बड़े आंदोलन - 'एग्जाम वॉरियर्स' का हिस्सा है।

Peoples

Comments...

Write Your Comment

Related to Microcontrollers

Latest topics




More Categories
latest mobile phones ireps.gov.in irctc.co.in Working Principle Viral Discussion True Love quotes True Love Today is Celebrated For Tips for better life Tips and Hacks Technology News Teachers Day Quotes Study Materials Self Motivating Quotes Science Sad Lines (Sayeri) Romantic shayari quotes Robotics Reviews Results Questions_and_Answers Programming Problem Resolved PHP Codes PCB Design Online Works New Year Quotes Shayari Status My World My Responsibilities Motivational lines Mobile Issues Microcontrollers Lucknow Local News Latest Technology Iphone Homeopathy Historical place in India Heart Touching Love Quotes Health Good Night Quotes Good Morning Quotes GeM.gov.in GST portal Funny Lines (Sayeri) Friendship Quotes Food Recipes Exam Time Table Engineering Project Ideas Electronics Electronic and electrical project making ideas Electricals Educations Desh Bhakti Shayeri Criminal Love Cricket News Corona Updates Christmas Quotes Shayari Status CBSE Updates/Circulars Breaking News Breaking Heart Shayeri Break Up Lines (Sayeri) BirthDay Wishes Best kitchen Tips Best Valentine quotes Shayeri Beauty Hacks Basic Knowledges Attitude quotes shayari Attitude quotes Attitude quotes Assembly Election 2022
Go to top

Important Links

  • Contact Us
  • About Us
  • All copyright © 2020 are reserved by Groomix - designed by Groomix

    MORE

    Microcontrollers >
    latest mobile phones >
    ireps.gov.in >
    irctc.co.in >
    Working Principle >
    Viral Discussion >
    True Love quotes >
    True Love >
    Today is Celebrated For >
    Tips for better life >
    Tips and Hacks >
    Technology News >
    Teachers Day Quotes >
    Study Materials >
    Self Motivating Quotes >
    Science >
    Sad Lines (Sayeri) >
    Romantic shayari quotes >
    Robotics >
    Reviews >
    Results >
    Questions_and_Answers >
    Programming >
    Problem Resolved >
    PHP Codes >
    PCB Design >
    Online Works >
    New Year Quotes Shayari Status >
    My World My Responsibilities >
    Motivational lines >
    Mobile Issues >
    Lucknow Local News >
    Latest Technology >
    Iphone >
    Homeopathy >
    Historical place in India >
    Heart Touching Love Quotes >
    Health >
    Good Night Quotes >
    Good Morning Quotes >
    GeM.gov.in >
    GST portal >
    Funny Lines (Sayeri) >
    Friendship Quotes >
    Food Recipes >
    Exam Time Table >
    Engineering Project Ideas >
    Electronics >
    Electronic and electrical project making ideas >
    Electricals >
    Educations >
    Desh Bhakti Shayeri >
    Criminal Love >
    Cricket News >
    Corona Updates >
    Christmas Quotes Shayari Status >
    CBSE Updates/Circulars >
    Breaking News >
    Breaking Heart Shayeri >
    Break Up Lines (Sayeri) >
    BirthDay Wishes >
    Best kitchen Tips >
    Best Valentine quotes Shayeri >
    Beauty Hacks >
    Basic Knowledges >
    Attitude quotes shayari >
    Attitude quotes >
    Attitude quotes >
    Assembly Election 2022 >

    Peoples

    Latest Comments