Nuvoton NuMaker Series User Manual

Nuvoton NuMaker Series User Manual

Evaluation board for numicro 1t 8051 series
Table of Contents

Advertisement

Quick Links

NuMaker-MG51FC
NuMicro
®
Family
1T 8051-based Microcontroller
NuMaker-MG51FC
User Manual
®
Evaluation Board for NuMicro
1T 8051 Series
The information described in this document is the exclusive intellectual property of
Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton.
Nuvoton is providing this document only for reference purposes of NuMicro microcontroller and
microprocessor based system design. Nuvoton assumes no responsibility for errors or omissions.
All data and specifications are subject to change without notice.
For additional information or questions, please contact: Nuvoton Technology Corporation.
www.nuvoton.com
Jul. 10, 2023
Page 1 of 41
Rev 1.00

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NuMaker Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Nuvoton NuMaker Series

  • Page 1 The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton. Nuvoton is providing this document only for reference purposes of NuMicro microcontroller and microprocessor based system design. Nuvoton assumes no responsibility for errors or omissions.
  • Page 2: Table Of Contents

    3.9.2 Status LEDs ........................24 4 QUICK START ....................25 4.1 Toolchains Supporting ....................25 4.2 Nuvoton Nu-Link Driver Installation ................25 4.3 BSP Firmware Download ................... 28 4.4 Hardware Setup ......................28 4.5 Find the Example Project ................... 30 4.6 Execute the Project under Toolchains ..............
  • Page 3 NuMaker-MG51FC 5.2 NuMaker-MG51FC Schematics ................37 5.3 Extension Connectors ....................38 5.4 PCB Placement ......................39 6 REVISION HISTORY ..................40 Jul. 10, 2023 Page 3 of 41 Rev 1.00...
  • Page 4 NuMaker-MG51FC List of Figures Figure 1-1 NuMaker-MG51FC Evaluation Board ................6 Figure 3-1 Front View of NuMaker-MG51FC ................... 8 Figure 3-2 Rear View of NuMaker-MG51FC ..................9 Figure 3-3 MG51FC Extension Connectors ................... 10 Figure 3-4 Arduino UNO Compatible Extension Connectors ............12 Figure 3-5 External Power Supply Sources on Nu-Link2-Me ............
  • Page 5 NuMaker-MG51FC List of Tables Table 3-1 Extension Connectors ....................10 Table 3-2 MG51FC Full-pin Extension Connectors and GPIO Function List ........ 11 Table 3-3 Arduino UNO Extension Connectors and MG51FC9AE Mapping GPIO List ....13 Table 3-4 Vin Power Source ......................14 Table 3-5 5 V Power Sources ......................
  • Page 6: Overview

    NuMaker-MG51FC OVERVIEW The NuMaker-MG51FC is an evaluation board for Nuvoton NuMicro MG51FC9AE microcontrollers. The NuMaker-MG51FC consists of two parts: an MG51FC target board and an on-board Nu-Link2-Me debugger and programmer. The NuMaker-MG51FC is designed for project evaluation, prototype development and validation with power consumption monitoring function. The NuMaker-MG51FC board is suitable for a wide range of applications such as home appliances, LED lighting controls, motor controls or Industrial automation.
  • Page 7: Features

    NuMaker-MG51FC FEATURES  NuMicro MG51FC9AE used as main microcontroller  MG51FC9AE full pins extension connectors  Arduino UNO compatible extension connectors  Ammeter connector for measuring the microcontroller’s power consumption  Flexible board power supply: External V power connector – Arduino UNO compatible extension connector Vin –...
  • Page 8: Hardware Configuration

    NuMaker-MG51FC HARDWARE CONFIGURATION Front View Arduino UNO Compatible Extension Connectors Switch Reset Button External V Connector Ammeter VCOM Switch ICE USB Connector Power LED ICE Chip: M48SSIDAE USB Power Connector ICE Status LED P0.5 LED Off-line Program Button External V Connector Nu-Link2-Me MG51FC Target Board...
  • Page 9: Rear View

    NuMaker-MG51FC Rear View Figure 3-2 shows the main components and connectors from the rear side of NuMaker-MG51FC. The following lists components and connectors from the rear view:  Nu-Link2-Me MCUVCC Power Switch (ICEJPR1) – ICEVCC Power Switch (ICEJPR2) – ICEVCC Power Switch MCUVCC Power Switch Figure 3-2 Rear View of NuMaker-MG51FC...
  • Page 10: Extension Connectors

    NuMaker-MG51FC Extension Connectors Table 3-1 presents the extension connectors. Connector Description JP3 and JP4 Full pins extension connectors on the NuMaker-MG51FC. NU1, NU2, NU3 and Arduino UNO compatible pins on the NuMaker-MG51FC. Table 3-1 Extension Connectors 3.3.1 Pin Assignment for Extension Connectors The NuMaker-MG51FC provides the MG51FC9AE onboard and extension connectors (JP3 and JP4).
  • Page 11: Table 3-2 Mg51Fc Full-Pin Extension Connectors And Gpio Function List

    NuMaker-MG51FC MG51FC9AE Header Pin No. Function JP3.1 P0.5/PWM0_CH2/IC6/T0/ADC_CH4 JP3.2 P0.6/UART0_TXD/ADC_CH3/ JP3.3 P0.7/UART0_RXD/ADC_CH2/ JP3.4 P2.0/nRESET JP3.5 P3.0ADC_CH1/OSCIN/PWM0_CH3/SPI0_MOSI/IC3/T1 JP3.6 P1.7/ADC_CH0/ JP3.7 JP3.8 P1.6/ICE_DAT/UART1_TXD/[I2C0_SDA] JP3.9 JP3.10 P1.5/PWM0_CH5/IC7/SPI0_SS JP5.1 P1.4/PWM0_CH1/I2C0_SDA/PWM0_BRAKE JP5.2 P1.3/I2C0_SCL/[STADC] JP5.3 P1.2/PWM0_CH0/IC0/ JP5.4 P1.1/PWM0_CH1/IC1/ADC_CH7/CLKO JP5.5 P1.0/PWM0_CH2/IC2/SPI0_CLK JP5.6 P0.0/PWM0_CH3/SPI0_MOSI/IC3/T1 JP5.7 P0.1/PWM0_CH4/IC4/SPI0_MISO JP5.8 P0.2/ICE_CLK/UART1_RXD/[I2C0_SCL] JP5.9 P0.3/ADC_CH6/PWM0_CH5/IC5 JP5.10...
  • Page 12: Arduino Uno Compatible Extension Connectors

    NuMaker-MG51FC 3.3.2 Arduino UNO Compatible Extension Connectors Figure 3-4 shows the Arduino UNO compatible extension connectors. UART0_RXD P0.7 UART0_TXD P0.6 PWM0_CH5 P0.3 PWM0_CH4 P0.4 PWM0_CH3 P1.2 SPI0_SS P1.5 SPI0_MOSI P0.0 SPI0_MISO P0.1 SPI0_CLK P1.0 VREF I2C0_SDA P1.4 I2C0_SCL P1.3 Figure 3-4 Arduino UNO Compatible Extension Connectors Jul.
  • Page 13: Table 3-3 Arduino Uno Extension Connectors And Mg51Fc9Ae Mapping Gpio List

    NuMaker-MG51FC NuMaker-MG51FC NuMaker-MG51FC Header Header Compatible to GPIO Pin of Compatible to GPIO Pin of Arduino UNO MG51FC Arduino UNO NUC240V NU3.1 P0.7 NU2.6 NU3.2 P0.6 NU2.5 NU3.3 P0.3 NU2.4 NU3.4 P0.4 NU2.3 P1.1 NU3.5 P1.2 NU2.2 P1.7 NU3.6 NU2.1 P3.0 NU3.7 NU1.8...
  • Page 14: Power Supply Configuration

    NuMaker-MG51FC Power Supply Configuration The NuMaker-MG51FC is able to adopt multiple power supplies. External power sources include NU1 Vin (7 V to 12 V), V (depending on the target chip operating voltage), and PC through USB connector. By using switches and voltage regulator, multiple power domains can be created on the NuMaker- MG51FC.
  • Page 15: Power Sources

    NuMaker-MG51FC 3.4.3 3.3 V Power Sources Table 3-6 presents the 3.3 V power sources. Voltage 5 V Source Description Regulator ICEUP1 converts USB_HS_VBUS to 3.3 V and ICEUP1 USB_HS_VBUS supplies 3.3 V to MG51FC target board or ICE chip. UP1 converts USB_VBUS to 3.3 V and supplies 3.3 V to MG51FC target board.
  • Page 16: Usb Connectors

    NuMaker-MG51FC 3.4.6 USB Connectors Table 3-9 presents the USB connectors. Connector Description ICE USB connector on Nu-Link2-Me for power supply, debugging and ICEJ3 programming from PC. USB FS connector on NuMaker-MG51FC for power supply. Table 3-9 USB Connectors 3.4.7 Power Switches Table 3-10 presents the power switches.
  • Page 17: Figure 3-6 External Power Supply Sources On Mg51Fc Target Board

    NuMaker-MG51FC Table 3-11 presents all power models when supplying external power through Nu-Link2-Me. The Nu- Link2-Me external power sources are highlighted in yellow. Target ICEJPR1 ICEJPR2 Model Chip ICEJ3 (MCUVCC) (ICEVCC) Chip Selection Voltage Selection Selection Voltage Connect 1.8 V 1.8 V 1.8 V 1.8 V...
  • Page 18: Figure 3-7 Detach The Nu-Link2-Me From Numaker-Mg51Fc

    NuMaker-MG51FC To use Vin or J2 as external power supply source with Nu-Link2-Me detached from NuMaker- MG51FC, please follow the steps below: 1. Switch the SW2 depending on the target chip operating voltage. 2. Detach the Nu-Link2-Me from NuMaker-MG51FC. 3. Connect the external power supply to Vin or J2. To use JP1 as external power supply source with Nu-Link2-Me detached from NuMaker- MG51FC, please follow the steps below: 1.
  • Page 19: Table 3-12 Supply External Power For Mg51Fc Target Board

    NuMaker-MG51FC Table 3-12 presents all power models when supplies external power through MG51FC target board. The MG51FC target board external power sources are highlighted in yellow. ICEJPR1 ICEJPR2 Target Chip ICE Chip Model ICEJ3 (MCUVCC) (ICEVCC) Voltage Selection Voltage Selection Selection 7 V ~ 12 V Remove...
  • Page 20: External Reference Voltage Connector

    NuMaker-MG51FC External Reference Voltage Connector Table 3-13 External Reference Voltage Connector presents the external reference voltage connector. Connector Description Connector for user to connect to the external reference voltage pin of the VREF1 target chip. User needs to remove the L5 ferrite bead. Table 3-13 External Reference Voltage Connector Jul.
  • Page 21: Ammeter Connector

    NuMaker-MG51FC Ammeter Connector User can refer to the sample code in NUC230_240 series BSP - SYS_PowerDown_MinCurrent and Figure 3-8 to measure the minimum current in Power-down mode. Figure 3-9 shows the path of the sample code, which has relative settings of entering Power-down mode. Table 3-14 presents the ammeter connector.
  • Page 22: Push Buttons

    NuMaker-MG51FC Push Buttons Table 3-15 presents the push buttons. Component Description ICESW1 Offline program button to start offline ICP programming the target chip. Reset button to reset the target chip. Table 3-15 Push Buttons Jul. 10, 2023 Page 22 of 41 Rev 1.00...
  • Page 23: Leds

    NuMaker-MG51FC LEDs Table 3-16 presents the LEDs. Component Description Power LED The power LED indicates that the NuMaker-MG51FC is powered. P3.2 LED The LED is connected to the target chip P3.2. ICES0, ICES1, ICES2 Nu-Link2-Me status LED. and ICES3 Table 3-16 LEDs Jul.
  • Page 24: Nu-Link2-Me

    NuMaker-MG51FC Nu-Link2-Me The Nu-Link2-Me is an attached on-board debugger and programmer. The Nu-Link2-Me supports on- chip debugging, online and offline ICP programming through SWD interface. The Nu-Link2-Me also supports virtual COM port (VCOM) for printing debug messages on PC. Besides, the programming status could be shown on the built-in LEDs.
  • Page 25: Quick Start

    NuMaker-MG51FC QUICK START Toolchains Supporting Install the preferred toolchain. Please make sure at least one of the toolchains has been installed.  KEIL PK51 Professional Developer's Kit  IAR EMBEDDED WORKBENCH FOR 8051  NuEclipse_Windows (For NuMicro 8051)  NuEclipse_Linux (For NuMicro 8051) Jul.
  • Page 26: Nuvoton Nu-Link Driver Installation

    NuMaker-MG51FC Nuvoton Nu-Link Driver Installation Download and install the latest Nuvoton Nu-Link Driver.  Download and install Nu-Link_Keil_Driver when using Keil MDK.  Download and install Nu-Link_IAR_Driver when using IAR EWARM. Please install the Nu-Link USB Driver as well at the end of the installation. The installation is presented in Figure 4-1 and Figure 4-2.
  • Page 27: Figure 4-2 Nu-Link Usb Driver Installation

    NuMaker-MG51FC Figure 4-2 Nu-Link USB Driver Installation Jul. 10, 2023 Page 27 of 41 Rev 1.00...
  • Page 28: Bsp Firmware Download

    NuMaker-MG51FC BSP Firmware Download Download and unzip the Board Support Package (BSP). Hardware Setup 1. Open the virtual COM (VCOM) function by changing Nu-Link2-Me VCOM Switch No. 1 and 2 to ON. Figure 4-3 Open VCOM Function 2. Connect the ICE USB connector shown in Figure 4-4 to the PC USB port through a USB cable.
  • Page 29: Figure 4-5 Device Manger

    NuMaker-MG51FC 3. Find the “Nuvoton Virtual COM Port” on the Device Manger as Figure 4-5. Figure 4-5 Device Manger 4. Open a serial port terminal, PuTTY for example, to print out debug message. Set the speed to 115200. Figure 4-6 presents the PuTTY session setting.
  • Page 30: Find The Example Project

    NuMaker-MG51FC Find the Example Project Use the “Template” project as an example. The project can be found under the BSP folder as shown in Figure 4-7.  MG51_BSP_Keil_C51_V1.00.000  SampleCode Template   Keil Figure 4-7 Template Project Folder Path Execute the Project under Toolchains Open and execute the project under the toolchain.
  • Page 31: Figure 4-9 Project File Migrate To Version 5 Format

    NuMaker-MG51FC Figure 4-9 Project File Migrate to Version 5 Format 2. Make sure the debugger is “Nuvoton Nu-Link Debugger” as shown in Figure 4-10 and Figure 4-11. Figure 4-10 Debugger Setting in Options Window Note: If the dropdown menu in Figure 4-10 does not contain “Nuvoton Nu-Link Debugger” item, please rework section Jul.
  • Page 32: Figure 4-11 Programming Setting In Options Window

    NuMaker-MG51FC Figure 4-11 Programming Setting in Options Window 3. Rebuild all target files. After successfully compiling the project, download code to the Flash memory. Click “Start/Stop Debug Section” button to enter debug mode. 1. Rebuild 2. Successfully compile 3. Download 4.
  • Page 33: Figure 4-13 Keil Mdk Debug Mode

    NuMaker-MG51FC 4. Figure 4-13 shows the debug mode under Keil MDK. Click “Run” and the debug message will be printed out as shown in Figure 4-14. User can debug the project under debug mode by checking source code, assembly language, peripherals’ registers, and setting breakpoint, step run, value monitor, etc.
  • Page 34: Iar Ewarm

    NuMaker-MG51FC 4.6.2 IAR EWARM This section provides steps to beginners on how to run a project by using IAR EWARM. 1. Double click the “Template.eww” to open the project. 2. Make sure the toolbar contains “Nu-Link” item as shown in Figure 4-15. Note: If the toolbar does not contain “Nu-Link”...
  • Page 35: Figure 4-17 Iar Ewarm Debug Mode

    NuMaker-MG51FC 4. Figure 4-17 shows the debug mode under IAR EWARN. Click “Go” and the debug message will be printed out as shown in Figure 4-18. User can debug the project under debug mode by checking source code, assembly language, peripherals’ registers, and setting breakpoint, step run, value monitor, etc.
  • Page 36: Numaker-Mg51Fc Schematics

    NuMaker-MG51FC NUMAKER-MG51FC SCHEMATICS Nu-Link2-Me Figure 5-1 shows the Nu-Link2-Me circuit. 3.3V ICER1 O f f - page C onnect or 200 1% USB_HS_CAP R0603 ICE5V ICEC1 ICEC2 ICE5V 0.1u MCUVCC_DIODE C0603 C0603 MCUVCC_DIODE SWDH_DAT TICEDAT SWDH_CLK TICECLK SWDH_RST# TICERST ICE_RX_S MCU_TX ICE_TX_S MCU_RX...
  • Page 37: Numaker-Mg51Fc Schematics

    NuMaker-MG51FC NuMaker-MG51FC Schematics Figure 5-2 shows the MG51FC target board circuit. P1 - P10 P11 - P20 P1_LED_R P0.5/AIN4/T0/IC6/PWM2 IC3/PWM3/STADC/AIN5/P0.4 P1_P0.5 P1.4_NU4_SDA P2_UART0_TXD MCU_TX P1.3_NU4_SCL P0.6/AIN3/TXD AIN6/IC5/PWM5/P0.3 P3_UART0_RXD P0.7/AIN2/RXD [SCL]/RXD_1/OCDCK/ICPCK/P0.2 MCU_RX P1.2_NU3_D4 nRESET TICERST P1.1_NU2_A2 P2.0/RST MISO/IC4/PWM4/P0.1 P3.0_NU2_A0 P1.0_NU4_D13 P3.0/AIN1/OSCIN/INT0 T1/MOSI/IC3/PWM3/P0.0 P1.7_NU2_A1 P0.0_NU4_D11...
  • Page 38: Extension Connectors

    NuMaker-MG51FC Extension Connectors Figure 5-3 shows extension connectors of NuMaker-MG51FC. P1 - P10 P11 - P20 P1_P0.5 P0.4_NU3_D3 MCU_TX P0.3_NU3_D2 MCU_RX TICECLK TICERST P0.1_NU4_D12 P3.0_NU2_A0 P0.0_NU4_D11 P1.7_NU2_A1 P1.0_NU4_D13 P1.1_NU2_A2 TICEDAT P1.2_NU3_D4 P1.3_NU4_SCL VDD_MCU P1.5_NU4_D10 P1.4_NU4_SDA External Connector GPIO P1.3_NU4_SCL I2C_SCL P1.4_NU4_SDA I2C_SDA VREF...
  • Page 39: Pcb Placement

    NuMaker-MG51FC PCB Placement Figure 5-4 and Figure 5-5 show the front and rear placement of NuMaker-MG51FC. Figure 5-4 Front Placement Figure 5-5 Rear Placement Jul. 10, 2023 Page 39 of 41 Rev 1.00...
  • Page 40: Revision History

    NuMaker-MG51FC REVISION HISTORY Date Revision Description 2023.7.10 1.00 Initial version. Jul. 10, 2023 Page 40 of 41 Rev 1.00...
  • Page 41 NuMaker-MG51FC Important Notice Nuvoton Products are neither intended nor warranted for usage in systems or equipment, any malfunction or failure of which may cause loss of human life, bodily injury or severe property damage. Such applications are deemed, “Insecure Usage”.

This manual is also suitable for:

Numaker-mg51fc

Table of Contents