refer to “Nuvoton Nu-Link debug adapter user manual” in detail. This document will be stored in the local hard disk when user installs each ...
Jan 29, 2019 — 1 OVERVIEW. NuTiny-MS51FB is the specific development tool for 8-bit high performance 1T 8051-based microcontroller MS51 16K flash size series.
NuTiny-MS51EB Jan 29, 2019 Page 1 of 16 Rev 1.00 INY-1FB L 1T 8051 8-bit Microcontroller NuTiny-MS51FB User Manual NuMicro 8051 Series The information described in this document is the exclusive intellectual property of
NuTiny-MS51EB 1T 8051 8-bit Microcontroller NuTiny-MS51FB User Manual NuMicro® 8051 Series NUTINY-MS51FB USER MANUAL 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 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 Jan 29, 2019 Page 1 of 16 Rev 1.00 NuTiny-MS51EB Table of Contents 1 OVERVIEW .........................................................................................3 2 NUTINY-MS51FB INTRODUCTION ............................................................4 2.1 Virtual COM Port Switch Description ............................................................... 4 2.2 NuTiny-MS51FB Power Setting and Connector .................................................. 4 2.2.1 Power Setting ...................................................................................................4 2.2.2 Debug Connector ...............................................................................................5 2.2.3 ICE USB Connector ............................................................................................5 2.2.4 Extended Connector ...........................................................................................5 2.2.5 Reset Button.....................................................................................................5 2.2.6 Power Connector ...............................................................................................5 2.2.7 Virtual COM Port Function Switch ...........................................................................5 2.3 Pin Assignment for Extended Connector .......................................................... 6 3 HOW TO START NUTINY-MS51FB ON THE KEIL ..........................................7 3.1 Downloading and Installing Keil C-51 Vision® IDE Software .................................. 7 3.2 Downloading and Installing Nuvoton Nu-Link Driver ............................................. 7 3.3 Hardware Setup ........................................................................................ 7 3.4 Example Program...................................................................................... 7 4 NUTINY-MS51FB SCHEMATIC ............................................................... 10 4.1 Nu-Link-Me Schematic...............................................................................10 4.2 NuTiny-MS51FB Schematic.........................................................................11 4.3 NuTiny-MS51FB Connector.........................................................................12 5 DOWNLOAD RELATED FILES FROM NUVOTON WEBSITE ........................... 13 5.1 Downloading Nuvoton Keil C-51 Vision® IDE Driver...........................................13 5.2 Downloading Nuvoton 8bit 8051 MCUs MS51 Series Sample Code.........................14 6 REVISION HISTORY ............................................................................ 15 NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 2 of 16 Rev 1.00 NuTiny-MS51EB 1 OVERVIEW NuTiny-MS51FB is the specific development tool for 8-bit high performance 1T 8051-based microcontroller MS51 16K flash size series. User can use NuTiny-MS51FB to develop and verify the application program easily. The MS51 contains a up to 16K Bytes of main Flash called APROM, in which the contents of User Code resides. The MS51 Flash supports In-Application-Programming (IAP) function, which enables on-chip firmware updates. IAP also makes it possible to configure any block of User Code array to be used as non-volatile data storage, which is written by IAP and read by IAP or MOVC instruction, this function means whole 16K Bytes area all can be use as Data Flash through IAP command. MS51 support an function of configurationable Flash from APROM called LDROM, in which the Boot Code normally resides for carrying out In-System-Programming (ISP). The LDROM size is configurable with a maximum of 4K Bytes by CONFIG define. There is an additional include special 128 bytes security protection memory (SPROM) to enhance the security and protection of customer application. To facilitate programming and verification, the Flash allows to be programmed and read electronically by parallel Writer or In-Circuit-Programming (ICP). Once the code is confirmed, user can lock the code for security. The MS51 provides rich peripherals including 256 Bytes of SRAM, 1K Bytes of auxiliary RAM (XRAM), Up to 18 general purpose I/O, two 16-bit Timers/Counters 0/1, one 16-bit Timer2 with three-channel input capture module, one Watchdog Timer (WDT), one Self Wake-up Timer (WKT), one 16-bit auto-reload Timer3 for general purpose or baud rate generator, two UARTs with frame error detection and automatic address recognition, one SPI, one I2C, five enhanced PWM output channels, eight-channel shared pin interrupt for all I/O, and one 12-bit ADC. The peripherals are equipped with 18 sources with 4-level-priority interrupts capability. The MS51 is equipped with three clock sources and supports switching on-the-fly via software. The three clock sources include external clock input, 10 kHz internal oscillator, and one 16 MHz internal precise oscillator that is factory trimmed to ±1% at room temperature. The MS51 provides additional power monitoring detection such as power-on reset and 4-level brown-out detection, which stabilizes the power-on/off sequence for a high reliability system design. The MS51 microcontroller operation consumes a very low power with two economic power modes to reduce power consumption Idle and Power-down mode, which are software selectable. Idle mode turns off the CPU clock but allows continuing peripheral operation. Power-down mode stops the whole system clock for minimum power consumption. The system clock of the MS51 can also be slowed down by software clock divider, which allows for a flexibility between execution performance and power consumption. With high performance CPU core and rich well-designed peripherals, the MS51 benefits to meet a general purpose, home appliances, or motor control system accomplishment. NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 3 of 16 Rev 1.00 NuTiny-MS51EB 2 NUTINY-MS51FB INTRODUCTION NuTiny-MS51FB uses the MS51FB9AEas the target microcontroller. Figure 2.1-1 is NuTinyMS51FB for the MS51 16K flash size series, the left portion is called NuTiny-MS51FB and the right portion is Debug Adaptor called Nu-Link-Me. NuTiny-MS51FB is similar to other development boards. User can use it to develop and verify applications to emulate the real behavior. The on-board chip covers MS51 series features. The NuTiny-MS51FB can be a real system controller to design user's target systems. Nu-Link-Me is a Debug Adaptor. The Nu-Link-Me Debug Adaptor connects your PC's USB port to the user's target system (via Serial Wired Debug Port) and allows user to program and debug embedded programs on the target hardware. To use Nu-Link-Me Debug adaptor with Keil, please refer to "Nuvoton Nu-Link debug adapter user manual" in detail. This document will be stored in the local hard disk when user installs each driver. Nu-Link-Me also supports virtual COM port function. User can use Nu-Link-Me as a USB to UART virtual COM port, which connects to onboard MS51FB9AE UART0. VDD Extended Connector VDD Reset Key MS51FB9AE Power LED GPIO LED VSS Extended Connector VSS ICE Controller Virtual COM Enable Switch USB Connector Power Select Connector 5V or 3.3V Figure 2.1-1 NuTiny-MS51FB (PCB Board) 2.1 Virtual COM Port Switch Description The switch in Nu-Link-Me, SW3, determines that the virtual COM port function is enabled or disabled. When user turns on all of the positions of switch, the virtual COM port function will be enabled. By using virtual COM port function, user can access the USB device in the same way as it would access a standard COM port to MS51FB9AEUART0 (P3.1 and P3.0) . To use this function, user needs to install "VCOM Driver" at first. User can get "Nuvoton USB driver" from NuMicroDVD www.nuvoton.com\NuMicroDVD in folder "Software Utilities" or from website: Nu-Link_USB_Driver 2.2 NuTiny-MS51FB Power Setting and Connector 2.2.1 Power Setting J1: USB port in Nu-Link-Me JP7 and JP9: VCC33 Voltage connector in NuTiny-MS51FB NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 4 of 16 Rev 1.00 NuTiny-MS51EB Model Model 1 Model 2 JPR1 Select VCC33 (default) X J1USB port Connect to PC X JP7 & JP9 VCC33 DC 3.3V output DC 2.4 V ~ 5.5 V Input MCU Voltage DC 3.3V Voltage by JP7 & JP9 input 2.2.2 Debug Connector JP4: Connector in target board (NuTiny-MS51FB) for connecting with Nuvoton ICE adaptor (Nu-Link-Me) JP2: Connector in ICE adaptor (Nu-Link-Me) for connecting with a target board (for example NuTiny-MS51FB) 2.2.3 ICE USB Connector J1: Mini USB Connector in Nu-Link-Me connected to a PC USB port 2.2.4 Extended Connector JP5 and JP6: Show all chip pins in NuTiny-MS51FB 2.2.5 Reset Button SW1: Reset button in NuTiny-MS51FB 2.2.6 Power Connector JP7 and JP9: VDD connector in NuTiny-MS51FB JP8 and JP10: VSS connector in NuTiny-MS51FB 2.2.7 Virtual COM Port Function Switch SW3: Switch ON/OFF to enable or disable Nu-Link-Me virtual COM port function. Function Enable Disable 1 ON OFF Switch 2 3 ON ON OFF OFF 4 ON OFF Descriptions Enable Nu-Link-Me virtual COM port function Disable Nu-Link-Me virtual COM port function NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 5 of 16 Rev 1.00 NuTiny-MS51EB 2.3 Pin Assignment for Extended Connector NuTiny-MS51FB provides MS51FB9AE on board and the extended connector for TSSOP-20 pin. Error! Reference source not found.Table is the pin assignment for MS51FB9AE. Pin No Pin Function Pin No Pin Function 01 PWM2/IC6/T0/AIN4/P0.5 11 P1.4/SDA/FB/PWM1 02 TXD/AIN3/P0.6 12 P1.3/SCL/[STADC] 03 RXD/AIN2/P0.7 13 P1.2/PWM0/IC0 04 RST/P2.0 14 P1.1/PWM1/IC1/AIN7/CLO 05 INT0/OSCIN/AIN1/P3.0 15 P1.0/PWM2/IC2/SPCLK 06 INT1/AIN0/P1.7 16 P0.0/PWM3/IC3/MOSI/T1 07 GND 17 P0.1/PWM4/IC4/MISO 08 [SDA]/TXD_1/ICPDA/OCDDA/P1.6 18 P0.2/ICPCK/OCDCK/RXD_1/[SCL] 09 VDD 19 P0.3/PWM5/IC5/AIN6 10 PWM5/IC7/SS/P1.5 20 P0.4/AIN5/STADC/PWM3/IC3 Table 2.3-1 Pin Assignment for MS51FB9AE NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 6 of 16 Rev 1.00 NuTiny-MS51EB 3 HOW TO START NUTINY-MS51FB ON THE KEIL 3.1 Downloading and Installing Keil C-51 Vision® IDE Software Please connect to the Keil company website (http://www.keil.com) to download the Keil C-51 Vision® IDE and install the RVMDK. 3.2 Downloading and Installing Nuvoton Nu-Link Driver Please connect to Nuvoton 8bit 8051 MCUs website (http://www.nuvoton.com/8bit-8051-mcus) to download the "Nu-Link_Keil_Driver" file. Please refer to section 5.1 for the detailed download flow. After the Nu-Link driver is downloaded, please unzip the file and execute the file to install the driver. 3.3 Hardware Setup The hardware setup is shown as Figure 3.3-1 NUTINY-MS51FB USER MANUAL Figure 3.3-1 NuTiny-MS51FB Hardware Setup 3.4 Example Program This example demonstrates the ease of downloading and debugging an application on a NuTinyMS51FB board. It can be found on Figure 3.4-1 list directory and downloaded from Nuvoton 8bit 8051 MCUs website. The example file can be found in the directory list shown in Figure 3.4-1. Jan 29, 2019 Page 7 of 16 Rev 1.00 Directory NuTiny-MS51EB NUTINY-MS51FB USER MANUAL Figure 3.4-1 Example Directory To use this example: 1. Open a project from the MS51 sample code installation folder (default as C:\Nuvoton) using the following path \SampleCode\StdDriver\GPIO_InputOutput\KEIL\ 2. Execute "GPIO.uvproj" 5 3 4 Enter compile mode interface 3. Compiler 4. Download the program code to Flash 5. Enter / Exit Debug mode Jan 29, 2019 Page 8 of 16 Rev 1.00 NuTiny-MS51EB 6 Enter Debug mode interface 6. Execute the program 7. The I/O LED on the NuTiny-MS51FB board will be toggled on. NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 9 of 16 Rev 1.00 NuTiny-MS51EB 4 NUTINY-MS51FB SCHEMATIC 4.1 Nu-Link-Me Schematic ICELED ISPLED RED GREEN ICE1 2 1 RED ICP1 2 1 Y ELLOW IDLE1 2 1 RED BUSY 1 2 1 GREEN VCC RP1 1 2 3 4 5 6 7 8 8P4R-330 ICE_Status VCC PVSS ICE_AVDD USBVBUS USB_D- R1 DM USB_D+ 33 R6 DP 33 ICE_USB ICE CONNECT IF 1 2 VCC 3 DM 4 DP 5 NC GND J1 6 SHIELD 7 SHIELD 8 SHIELD 9 SHIELD VCC MICRO USB 5P AB-tyLp4e R/A SMT P/N:22V9C0C53_6c2o5n0nect ICEDAT FERRITE BEAD ICECLK ICERST ICE_TX ICE_RX VCC GND VCC_connect TICEDAT TICECLK TICERST MCU_TXD MCU_RXD NUC_RST# 12M_I 12M_O 2 2 1 VCC R4 10K NUC_RST# ICE_RST C8 10uF/10V RESET C4 VCC 1uF/16V 1 U1 ICELED ISPLED RED GREEN C5 0.1u 1 2 INT0/PB14 3 CPO1/PB13 4 CPO0/PB12 5 X32I 6 X32O 7 I2C1SCL/PA11 8 I2C1SDA/PA10 9 I2C0SCL/PA9 10 I2C0SDA/PA8 11 RX1/PB4 12 TX1/PB5 13 RTS1/PB6 14 CTS1/PB7 15 LDO 16 VDD VSS NUC12SRE3DE 64 STADC/TM0/PB8 63 PVSS 62 VDD1 61 VSS1 60 /RESET 59 XT1_In 58 XT1_Out 57 INT1/PB15 56 CPP1/PC14 55 CPN1/PC15 54 CPP0/PC6 53 CPN0/PC7 52 AVDD 51 ADC7/PA7 50 ADC6/PA6 49 ADC/PA5 48 PA4/ADC4 47 PA3/ADC3 46 PA2/ADC2 45 PA1/ADC1 44 PA0/ADC0 43 AVSS 42 ICE_CLK 41 ICE_DAT 40 PA12/PWM0 39 PA13/PWM1 38 PA14/PWM2 37 PA15/PWM3 36 PC8/SS10 35 PC9/SPCLK1 34 PC10/SDI10 33 PC11/SDO10 VCC 12M Oscillators ICE_CLK ICE_DAT ADAVSS ICERST ICECLK RTDA20 RTDA333 RRSET1 RTCK1 100K 100K ICEDAT RTDA1 100K 12M_O R3 33 12M_I C7 20p X2 12MHz C3 20p ICE_TX ICE_RX SW3 RXD TXD VCOM_pin SW DIP-4/SM(EHS104LD) VCOM switch 17 18 VBUS 19 VDD33 20 D21 D+ 22 PB0/RX0 23 PB1/TX0 24 PB2/RTS0 25 PB3/CTS0 26 PC3/SDO00 27 PC2/SDI00 28 PC1/SPCLK0 29 PC0/SS00 30 PE5 31 PB11/TM3 32 PB10/SS01/TM2 PB9/SS11/TM1 JP1 1 2 3 4 5 NC DEBUG VCC ICE_DAT ICE_CLK ICE_RST ICE_AVDD VCC L2FERRITE BEAD L3FERRITE BEAD ADAVSS USBVBUS DM DP VBUS USB_DUSB_D+ RXD TXD USBVBUS C6 CB1 1u 0.1u VCOM_pin JP3 1 2 3 4 NC VCC D1 SS24A 1 2 VCC_connect ICEDAT ICECLK ICERST SWD connect JP6 1 2 3 4 5 6 7 8 9 10 NC ICE_TX ICE_RX 5V VCC 3.3V 5V 3.3V N12 1 USBVBUS PD1 1 2 SS24A 3 1 IN 2 GND OUT 4 OUT 3 2 1 UP1 AMS1117_3.3v N13 JPR1 1&2 (0 ohm) power switch 2 CP1 10uF/10V Tit le Size A4 Dat e: Nu-Link-Me Docum ent Num ber 1 Monday , June 25, 2018 Rev 3.0 Sheet of 1 3 NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 10 of 16 Rev 1.00 NuTiny-MS51EB 4.2 NuTiny-MS51FB Schematic VDD SW1 R8 10K TICERST 1 PUSH BOTTOM (B) C14 10uF/10V Reset 2 VDD VDD JP8 JP7 VDD 1 1 2 JP9 1 C8 C9 2 3 10uF/10V 0.1u 3 4 1 4 5 2 JP10 1 2 2 5 NC NC SIP-2P SIP-2P NC Power NC GPIO1 RED LED1 2 1 N3 R9 1K VDD POWER1GREEN 2 1 N1 VDD R10 1K LED VDD U3 P1 1 20 P20 Tiny _TX P2 2 P0.5/AIN4/T0/IC6/PWM2 IC3/PWM3/STADC/AIN5/P0.4 19 P19 Tiny _RX P3 3 P0.6/AIN3/TXD AIN6/IC5/PWM5/P0.3 18 P18 TICECLK TICERST P4 4 P0.7/AIN2/RXD [SCL]/RXD_1/OCDCK/ICPCK/P0.2 17 P17 P5 5 P2.0/RST MISO/IC4/PWM4/P0.1 16 P16 P6 6 P3.0/AIN1/OSCIN/INT0 T1/MOSI/IC3/PWM3/P0.0 15 P15 P7 7 P1.7/AIN0/INT1 SPCLK/IC2/PWM2/P1.0 14 P14 TICEDAT P8 8 GND CLO/AIN7/IC1/PWM1/P1.1 13 P13 LED1 P9 9 P1.6/OCDDA/ICPDA/TXD_1/[SDA] IC0/PWM0/P1.2 12 P12 P10 10 VDD [STADC]/SCL/P1.3 11 P11 P1.5/SS/IC7/PWM5 PWM1/FB/SDA/P1.4 MS51 TSSOP20 MS51FB9AE Tiny _TX Tiny _RX Debug Interface & Off Page JP4 1 2 3 4 5 6 7 8 9 10 VDD TICEDAT TICECLK TICERST VCC_connect JP5 P1 P1 P2 1 2 P2 P3 3 4 P3 P4 5 6 P4 P5 7 8 P5 P6 9 10 P6 P7 11 12 P7 P8 13 14 P8 P9 15 16 P9 P10 17 18 P10 19 20 NC NC P20 P20 P19 19 20 P19 P18 17 18 P18 P17 15 16 P17 P16 13 14 P16 P15 11 12 P15 P14 9 10 P14 P13 7 8 P13 P12 5 6 P12 P11 3 4 P11 1 2 JP6 GPIO O f f - page Connect or P[1:20] TICEDAT TICECLK TICERST Tiny _TX Tiny _RX P[1:20] TICEDAT TICECLK TICERST Tiny _TX Tiny _RX VDD GND VDD Tit le Size A4 SDK Circuit Docum ent Num ber 2 Dat e: Sheet Tuesday , August 30, 2016 of 2 Rev 1.1 10 NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 11 of 16 Rev 1.00 NuTiny-MS51EB 4.3 NuTiny-MS51FB Connector P1 - P8 P17 - P24 PB.5 PB.4 PB.3 PB.2 PB.1 PB.0 PF.5 PF.4 P9 - P16 JP2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HEADER 8X2 PB.5 PB.4 PB.3 PB.2 PB.1 PB.0 PF.5 PF.4 PF.0 PF.1 PC.1 PC.0 PA.12 PA.13 PA.14 PA.15 P25 - P32 PF.3 PF.2 PA.3 PA.2 PA.1 PA.0 PF.15 nRESET JP4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HEADER 8X2 PF.3 PF.2 PA.3 PA.2 PA.1 PA.0 PF.15 nRESET GND LDO_CAP VDD PB.15 PB.14 PB.13 PB.12 AVDD JP7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HEADER 8X2 PF.0 PF.1 PC.1 PC.0 PA.12 PA.13 PA.14 PA.15 JP5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HEADER 8X2 GND LDO_CAP VDD PB.15 PB.14 PB.13 PB.12 AVDD External Connector J2 4 3 2 1 HEADER 2x2 J5 VDD 4 3 2 1 HEADER 2x2 VDD / GND Header Tit le Size A Dat e: ML51PC0AE Target board Docum ent Num ber Ext. Connector Sheet Monday , June 25, 2018 of 3 Rev v1.0 3 NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 12 of 16 Rev 1.00 NuTiny-MS51EB 5 DOWNLOAD RELATED FILES FROM NUVOTON WEBSITE 5.1 Downloading Nuvoton Keil C-51 Vision® IDE Driver Step1 Visit the Nuvoton 8bit 8051 MCUs website: http://www.nuvoton.com/8bit-8051-mcus Step2 NUTINY-MS51FB USER MANUAL Step3 3. Click here to download Step4 Download the Nuvoton_Keil_ Drive Jan 29, 2019 Page 13 of 16 Rev 1.00 NuTiny-MS51EB 5.2 Downloading Nuvoton 8bit 8051 MCUs MS51 Series Sample Code Step1 Visit the Nuvoton 8bit 8051 MCUs website: http://www.nuvoton.com/8bit-8051-mcus Step2 Step3 Download the MS51_16KBSP_KEIL_V1.00 NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 14 of 16 Rev 1.00 6 REVISION HISTORY Date 2019.01.29 Revision 1.00 Description Initial release NuTiny-MS51EB NUTINY-MS51FB USER MANUAL Jan 29, 2019 Page 15 of 16 Rev 1.00 NuTiny-MS51EB NUTINY-MS51FB USER MANUAL 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". Insecure usage includes, but is not limited to: equipment for surgical implementation, atomic energy control instruments, airplane or spaceship instruments, the control or operation of dynamic, brake or safety systems designed for vehicular use, traffic signal instruments, all types of safety devices, and other applications intended to support or sustain life. All Insecure Usage shall be made at customer's risk, and in the event that third parties lay claims to Nuvoton as a result of customer's Insecure Usage, customer shall indemnify the damages and liabilities thus incurred by Nuvoton. Jan 29, 2019 Page 16 of 16 Rev 1.00Microsoft Word 2010 Microsoft Word 2010