Getting Started With Nuvoton N76E003 using Keil – Blinking an LED
As we can see in the schematic, the development board doesn’t have any kind of voltage regulator be it linear or LDO. However, it has a filter capacitor at the input. It also has a power LED and a reset button to reset the microcontroller unit. There is also a test LED available that can be configured using the code. Other than this, external crystal and required capacitors pad are also available without the components that can be very useful during further development where the external oscillator is required.
Nu-Link as N76E003 Programmer
For programming this microcontroller, we are using an unofficial Nu-link programmer which is a low cost alternative available in the online stores. However, for those who are willing to use the official Nu-link programmer, it is available for purchase as the Nu-Tiny SDK development board.
The programmer that we will use in our tutorial is shown above. It has Macro-USB connectivity, Offline programming button, and status indicator using 4 LEDs (ICE, ISP, RED, and GREEN).
IDE and Compiler for N76E003 Microcontroller
Getting the proper IDE and compiler is an important thing for any microcontroller programming. For the industry-leading microcontroller manufacturers, such as a microchip, nordic, STMicroelectronics – they all provide free c compiler and IDE. But for nuvoton programming, this is the one thing that lags. Since it is an 8051 based microcontroller, it can be programmed using Keil u vision with C51 compiler, or IAR Embedded workbench. But there is a catch. Both tools are great to do the job, but they are not free. There are trial and evaluation versions of these tools available and satisfy the job of programming nuvoton N76E003.
We have chosen Keil Micro Vision since the UI is easy to understand, good to configure and the workspace is really useful. It also comes with the C51 compiler that will compile the code for 8051 architecture.
However, to flash the program to the microcontroller, we will use the Nu-link Keil driver interface inside the Keil micro vision. This makes a one-click flash environment inside the Keil workspace. It is very useful to save time to flash the code into the chip. We will discuss more on this further.
N76E003 BSP Library
Other than the compiler and IDE, another important thing that is required for programming the N76E003 is the Board Support Package (BSP) Library. This is the Board support files for the microcontroller. This includes useful header files, peripheral libraries, SFR Macros, Hardware-level functions, etc.
So, these are my choices for Software and Hardware, let me know in the comment section if you think some other software would have been a better choice and why. I would like to explore other options as well.
Downloading Required Softwares
Now it is time to download the required files to create the environment ready for programming. Here is the list of important software that is required to be downloaded before installing anything. Just provide the required information on the Keil-C51 download page.
- Board Support Package for Keil – N76E003
- Keil Micro Vision – C51 (IDE with Compiler)
- Nu-Link Keil Driver
- Nu-Link ICP Programming Tool
Install the Keil u Vision
After downloading the Keil micro vision, install it in the default directory. It will look something similar like this-
Just press the next and let it install.
Install the Nu-link Keil Driver
Open the downloaded Nu-link Keil driver. After opening the Keil driver, select the language and press next. The screen will look similar to this with the default directory automatically being set.
Do not change the path and press next. In this section, it will ask about the default location of Keil Microvision that was installed in the previous step.
The default Keil installed location will be shown. Do not change it to anything else and press next. It will now install the Nu-Link driver for Keil. After installation is done, it will show a window like this-
Tick the optional choice – Install Nu-Link USB Driver 1.6. Do not forget to tick this. It is not an optional thing but an important driver for the programmer and it is needed.