Download NUC131
Transcript
NUC131 ARM Cortex® -M 32-bit Microcontroller NuMicro™ Family NuEdu-UNO for NUC131 Series User Manual 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 Mar 6, 2015 1 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES 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. NUC131 Table of Contents 1 Overview ........................................................................................... 3 2 Features ............................................................................................ 4 3 Introduction to NuEdu-UNO-NUC131SD2AE ............................................ 5 3.1 3.2 3.3 3.4 3.5 NuEdu-UNO-NUC131SD2AE Jumper Description ............................................ 7 Pin Assignment for Extended Connectors...................................................... 9 Arduino pin assignment for NuEdu-UNO-NUC131SD2AE ................................10 NuEdu-UNO-NUC131SD2AE portrait ...........................................................11 NuEdu-UNO-NUC131SD2AE PCB Placement .................................................12 Starting to Use NuEdu-UNO-NUC131SD2AE on the Keil μVision® IDE ....... 13 4 4.1 4.2 4.3 4.4 Downloading and Installing Keil μVision® IDE Software ................................13 Downloading and Installing Nuvoton Nu-Link Driver ......................................13 Hardware Setup .......................................................................................13 Example Program .....................................................................................14 5 Starting to Use NuEdu-UNO-NUC131SD2AE on the IAR Embedded Workbench.............................................................................................. 18 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL 5.1 5.2 5.3 5.4 6 Starting to Use NuEdu-UNO-NUC131SD2AE on the Arduino IDE .............. 21 6.1 6.2 6.3 6.4 6.5 6.6 7 Downloading and Installing Arduino IDE Software ........................................21 Installing Nuvoton Nu-Link Driver ...............................................................21 Installing NuLink USB Driver ......................................................................22 Hardware Setup .......................................................................................22 Test USB Device in the Device Manager ......................................................23 Example Program .....................................................................................24 NuEdu-UNO-NUC131SD2AE Schematics ............................................... 29 7.1 7.2 7.3 8 NuEdu-UNO-NUC131SD2AE Schematic .......................................................29 Nu-Link-Me Schematic ..............................................................................30 NuEdu-UNO-NUC131SD2AE Schematic .......................................................31 Downloading NuMicro™ Related Files from Nuvoton Website .................. 32 8.1 8.2 9 Downloading and Installing IAR Embedded Workbench Software ....................18 Downloading and Installing Nuvoton Nu-Link Driver ......................................18 Hardware Setup .......................................................................................18 Example Program .....................................................................................19 Downloading NuMicro™ Keil μVision® IDE Driver .........................................32 Downloading NuMicro™ Keil μVision® IDE Driver .........................................33 Revision History ................................................................................ 35 Mar 6, 2015 2 of 36 Rev. 0.002 NUC131 1 Overview Arduino is an open-source electronics platform based on easy-to-use hardware and software. NuMicro NuEdu Evaluation Board is an Arduino compatible hardware using NuMicro MCU as the micro controller. Its function can be extended with Arduino add-ons. Users can use Arduino IDE to develop their applications and leverage large number of open source samples. GPIO Timer ADC UART PWM I2C GPIO SPI The NuEdu-UNO-NUC131SD2AE design pin compares to Arduino design pin. Due to chip Property function, the NuEdu-UNO-NUC131SD2AE design pin have some different. We provide the Power pin (VCC, 3.3V, 5V), Analog pin (A0 ~ A5), Digital pin (UART0, PWM(2 ~ 11), SPI_SS, INT, I2C0) and Clock Output pin (CLKO). The NuEdu-UNO-NUC131SD2AE can use UART0 to print the debug massage or open the SW2 to use VCOM from USB interface to print the debug massage. Mar 6, 2015 3 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL The NuEdu-UNO-NUC131SD2AE is a specific development tool for NuMicro™ NUC131 series by which users can develop and verify the application program easily. The NuEdu-UNO-NUC131SD2AE includes two portions: NuEdu-UNONUC131SD2AE (an evaluation board) and Nu-Link-Me (Debug Adaptor). With the NuEdu-UNO-NUC131SC2AE, users do not need additional ICE or debug equipment. NUC131 2 Features The NuEdu-UNO for NUC131 board offer the following features: Nuvoton microcontroller with LQFP64 package NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Accord Arduino pin design specification. Power, Analog, SPI pin Digital pin have UART, I2C and vref NUC131 characteristical Up to 24 channel PWM outputs Up to six UART extension resources Novoton Microelectronics Morpho extension pin headers for full access to all NUC131 I/Os On-board Nu-Link debugger/programmer with SWD connector Flexible board power supply USB VBUS(can use jump to change 5V or 3.3V) External VIN (7V<VIN<12V) supply voltage from transformer External 2.5 ~ 5.5V supply voltage from other power source input to VDD pin LEDs status Power, user, Tx, Rx and ICE status. One push buttons: RESET Supported by wide choice of Integrated Development Environments (IDEs) including IAR, Keil, GCC-based IDEs Mar 6, 2015 4 of 36 Rev. 0.002 NUC131 3 Introduction to NuEdu-UNO-NUC131SD2AE The following figure shows the NuEdu-UNO-NUC131SD2AE for NUC131SD2AE series, in which the left portion is called NuEdu-UNO-NUC131SD2AE and the right portion is Debug Adaptor called Nu-Link-Me. The NuEdu-UNO-NUC131SD2AE is similar to other development board. Users can use it to develop and verify applications to emulate the real behavior. In fact, the real chip NUC131SD2AE is mounted on the board. The NuEdu-UNONUC131SD2AE can be a real system controller to design user target system. The Nu-Link-Me is a Debug Adaptor which connects the USB port of your PC to your target system (via Serial Wired Debug Port) and allows you to program and debug embedded programs on the target hardware. To use the Nu-Link-Me Debug adaptor with Keil, IAR or Arduino, please refer to “Nuvoton NuMicro™ IAR ICE Driver User Manual” or “Nuvoton NuMicro™ Keil ICE Driver User Manual” for details . Analog pin Power pin Extended Connector Extended Connector (NU3) (NU1) VDD:3.3V or 5V (JP8) ICE Controller USB Connector (J1) VDD (JP1) Target Chip SPI Interface ICE Controller GND (JP2) Digital pin Extended Connector (NU4, NU2) ICE Controller Figure 3-1 NuEdu-UNO-NUC131SD2AE (Green PCB Board is for Engineer version) Mar 6, 2015 5 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL VCOM Switch (SW2) NUC131 Power pin Extended Connector (NU1) Analog pin Extended Connector (NU3) VDD (JP1) Select voltage VDD:3.3V or 5V SPI Interface SWD Interface GND (JP2) ICP Interface Digital pin Extended Connector (NU4, NU2) NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 3-2 NuEdu-UNO-NUC131SD2AE (Green PCB Board is for Engineer version) Mar 6, 2015 6 of 36 Rev. 0.002 NUC131 NuEdu-UNO-NUC131SD2AE Jumper Description 3.1 3.1.1 Power Settings The NuEdu-UNO-NUC131 board can be use three method to provided power for VDD. The VDD power source can use the USB, Transformer(7V ~ 12V) and other power for VDD pin, Please refer to the table below. Other power for VDD pin JPR1 (selection voltage) Select 5V or 3.3V (default is 5V) X Transformer X Model USB JP1 (VDD provided voltage) DC 5V or 3.3V output (SW2 pin1 need on) DC 2.5 V ~ 5.5 V Input Transformer to DC 7 V ~ 12 V (J2 need short) MCU Voltage DC 5V Voltage by JP1 input DC 5V 3.1.2 Debug Connectors JP10: Connector in target board (NuEdu-UNO-NUC131SD2AE) for connecting with Nuvoton ICE adaptor (Nu-Link-Me) JP9: Connector in ICE adaptor (Nu-Link-Me) for connecting with a target board (e.g. NuEdu-UNO-NUC131SD2AE) 3.1.3 USB Connectors J1: Mini USB Connector in Nu-Link-Me connected to a PC USB port 3.1.4 Extended Connectors JP3, JP4, JP5 and JP6: Show all chip pins in NuEdu-UNO-NUC131SD2AE 3.1.5 Buttons SW1: Reset button in NuEdu-UNO-NUC131SD2AE 3.1.6 Power Connectors JP1: VDD connector in NuEdu-UNO-NUC131SD2AE JP2: VSS connector in NuEdu-UNO-NUC131SD2AE 3.1.7 Power Jumpers JPR1: Jumper in ICE adaptor (Nu-Link-Me) for power source selection. Mar 6, 2015 7 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL JP1: VDD Voltage connecter in NuEdu-UNO-NUC131SD2AE J1: USB port in Nu-Link-Me SW2: Pin 1 is ICE VDD connect to target chip VDD Con1: 7 V ~ 12 V Power JACK J2: Power JACK connect to VDD Transformer X: Unused. Note: when you use the Model3 to provided power, please turn off the SW2 all pin. NUC131 3.1.8 USB Virtual COM function setting SW2: Open the Virtual COM mode for the debug message in NuEdu-UNONUC131SD2AE board. The Virtual COM function can be use the Arduino IDE, keil and IAR. If you want use this function can be use SW2 to turn on all pin, the target board chip UART0 will be use Virtual COM function, if you want use the UART0 function, please turn off the SW2 pin2 ~ pin4, Please refer to the table below. The switch default is UART mode Switch pin number 1 2 3 4 function name ICE_VCC VCOM_En VCOM_TX VCOM_RX UART0 mode On Off Off Off VCOM mode On On On On NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Mar 6, 2015 8 of 36 Rev. 0.002 NUC131 3.2 Pin Assignment for Extended Connectors The NuEdu-UNO-NUC131SD2AE provides the NUC131SD2AE target chip on board and the extended connectors (JP3, JP4, JP5 and JP6) for LQFP64-pin. The following table is the pin assignment for NUC131SD2AE. Pin No Pin Name Pin No Pin Name PB.14,INT0 33 PC.11,PWM1_BRAKE1 PB.13 34 PC.10,PWM1_BRAKE0 PB.12,CLKO,BPWM1_CH3 35 PC.9,PWM0_BRAKE1 PF.5,I2C0_SCL,PWM1_CH5 36 PC.8,PWM0_BRAKE0 PF.4,I2C0_SDA,PWM1_CH4 37 PA.15,PWM0_CH3 PA.11,I2C1_SCL,PWM1_CH3 38 PA.14,PWM0_CH2 PA.10,I2C1_SDA,PWM1_CH2 39 PA.13,PWM0_CH1,UART5_TXD PA.9,I2C0_SCL,UART1_nCTS 40 PA.12,PWM0_CH0,UART5_RXD PA.8,I2C0_SDA,UART1_nRTS 41 PF.7,ICE_DAT PB.4,UART1_RXD 42 PF.6,ICE_CLK PB.5,UART1_TXD 43 AVSS PB.6,UART1_nRTS 44 PA.0,PWM0_CH4,ADC0,I2C1_SC L,UART5_TXD PB.7,UART1_nCTS 45 PA.1,PWM0_CH5,ADC1,I2C1_SD A,UART5_RXD LDO_CAP 46 PA.2,PWM1_CH0,ADC2,UART3_ TXD VDD 47 PA.3,PWM1_CH1,ADC3,UART3_ RXD VSS 48 PA.4,ADC4 PB.0,UART0_RXD 49 PA.5,UART3_RXD,ADC5 PB.1,UART0_TXD 50 PA.6,UART3_TXD,ADC6 PB.2,UART0_nRTS,TM2_EXT,TM 51 PA.7,Vref,ADC7 2,PWM1_BRAKE1 PB.3,UART0_nCTS,TM3_EXT,TM 52 AVDD 3,PWM1_BRAKE0 PD.6,BPWM1_CH1,CAN0_RXD 53 PC.7,PWM0_BRAKE1,I2C0_SCL, UART4_RXD PD.7,BPWM1_CH0,CAN0_TXD 54 PC.6,PWM0_BRAKE0,I2C0_SDA, UART4_TXD PD.14,BPWM0_CH5,UART2_RXD 55 PC.15 PD.15,BPWM0_CH4,UART2_TXD 56 PC.14 PC.3,BPWM0_CH3,SPI0_MOSI0 57 PB.15, ,BPWM1_CH5TM0,TM0_E XT,INT1 PC.2,BPWM0_CH2,SPI0_MISO0 58 PF.0,XT1_OUT PC.1,BPWM0_CH1,SPI0_CLK 59 PF.1,XT1_IN PC.0,BPWM0_CH0,SPI0_SS0 60 nRESET PE.5,PWM0_CH5,TM1_EXT,TM1 61 VSS PB.11,TM3,PWM0_CH4 62 VDD PB.10,TM2 63 PF.8, PWM1_CH4,CLKO PB.9,TM1 64 PB.8,BPWM1_CH2,CLKO,TM0,ST ADC Table 3-1 Pin Assignment for NUC131SD2AE Mar 6, 2015 9 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL odel 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 NUC131 3.3 Arduino pin assignment for NuEdu-UNO-NUC131SD2AE The NuEdu-UNO-NUC131SD2AE provides the NUC131SD2AE target chip on board and the extended connectors (NU1, NU2, NU3 and NU4) for LQFP64pin. The following table is the pin assignment for NuEdu-UNO-NUC131SD2AE. Pin No Clock Output Power Analog Digital NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL SPI Interface Mar 6, 2015 Pin Name Pin No Pin Name odel 1 CLKO 5 5V 2 VCC 6 GND 3 RESET 7 GND 4 3.3V 8 Vin 1 A0 4 A3 2 A1 5 A4 3 A2 6 A5 0 PB.0/UART_RX0 9 PA.14/PWM0_CH2 1 PB.1/UART_TX0 10 PA.13/PWM0_CH1 2 PF.4/PWM1_CH4 11 PA.12/PWM0_CH0 3 PF.5/PWM1_CH5 12 PB.15/TM0/INT1 4 PA.10/PWM1_CH2 13 PB.13(LED) 5 PA.11/PWM1_CH3 VSS VSS 6 PA.15/PWM0_CH3 VREF VREF 7 PE.5/PWM0_CH5 I2C PA.8/SDA 8 PB.11/PWM0_CH4 I2C PA.9/SCL 1 PC.2/SPI0_MISO 5 RESET 2 VDD 6 GND 3 PC.1/SPI0_CLK 7 PC.0/SPI0_SS 4 PC.3/SPI0_MOSI 8 PB.9/TM1 Table 3-2 Pin Assignment for NuEdu-UNO-NUC131SD2AE 10 of 36 Rev. 0.002 NUC131 NuEdu-UNO-NUC131SD2AE portrait 3.4 64 Reserved A0 PB.8 44 A1 CLKO PA.0 45 STADC ADC_CH0 PA.1 TM0 PWM0 CH4 ADC_CH1 A2 BPWM1 CH2 VDD 3VCC RESET VSS 5VCC I2C1_SCL PWM0 CH5 46 VDD VSS UART5 TXD I2C1_SDA PA.2 VSS VIN UART5 RXD ADC_CH2 SCK PWM1 CH0 MISO 27 UART3 TXD 26 PC.1 A3 PC.2 SPI0_CLK 47 SPI0_MISO0 BPWM0 CH1 PA.3 Clock Output Pin BPWM Pin External Interrupt Input Pin USB JACK NuEdu-UNO NuLink-Me 3~ 4~ 5~ 6~ 7~ 8~ 9~ 10~ 11~ 12 13 Reserved Reserved 11 5 4 7 6 37 29 30 38 39 40 28 1 9 8 PB.4 PB.5 PF.4 PF.5 PA.10 PA.11 PA.15 PE.5 PB.11 PA.14 PA.13 PA.12 PC.0 PB.14 PA.8 PA.9 UART1 RXD UART1 TXD PWM1 CH4 PWM1 CH5 PWM1 CH2 PWM1 CH3 PWM0 CH3 PWM0 CH5 PWM0 CH4 PWM0 CH2 PWM0 CH1 PWM0 CH0 SPI0_SS0 INT1 I2C0_SDA I2C0_SCL I2C0_SCL I2C1_SDA I2C1_SCL TM1_EXT TM3 UART5 RXD BPWM0 CH0 UART1 nRTS UART1 nCTS VSS I2C0_SDA TM1 Figure 3-3 NuEdu-UNO-NUC131SD2AE pin design for Arduino NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL 2~ 10 VREF TX 1 UART5 TXD RX 0 Rev. 0.002 11 of 36 Mar 6, 2015 BPWM0 CH2 ADC_CH3 PWM Pin NUC131 SD2AE MOSI 25 PC.3 PWM1 CH1 Serial Pin A4 Timer Pin A5 ADC Pin 48 Analog-related Pin 49 SPI Pin PA.4 Port Pin PA.5 Power-related Pin ADC_CH4 I2C Pin ADC_CH5 Physical Pin Digital Pin* UART Pin Reserved UART3 RXD UNO Defined Note: ʺ~ʺ means it has PWM function pin. SPI0_MOSI0 BPWM0 CH3 1st Pin UART3 RXD Legend 7~12V Power JACK RESET NUC131 3.5 NuEdu-UNO-NUC131SD2AE PCB Placement The following figure shows the NuEdu-UNO-NUC131SD2AE PCB placement. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 3-4 NuEdu-UNO-NUC131SD2AE PCB Placement Mar 6, 2015 12 of 36 Rev. 0.002 NUC131 4 Starting to Use NuEdu-UNO-NUC131SD2AE on the Keil μVision® IDE 4.1 Downloading and Installing Keil μVision® IDE Software Please connect to the Keil company website (http://www.keil.com) to download the Keil μVision® IDE and install the RVMDK. 4.2 Downloading and Installing Nuvoton Nu-Link Driver Please connect to Nuvoton NuMicro™ website (http://www.nuvoton.com/NuMicro) to download the “NuMicro™ Keil μVision® IDE driver” file. Please refer to section 8.1 for the detailed download flow. After the Nu-Link driver is downloaded, please unzip the file and execute the “NuLink_Keil_Driver.exe” to install the driver. 4.3 Hardware Setup The hardware setup is shown in the following figure. If want use the VCOM function, please turn on the SW2 all pin ,can be use the VCOM function. Please refer the 3.1.8 section. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 4-1 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 13 of 36 Rev. 0.002 NUC131 4.4 Example Program This example demonstrates how to download and debug an application on a NuEdu-UNO-NUC131SD2AE board. The example file can be found in the directory list shown in the following figure. Step1: Open the Project Please open the under path. “C:\Nuvoton\BSP Library\NUC131BSP_CMSIS_v3.00.001\SampleCode\StdDriver\ADC_ResultM onitor\KEIL” NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 4-2 NuEdu-UNO- NUC131SD2AE Hardware Setup Step2: Check your chip and debug chip Please open the target options to check device chip is correct and debug chip selection is correct. Mar 6, 2015 14 of 36 Rev. 0.002 NUC131 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 4-3 NuEdu-UNO- NUC131SD2AE Hardware Setup Figure 4-4 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 15 of 36 Rev. 0.002 NUC131 Step3: Build and download your code Build Download Step4: Open the serial monitor and setting the baud rate User can open the serial monitor to print debug message. The example is use “PuTTY tool” . NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 4-5 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 16 of 36 Rev. 0.002 NUC131 Step4: Please touch the reset key to run your code. Illustration Description: Start μVision® Project – Open Open the SYS.uvproj project file Start Debug mode When using the debugger commands, you may: Review variables in the watch window Single step through code Reset the device Run the application Project – Build Compile and link the SYS application Flash – Download Program the application code into onchip Flash ROM Mar 6, 2015 17 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 4-6 NuEdu-UNO- NUC131SD2AE Hardware Setup NUC131 5 Starting to Use NuEdu-UNO-NUC131SD2AE on the IAR Embedded Workbench 5.1 Downloading and Installing IAR Embedded Workbench Software Please connect to IAR company website (http://www.iar.com) to download the IAR Embedded Workbench and install the EWARM. 5.2 Downloading and Installing Nuvoton Nu-Link Driver Please connect to Nuvoton Company NuMicro™ (http://www.nuvoton.com/NuMicro) to download “NuMicro™ IAR Driver” file. Please refer to section 8.2 for the detail download flow. Nu-Link driver is downloaded, please unzip the file and execute Link_IAR_Driver.exe” to install the driver. 5.3 website EWARM After the the “Nu- Hardware Setup The hardware setup is shown in the following figure. If want use the VCOM function, please turn on the SW2 all pin ,can be use the VCOM function. Please refer the 3.1.8 section. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 5-1 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 18 of 36 Rev. 0.002 NUC131 5.4 Example Program This example demonstrates how to download and debug an application on a NuEdu-UNO- NUC131SD2AE board. The example file can be found in the directory list shown in the following figure. Step1: Open the Project Please open the under path. “C:\Nuvoton\BSP Library\NUC131BSP_CMSIS_v3.00.001\SampleCode\StdDriver\ADC_ResultM onitor\IAR” NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 5-2 NuEdu-UNO- NUC131SD2AE Hardware Setup Step2: Download the sample code Figure 5-3 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 19 of 36 Rev. 0.002 NUC131 Step3: Please touch the reset key to run your code. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 5-4 NuEdu-UNO- NUC131SD2AE Hardware Setup Illustration Description: Start IAR Embedded Workbench File-Open-Workspace Open the SYS.eww workspace file Project - Make Compile and link the SYS application Mar 6, 2015 Project – Download and Debug Program the application code into onchip Flash ROM Single step through code Reset the device Run the application 20 of 36 Rev. 0.002 NUC131 6 Starting to Use NuEdu-UNO-NUC131SD2AE on the Arduino IDE 6.1 Downloading and Installing Arduino IDE Software Please connect to the Arduino company website (http://arduino.cc/en/Main/Software) to download the Arduino IDE and install the file. Figure 6-1 Download Arduino 1.5.8 6.2 Installing Nuvoton Nu-Link Driver “NUC131_Patch_For_Arduino1.5.8” is Arduino IDE driver file. Please installation to Arduino file. If your Arduino file install version is greater than V1.5.8 maybe can use, but if any modfiy does not guarantee can be use the function. EX: Arduino IDE V1.6 version have modify SPI function, but the V1.5.8 version it no have the function, So if use the new SPI function maybe have problom. Mar 6, 2015 21 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-2 Extract Arduino 1.5.8 NUC131 Figure 6-3 Install NuMicro Arduino Patch 6.3 Installing NuLink USB Driver The “Nu-Link_USB_Driver 1.0” is Nu-Link me Driver, you can find the file in “Development tool\NuEdu UNO” path. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-4 Install NuLink USB Driver 6.4 Hardware Setup The hardware setup is shown in the following figure, and we need test your VCOM setting is OK, so you need will SW2 turn on by all pin, and next step. Figure 6-5 NuEdu-UNO- NUC131SD2AE Hardware Setup Mar 6, 2015 22 of 36 Rev. 0.002 NUC131 6.5 Test USB Device in the Device Manager If your device is unavailable, please installation NuLink USB driver again in the “C:\Program Files\Nuvoton Tools\ICPTool\Nu-Link_USB_Driver 1.0.exe” NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-6 USB device is unavailable Figure 6-7 Installation NuLink USB Driver Mar 6, 2015 23 of 36 Rev. 0.002 NUC131 6.6 Example Program This example demonstrates how to download and debug an application on a NuEdu-UNO-NUC131SD2AE board. When you installation the patch, can be found the “NuEdu-NUC131” in Arduino IDE as shown if figure below. Open the “arduino_debug.exe” file in the install path. Step1: selection chip NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-8 NuEdu-UNO-NUC131SD2AE Hardware Setup Step2: selection debug port Figure 6-9 NuEdu-UNO-NUC131SD2AE Hardware Setup Mar 6, 2015 24 of 36 Rev. 0.002 NUC131 Step3: Open the sample code File -> Examples -> 03.Analog -> AnalogInOutSerial Step4: Download the sample code User can use upload button to compiling and load code to target board or use verify button to compiling code. Upload: This button can be comiling and load code to target board. Verify: This button can be compiling code . Mar 6, 2015 25 of 36 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-10 NuEdu-UNO-NUC131SD2AE Hardware Setup NUC131 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-11 NuEdu-UNO-NUC131SD2AE Hardware Setup Step5: Check the correctness of the Baud Rate User can check Baud Rate whether the same serial monitor speed. This sample code is use ADC0 function, user can use the serial monitor shows VCOM through the value of the ADC conversion out. So user can use ADC0 to touch VDD or GND can be look the ADC conversion value. Mar 6, 2015 26 of 36 Rev. 0.002 NUC131 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-12 NuEdu-UNO-NUC131SD2AE Hardware Setup Mar 6, 2015 27 of 36 Rev. 0.002 NUC131 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Figure 6-13 NuEdu-UNO-NUC131SD2AE Hardware Setup Mar 6, 2015 28 of 36 Rev. 0.002 NUC131 7 NuEdu-UNO-NUC131SD2AE Schematics NuEdu-UNO-NUC131SD2AE Schematic 7.1 VCC C1 20p DVCC5 N7 1 2 3 4 R1 10K NC SW1 D12MI N5 RESET JP2 1 PUSH BOTTOM (B) 2 N6 Crystal C3 10uF/10V Reset 1 2 3 4 Power DVCC5 NC CLKO DVCC5 RESET 3VCC 3.3V 5VCC 5V GND VIN 1 2 3 4 5 6 7 8 PA.9 PA.8 VREF GND PB.13 PB.15 PA.12 PA.13 PA.14 PB.11 NU1 NC VDD MCU_RESET 3VCC 5VCC VSS VSS VIN header 2.54 1X10 母 (正面) 10 9 I2C1_SCL 8 I2C1_SDA 7 VREF 6 VSS 5 PWM11 4 PWM10 3 PWM9 2 PWM8 1 PWM7 PWM6 header 2.54 1X8 母 (正面) 3.3V 5V NU2 3.3V 5V 1 2 3 4 5 6 PA.0 PA.1 PA.2 PA.3 PA.4 PA.5 PE.5 PA.15 PA.11 PA.10 PF.5 PF.4 PB.1 PB.0 NU3 ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 1 3 5 7 P49 P51 P53 P55 P57 P59 P61 P63 header 2.54 1X8 母 (正面) 8 7 PWM5 6 PWM4 5 PWM3 4 PWM2 3 PWM1 2 PWM0 1 UART_TX0 UART_RX0 header 2.54 1X6 母 (正面) PC.2 PC.1 RESET PC.0 P1 P3 P5 P7 P9 P11 P13 P15 VCC D12MO D12MI TICERST RESET 3VCC 5VCC GND VREF ADAVSS DAVDD DVCC5 VIN CLKO D12MO D12MI ICERST RESET 3VCC 5VCC GND VREF ADAVSS DAVDD DVCC5 VIN CLKO JP1 D12MO X1 12MHz C2 20p DVCC5 DVCC5 JP3 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 NC JP5 1 3 5 7 9 11 13 15 NC 2 4 6 8 10 12 14 16 NU5 PB.[0:15] PC.[0:15] PC.[0:15] PD.[0:15] PD.[0:15] PE.[0:15] PE.[0:15] P17 P19 P21 P23 P25 P27 P29 P31 P50 P52 P54 P56 P58 P60 P62 P64 P33 P35 P37 P39 P41 P43 P45 P47 PF.[0:7] JP4 1 3 5 7 9 11 13 15 P18 P20 P22 P24 P26 P28 P30 P32 2 4 6 8 10 12 14 16 NC JP6 1 3 5 7 9 11 13 15 IO P34 P36 P38 P40 P42 P44 P46 P48 2 4 6 8 10 12 14 16 NC 2 4 6 8 LED DVCC5 PC.3 GND PB.9 2 IO1 GREEN 1 N4 R2 510 DVCC5 P18 2 IO2 RED 1 N3 R3 510 DVCC5 P2 2 IO3 RED 1 N2 R4 510 DVCC5 N1 R5 510 POWER1GREEN 2 1 IN GND OUT UP2 L78M05ACDT 1 2 3 D3 SS24A 1 2 DVCC5 P17 VIN 1 RB060L CT6 100uF/16V 2 C8 TANT-D DC-CON CB6 0.1u 0.1u J2 DVCC5 1 2 NC Title NuEdu-UNO for NUC131 Size Document Number Custom<Doc> Date: Mar 6, 2015 29 of 36 Thursday , February 26, 2015 Rev 1.4 Sheet 1 of 3 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL SPI0_MISO VCC SPI0_CLK SPI0_MOSI RESET GND SPI0_SS GPIO 2.5V to 5V power supply IN PA.[0:15] PB.[0:15] NU4 CON1 GND P[1:64] PA.[0:15] PF.[0:7] P2 P4 P6 P8 P10 P12 P14 P16 Arduino interface 2 P[1:64] Off-page Connector header 2.54 2X4 公(正面) 1 Off-page Connector NUC131 Nu-Link-Me Schematic 7.2 ICE CONNECT IF VCC VCC VCC TICEDAT TICECLK TICERST ICETX ICERX VIN 3VCC 5VCC AVSS R6 10K VCC 8P4RA IDLE1 1 RED U1 BUSY 1 GREEN 2 1 GREEN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ICELED RED GREEN CB2 0.1u AVDD 1 12M_O R7 33 INT0/PB14 CPO1/PB13 CPO0/PB12 X32I X32O I2C1SCL/PA11 I2C1SDA/PA10 I2C0SCL/PA9 I2C0SDA/PA8 RX1/PB4 TX1/PB5 RTS1/PB6 CTS1/PB7 LDO VDD VSS 12M_I PA4/ADC4 PA3/ADC3 PA2/ADC2 PA1/ADC1 PA0/ADC0 AVSS ICE_CLK ICE_DAT PA12/PWM0 PA13/PWM1 PA14/PWM2 PA15/PWM3 PC8/SS10 PC9/SPCLK1 PC10/SDI10 PC11/SDO10 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 RRSET1 100K RTCK1 100K RTDA1 100K ADAVSS ICE_chip_RST TICECLK RTDA20 RTDA333 TICEDAT SW2 M0_TXD M0_RXD 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 RXD TXD VBUS CB3 0.1u 2 5V 3.3V N13 SS24A OUT PD1 1 2 4 USBVBUS IN GND OUT R12 R11 1 2 3 2 1 UP1 AMS1117-3.3V 33 33 N12 5VCC JPR1 2&3 (0 ohm) 3VCC VCOM Switch VCOM_pin CP1 10uF/10V D4 ICE_chip_RST 1 2 mini USB 5pin DM DP 1 2 3 4 5 VCC DM DP NC GND J1 SHIELD SHIELD SHIELD SHIELD 6 7 8 9 VCC_connect TICEDAT TICECLK TICERST SS24A 3.3V 5V VCC_connect 3.3V 5V VCC_connect JP9 1 3 5 7 9 3.3V 5V 2 4 6 8 10 M0_TXD M0_RXD NC SWD connect FERRITE BEAD USBVBUS DM DP JP8 L5 1 2 3 4 Title NuLink Me Size Document Number Custom<Doc> Rev 3.0 NC Date: Mar 6, 2015 VCC D2 1 SS24A VCOM_pin ICE_RX ICE_TX USBVBUS ICE_TX ICE_RX VCC ICE_DAT ICE_CLK ICE_RST ICE_CLK ICE_DAT VCC_connect USB_DUSB_D+ R9 0 R10 0 C7 0.1u 3 1 2 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL USBVBUS VCC JP7 HPS604-E ADAVSS DEBUG 1 2 3 4 5 VCC ON L4FERRITE BEAD 20p X2 12MHz C6 20p N15 1 2 3 4 L3FERRITE BEAD C5 NC NUC12SRE3DE VCC N14 R8 NC VBUS VDD33 DD+ PB0/RX0 PB1/TX0 PB2/RTS0 PB3/CTS0 PC3/SDO00 PC2/SDI00 PC1/SPCLK0 PC0/SS00 PE5 PB11/TM3 PB10/SS01/TM2 PB9/SS11/TM1 2 1 VCC CT2 1uF/16V AVDD C4 10uF/10V 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 2 ICE_RST STADC/TM0/PB8 PVSS VDD1 VSS1 /RESET XT1_In XT1_Out INT1/PB15 CPP1/PC14 CPN1/PC15 CPP0/PC6 CPN0/PC7 AVDD ADC7/PA7 ADC6/PA6 ADC/PA5 RED PVSS 2 1 RED NUC_RST# 12M_I 12M_O ICE1 ICELED 2 NUC_RST# RP1 1 8P4R-510 2 3 4 5 6 7 8 VCC TICEDAT TICECLK TICERST M0_TXD M0_RXD VIN 3VCC 5VCC AVSS GND 30 of 36 Thursday , February 26, 2015 Sheet 2 of 3 Rev. 0.002 NUC131 NuEdu-UNO-NUC131SD2AE Schematic 7.3 Off-page Connector P[1:64] ADAVSS PA.4 PA.3 PA.2 PA.1 PA.0 DAVSS ICE_CLK ICE_DAT PA.12 PA.13 PA.14 PA.15 PC.8 PC.9 PC.10 PC.11 DAVDD L6FERRITE BEAD 1 DVCC5 P48 P47 P46 P45 P44 P43 P42 P41 P40 P39 P38 P37 P36 P35 P34 P33 2 PB.[0:15] PC.[0:15] PC.[0:15] PD.[0:15] PE.[0:15] PE.[0:15] PF.[0:7] ADC4/PA.4 ADC3/PWM1_CH1/UART3_RXD/PA.3 ADC2/PWM1_CH0/UART3_TXD/PA.2 ADC1/PWM0_CH5/I2C1_SDA/UART5_RXD/PA.1 ADC0/PWM0_CH4/I2C1_SCL/UART5_TXD/PA.0 AVSS ICE_CLK/PF.6 ICE_DAT/PF.7 PWM0_CH0/UART5_RXD/PA.12 PWM0_CH1/UART5_TXD/PA.13 PWM0_CH2/PA.14 PWM0_CH3/PA.15 PWM0_BRAKE0/PC.8 PWM0_BRAKE1/PC.9 PWM1_BRAKE0/PC.10 PWM1_BRAKE1/PC.11 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 U2 VREF ADAVSS 1 2 VREF1 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 PA.5/UART3_RXD/ADC5 PA.6/UART3_TXD/ADC6 PA.7/Vref /ADC7 AVDD PC.7/PWM0_BRAKE1/I2C0_SCL/UART4_RXD PC.6/PWM0_BRAKE0/I2C0_SDA/UART4_TXD PC.15 PC.14 PB.15/TM0/TM0_EXT/INT1 PF.0/PWM1_CH4/XT1_OUT PF.1/BPWM1_CH5/XT1_IN nRESET VSS VDD PF.8/CLKO PB.8/BPWM1_CH2/CLKO/TM0/STADC DVCC5 D12MO D12MI VREF DVCC5 ADAVSS DAVDD CLKO TICEDAT TICECLK TICERST GND VCC_connect M0_TXD M0_RXD 3.3V 5V TM1/PB.9 TM2/PB.10 TM3/PWM0_CH4/PB.11 TM1_EXT/TM1/PWM0_CH5/PE.5 SPI0_SS0/BPWM0_CH0/PC.0 SPI0_CLK/BPWM0_CH1/PC.1 SPI0_MISO0/BPWM0_CH2/PC.2 SPI0_MOSI0/BPWM0_CH3/PC.3 UART2_TXD/BPWM0_CH4/PD.15 UART2_RXD/BPWM0_CH5/PD.14 BPWM1_CH0/PD.7 BPWM1_CH1/PD.6 UART0_nCTS/TM3_EXT/TM3/PWM1_BRAKE0/PB.3 UART0_nRTS/TM2_EXT/TM2/PWM1_BRAKE1/PB.2 UART0_TXD/PB.1 UART0_RXD/PB.0 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 P32 P31 P30 P29 P28 P27 P26 P25 P24 P23 P22 P21 P20 P19 P18 P17 PB.9 PB.10 PB.11 PE.5 PC.0 PC.1 PC.2 PC.3 PD.15 PD.14 PD.7 PD.6 PB.3 PB.2 ICETX ICERX VCC_connect ICETX ICERX 3.3V 5V PB.1 PB.0 PB.14 PB.13 PB.12 PF.5 PF.4 PA.11 PA.10 PA.9 PA.8 PB.4 PB.5 PB.6 PB.7 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 DVCC5 P15 GND P16 NUC131SD2AE_LQFP64 ICETX ICERX NC 2 4 6 8 10 VCC_connect ICE_DAT ICE_CLK RESET GND CT5 1uF/16V 2 DVCC5 JP10 1 3 5 7 9 1 DVCC5 3.3V 5V CB5 0.1u SWD Interface Title NuEdu-UNO for NUC131 Size Document Number Custom<Doc> Date: Mar 6, 2015 31 of 36 Thursday , February 26, 2015 Rev 1.4 Sheet 3 of 3 Rev. 0.002 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL PB.14/INT0 PB.13 PB.12/CLKO/BPWM1_CH3 PF.5/I2C0_SCL/PWM1_CH5 PF.4/I2C0_SDA/PWM1_CH4 PA.11/I2C1_SCL/PWM1_CH3 PA.10/I2C1_SDA/PWM1_CH2 PA.9/I2C0_SCL/UART1_nCTS PA.8/I2C0_SDA/UART1_nRTS PB.4/UART1_RXD PB.5/UART1_TXD PB.6/UART1_nRTS PB.7/UART1_nCTS LDO_CAP VDD VSS 2 DAVSS 1 N10 PF.[0:7] D12MO D12MI VREF DVCC5 ADAVSS DAVDD CLKO ICE_DAT ICE_CLK RESET GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PA.5 P49 PA.6 P50 PA.7 P51 DAVDDP52 FERRITE BEAD PC.7 P53 DAVDD PC.6 P54 CT4 10uF/10V PC.15 P55 PC.14 P56 PB.15 P57 D12MO P58 D12MI P59 RESET P60 ADAVSS P61 DVCC5 N11 P62 P63 CLKO PB.8 P64 CB4 0.1u 0 ohm L8 DAVDD PA.[0:15] PB.[0:15] PD.[0:15] L7FERRITE BEAD DAVSS CT3 10uF/10V P[1:64] PA.[0:15] NUC131 8 Downloading NuMicro™ Related Files from Nuvoton Website 8.1 Downloading NuMicro™ Keil μVision® IDE Driver Step1 ™ Visit the Nuvoton NuMicro website: http://www.nuvoton.com/NuMicro. 2-1. Move to “Support” Step2 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Step3 Mar 6, 2015 2-2. Click here to enter Tool & Software Click here to enter Software download page 32 of 36 Rev. 0.002 NUC131 Click here to download the file. Step4 Step5 ™ ® Download the NuMicro Keil μVision IDE driver. 8.2 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Table 8-1 Pin Assignment for NuEdu-UNO-NUC131SD2AE Downloading NuMicro™ Keil μVision® IDE Driver Step1 ™ Visit the Nuvoton NuMicro website: http://www.nuvoton.com/NuMicro. 2-1. Move to “Support” Step2 Mar 6, 2015 2-2. Click here to enter Tool & Software 33 of 36 Rev. 0.002 NUC131 Click here to enter Software download page Step3 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Step4 Click here to download the file. Step5 ™ Download the NuMicro IAR EWARM driver. Table 8-2 Pin Assignment for NuEdu-UNO-NUC131SD2AE Mar 6, 2015 34 of 36 Rev. 0.002 NUC131 9 Revision History Date Revision Description 2015.03.02 0.001 1. Engineers version 2015.03.06 0.002 1. Increase example step for Arduino, keil and IAR development tool. 2. Modify the schematic. NUMICRO™ NUEDU-UNO FOR NUC131 SERIES USER MANUAL Mar 6, 2015 35 of 36 Rev. 0.002 NUC131 NUMICRO™ NUEDU-UNO FOR NUC131 SERIES 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. Mar 6, 2015 36 of 36 Rev. 0.002