In the embedded system industry 8-bit microcontrollers are cheap, easy to use and solve most of the common automation problems. Nuvoton – a Taiwan-based semiconductor manufacturer, is one such company that has its own flavour of 8-bit and 32-bit micros. The 8-bit micros from Nuvoton are based on the popular 8051 architectures. In this tutorial, we will be discovering Nuvoton N76E003 1T-8051-based microcontroller.

Features of N76E003

Features

N76E003

Operating Voltage: 2.40-5.50 V

Flash: 18kB

SRAM: 1kB

EEPROM: Shared with flash up to 4kB

GPIO: 17+1 input only

ADC: 8 channel 12 bit,400kHz

Timmers: 3*16-bit + 1*16-bit for PWM

PWM: 6 channel 16-bit

SPI: 1 channel 8Mbps

I2C: 1 channel 400kHz

UART: 2 channel

HIRC: 16MHz(2% -40-105̊C)

LIRC: 10kHz

Idle current consumption: <5uA

Programming Interface: 2 wire

Package: TSSOP20/QFN20

It is a good idea to consider N76E003 as an advanced 8051 micro.

Hardware Tools

To get started only two things are needed – a prototyping/development board and a programmer called NuLink.  There are two options either you can buy the expensive official NuTiny SDK boards with built-in NULink programmer/debugger or you can buy the cheap unofficial onesas shown below.

Software Tools

To use Nuvoton 8-bit micros, we have to use either Keil Micro Vision or IAR Embedded Workbench. Both industry-standard tools but are not free. However, there are trial and evaluation versions of these tools.

The next stuffs that we will be needing are device datasheet, drivers, GUI for NuLink and sample codes with Nuvoton’s official header and source files.These are available here.

We will also be needing a pin map because there are few pins in N76E003 and they have multiple functions.

Nuvoton Files

No matter which compiler you use ultimately, you’ll need the following header (.h) and source files (.c) to get things done properly. These are available in Keil BSP and IAR BSP zip files.

Now what these files do? These files make up something like a standard peripheral library. They define registers and functions that are needed to simplify coding. These files replace tradition register-level access to meaningful codes. For instance, the Delay files dictate the software delay functions by using hardware timers. Likewise, SFR_Macro and Function_Define files define hardware-based functions and SFR uses.