NuMicro MCU Learning Board Introduction

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

PBv2.x Pen F/W Upgrade SOP
JED Microprocessors Pty Ltd Presenting the JED T430 low-cost Projector Controllers Nov 22nd, 2009.
BEST Robotic, Inc. easyC Team Training
LOGO Lab Supervisor – Dr. WH Lau EE3271 Design Laboratory.
UNIT 04 Nuvoton MCU 로봇 SW 교육원 조용수.
Lab7: Introduction to Arduino
LOGSYS Development Environment of Embedded Systems Tamás Raikovich Béla Fehér Péter Laczkó Budapest University of Technology and Economics Department of.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
Handheld Mastermind Senior Design Projects II Carl Kelso, Mike Ellis, Ryan Shon.
Using PDG with e2studio: Example
Asst. Prof. Dr. Alper ŞİŞMAN
Dr. Hoganson CSIS HC11 Demo Program This is our first lab using the 68HC11 microcontroller. We will “talk” to the microcontroller from a PC, run.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Silicon Labs ToolStick Development Platform
Department of Electrical Engineering, National Taiwan Ocean University NuMicro Learning Board Introduction 1/29/2015 Richard Kuo Assistant.
RemoteDrive. OVERVIEW OVERVIEW The RemoteDrive is a special software running on Windows TM and controlling the devices manufactured by Elettronica Santerno.
Configuring the MagicInfo Pro Display
Getting Started Installing GreenHills and Net+OS Setting up the Development Board Building the Sample Application.
Holtek 32-bit MCU Promotion
AT91SAM9261-EK WinCE 6.0 DEMO ATMEL AT91 Application & Support Group
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Project Futura.
2/26/2015 Richard Kuo Assistant Professor
Universal Asynchronous RX/TX
High Speed Data Converter University
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 3/7/2013 Richard.
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
Department of Electrical Engineering, National Taiwan Ocean University Pulse Width Modulation 4/25/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University Motor Control 5/2/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University C Programming 3/14/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University Analog-to-Digital Converter (ADC) 4/18/2013 Richard Kuo Assistant.
BEST Robotic, Inc. easyC Breakout Session By: Guy Chetrit Programming With easyC September 15, Copyright © 2012 BEST Robotics, Inc. All rights reserved.
Department of Electrical Engineering, National Taiwan Ocean University LCD Display 3/28/2013 Richard Kuo Assistant Professor.
UART: Universal Asynchronous RX/TX
Department of Electrical Engineering, National Taiwan Ocean University Appendix – NUC140 pin assignment 9/29/2012 Richard Kuo Assistant.
Cortex-M0 MCU Interface and Driver Design - Course Overview
Department of Electrical Engineering, National Taiwan Ocean University Basic Electronics 3/7/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University Universal Serial Bus & SD card 5/30/2013 Richard Kuo Assistant.
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 1/29/2015 Richard.
Department of Electrical Engineering, National Taiwan Ocean University Timer/WatchDog /RTC 4/11/2013 Richard Kuo Assistant Professor.
Serial Peripheral Interface
Features : VMAX-MIPI is a pattern generator which supports Full-HD resolution. VMAX-MIPI has one MIPI connector(29Pin), 4 programmable power. PC to USB.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
General Purpose Input/Output
ChibiOS/RT Demo A free embedded RTOS
Introduction to Labs Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
Teaching Digital Logic courses with Altera Technology
AAPT workshop W03 July 26, 2014 Saint Cloud State University, MN, USA
Microcontrollers JULES CALELLA. Microcontrollers vs Microprocessors  Microprocessors – do not contain RAM, ROM, I/O  Microcontrollers – The whole package.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Department of Electrical Engineering, National Taiwan Ocean University I2C Bus 5/16/2013 Richard Kuo Assistant Professor.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Arduino.
3/6/2017 Richard Kuo Assistant Professor
Making a 24hr Timer.
Outline Introduction to NuMaker TRIO Programming environment setup
Serial Peripheral Interface
The first change to your project files that is needed is to change the device to the correct FPGA. This is done by going to the Assignments tab on the.
Microcontrollers & GPIO
Microcontroller Applications
PC Mouse operated Electrical Load Control Using VB Application
NuMicro MCU New Project Express Creation
Future Designs, Inc. Your Development Partner
8051 Micro Controller.
Software Setup & Validation
Introduction to Arduino
Introduction to arduino
Presentation transcript:

NuMicro MCU Learning Board Introduction 3/7/2013 Richard Kuo Assistant Professor

Outline NuMicro NUC140 Learning Board Nu-LB-NUC140 schematics SDK installation Learning Board Basic Sample Package Keil Development Environment Setup

NuMicro MCU Learning Board (Nu-LB-NUC140) ICE Bridge Nu-Link CAN/LIN UART 5V DC Power USB Device WAU8822 Codec EEPROM SPI Flash NUC140VE3AN Line out LED Line in Reset 3x3 Key Matrix SW int GPIO Buzzer Variable Resistance

NuMicro MCU Learning Board (bottom view) SD Card

Learning Board Power Supply Basic Supply Voltage is 5V, there are 3 ways to supply power : ICE_USB : mini USB connector for on-board NuLink ICE CON5: DC supply connector POWER1: VCC & GND pins (beside CON5) J3: mini USB of NUC140 device Learning Board provide +5V, +3.3V power on the lower-right side 3VVC1 = 3.3V, 5VCC1 = 5V, VCC = 5V, GND1 = GND max. current is depending on the power supply source, if connecting to PC USB port, its current is about 500mA Note: During the excerise/experiement, PC may cut off power of USB port if short circuit happens. Please reset the PC to resume the power supply from USB port.

Learning Board Connectors VCC5 = +5V, VCC33 = +3V ICE_USB: NuLink’s miniUSB port for connecting to PC CON2: RS232 port CON5 : DC power supply (+5V) SW_POW : DC power switch (on/off control of CON5 to board) POWER1 : System Power connector pins (for jumping wire to power the board when use external voltage converter as power supply) J3 : NUC140 USB port (when NUC140 serve as USB device) J1 : audio output (connect to earphone) J2 : audio input (connect to mic) RESET : reset button (below on-board LCD) SW_INT : soft interrrupt button (below RESET button)

Learning Board function and used pins

NU-LB-NUC140 Pin & Function Block Pin Function ICE Bridge Nu-Link ICE_CLK ICE_DATA SWD interface UART GPB0 GPB1 UART0 Rx UART0 Tx WAU8822 codec GPC0 GPC1 GPC2 GPC3 GPA15 I2SLRCLK I2SBCLK I2SDI I2SDO I2SMCLK GPA8 GPA9 I2C0 SDA I2C0 SCL GPE14 Line out Enable/Disable GPE15 Line in plug in/out detect Key GPB15 GPB15 INT1

NU-LB-NUC140 Pin & Function Block Pin Function CAN GPD6 GPD7 CAN0 Rx CAN0 Tx GPB12~13 CAN transceiver speed LIN GPB4 GPB5 UART1 Rx UART1 Tx GPB6 LIN transceiver wakeup function GPB7 LIN transceiver Enable/Disable 7-Seg LED GPE0~7 Row GPC4~7 Column Black Dot Matrix LCD Panel GPD8 GPD9 GPD10 GPD11` SPI3 SS30 SPI3 SPCLK LCD Reset SPI3 MOSI0 GPD14 Background Enable/Disable

NU-LB-NUC140 Pin & Function Block Pin Function Variable Resistance GPA7 ADC interface Buzzer GPB11 PWM4 Key Matrix GPA0~5 GPIO Reset RESET EEPROM GPA10 GPA11 I2C1 SDA I2C1 SCL FLASH GPD0 GPD1 GPD2 GPD3 GPD4 GPD5 SPI2 SS20 SPI2 SPCLK SPI2 MISO0 SPI2 MOSI0 SPI2 MISO1 SPI2 MOSI1

NU-LB-NUC140 Pin & Function Block Pin Function LED GPA12 GPA13 GPA14 PWM0 PWM1 PWM2 GPC12~15 GPIO SD card GPD12 GPD13 SD card Power Enable/Disable SD card insert detection GPC8 GPC9 GPC10 GPC11 SPI1 SS10 SPI1 SPCLK SPI1 MOSI0 SPI1 MISO0

Learning Board Schematics 7-segment schematic 64x128 LCD schematic RGB LED schematic Keypad & SW_INT schematic UART/RS232 schematic I2C & Buzzer schematic SPI schematic PS2 & ADC schematic I2S schematic CAN&LIN schematic SD card schematic

7 segment schematic GPE0~7, GPC4~7

64x128 LCD schematic GPD8~11

RGB LED schematic GPA14 control Red color GPA13 control Green color Output low to enable R/G/B LEDs

Red LED schematic GPC12,13,14,15 (output low to enable LED)

Keypad & SW_INT schematic GPA0~5 GPB15

UART/RS232 schematic GPB0,1

I2C & Buzzer schematic GPA10,11 GPB11

SPI schematic GPD0~5

PS2 & ADC schematic GPA7

I2S schematic GPA8,9 GPA15 GPC0~3

CAN&LIN schematic CAN : GPD6,7 LIN : GPB4~7

SD card schematic GPD12,13 GPC8~11

Learning Board GPIO pin assignment NuMicro MCU Learning Board has 5 group of GPIO pin : GPIOA, GPIOB, GPIOC, GPIOD, GPIOE They are named GPA, GPB, GPC, GPD, GPE Sample code use E_GPA, E_GPB, E_GPC, E_GPD, E_GPE as its defined port name GPIO pins are allocated at the pins at the lower part of the learning board : J4, J5, J6, J7, J8 You can jump wire to external device with these pins

GPIO group A, B JP4: GPIOA JP5 : GPIOB

GPIO group C, D JP6 : GPIOC JP7 : GPIOD

GPIO group E JP8 : GPIOE

NuLink ICE used with PC NuLink ICE is built-in on board with miniUSB connector

SDK Installation Before connecting NuMicro MCU Learning Board to PC, you will need install the following : Keil/IAR Tools (for program editting, compiling, debugging) NuLink device driver (NuLink USB driver for PC) Nuvoton BSP (Learning board sample codes from Nuvoton) After the above installation, you can connect the miniUSB port of NuLink (upper side of the NUC140 learning board) , and Build (compile) your sample code into binary file, and Download (burn) thru NuLink to NUC140 on the learning board Then press Reset button to execute the new code inside NUC140 Or you can unplug and reconnect USB cable which is also reset the entire system to restart with new code Nuvoton provide NuMicro SDK CDROM with free software tools & sample codes, you can also download the latest driver and sample code from www.nuvoton.com

Quick New Project Creation (Keil example) Create a new project folder Smpl_newproj Copy 3 files from old sample project smpl_old.uvproj smpl_old.uvopt smpl_old.c Rename 3 files into new sample name smpl_new.uvproj smpl_new.uvopt smpl_new.c Change to new project folder, double click on smpl_new.uvproj the error message show up is smpl_old.c is missing (because we rename it to smpl_new.c) Move cursor to the left side of the Keil window Point to smpl_old.c & right mouse click, a menu will show up, please choose “remove from the project” Point cursor to Source Files, and right mouse click, a file window will show up, then select smpl_new.c to add into the project Source Files Point cursor to window left top corner, and revise the project name from smpl_old to smpl_new

Build and Download Binary Code into MCU At Keil project window, top menu select Flash , select Configure Flash Tools… it will show up a configuration window : Options for Target ‘Smpl_new’ select Output, and rename Smpl_old to Smpl_new select Target to confirm the correct Target Device is Nuvoton NUC140VE3AN (learning board MCU) select Debug to use Nu-Link Debugger select Utilities to use Target Driver Nu-Link Debugger select OK on the bottom of the configuration window To build project (compile C code into binary code) Keil command menu,press F7 / Build Target , or select Project and select Build Target If shown 0 error on the console (the bottom of project window), the binary code will be generated, Else you need to debug the error Click on the error message in the console, it will takes you to the line of error code To download binary code into MCU chip Press Download, or menu select Flash and select Download

Setup for using printf function NuMicro has a printf function of C for MCU, the following steps will direct printf output to UART0 : Step 1. startup_NUC1xx.s line #10 FALSE changed to TRUE SEMIHOSTED SETL {TRUE} Step 2. retarget.c around line #20 to add #define DEBUG_ENABLE_SEMIHOST (also retarget.c need to be added to Library Files of the current project, retarget.c can be found in src/NUC1xx-LB_002/ ) Step 3. add printf statement into the C code printf will print message to UART0, so it will slow down the program due to using UART0 to PC, so we recommend to remove printf statement after debug is done Step 4. Build project and Download code into MCU Step 5. Open Debugger Session of Keil, and open UART1 of view window Step 6. Run (F5)

Basic Sample Package Smpl_ADC_PWM : ADC input to control PWM output NUC100SeriesBSP\NuvotonPlatform_Keil\Sample\NUC1xx-LB_002\ Smpl_ADC_PWM : ADC input to control PWM output Smpl_Capture : PMW input (GPA13,14), Catpure Input (GPA12) Smpl_FATFS_SDCard : build FAT system and read SDCard Smpl_FMC : reset button to boot in AP (ICP mode), soft Interrupt button to boot in LDROM (ISP mode) Smpl_HID_IO : PC run HID application to control LEDs on learning board Smpl_I2C_24LC64 : press 3x3 keypad to control read/write 8KB EEPROM (24LC64) Smpl_Interrupt : press soft interrupt buttong to control LED flashing Smpl_LIN_Master : LIN bus master program code Smpl_LIN_Slave : LIN bus slave program code Smpl_SPI_Flash_PDMA : SPI read 16MB flash memory (W25Q16) Smpl_SPI_Flashx2 : SPI dual-wire mode to read 16MB flash memory (W25Q16) Smpl_Start_Kit : starter kit example, it will display message on LCD and 7 segment LEDs Smpl_Timer_WDT_RTC : Timer, WatchDog Timer, RTC alarm, and display RTC time Smpl_UAC : PC play mp3 file, and USB port to learning board output to earphone jack Simpl_UDC : USB to SDCard Smpl_VCOM : USB Virtual Com. port

Smpl_ADC_PWM System Diagram Flash Cortex-M0 SPI ADC Value: 277 LCD Panel PWM0 LED NUC140V3AN Function: adjusting VR1 to change PWM frequency and control LED flashing

Smpl_Capture System Diagram LCD Panel Capture demo High:683usec Low: 683usec SPI Flash Capture0 Cortex-M0 PWM1 PWM2 NUC140V3AN Function : PWM pins perform to capture input

Smpl_Capture Pin Usage Input Channel:GPA12 Counter unit: 1usec (((11+1)*1)/12M) Capture capability: 32 bits (hardware 16bits+ firmware 16bits) PWM1 Output Channel:GPA13 Period: 1.049 sec (((11+1)*16*(65535+1))/12M) High level: 262msec, Low level: 786msec PWM2 Output Channel:GPA14 Period: 1365.3 usec (((1+1)*1*(8191+1))/12M) High level: 682usec, Low level: 682usec LCD Display Capture0 result

Smpl_FMC function description MCU boot in APROM LED rotates left Press SW_INT to ISP function and Boot from LD MCU boot in LDROM MCU reset, after MCU boot in LDROM LED rotates right and flash reset button to boot in AP (ICP mode), soft Interrupt button to boot in LDROM (ISP mode)

Smpl_I2C_24LC64 System Diagram Flash Cortex-M0 I 2 C SCL I 2 C _ CLK I 2 C 24 LC 64 I 2 C _ DATA I 2 C SDA NUC140V3AN Function: using I2C to read/write EEPROM (24LC64)

Smpl_SPI_Flash_PDMA System Diagram SPICLK2 MISO20 MOSI20 SPISS20 CLK DO DI /CS SPI-Flash (W25Q16BV) SPI2 NUC140V3AN PDMA Function : using SPI to read/write 16MB flash memory (W25Q16)

Smpl_SPI_Flash_PDMA SPI setting Master mode One channel data in/out SPI clock rate 1MHz Transmit data at negative edge Receive data at positive edge Disable the auto slave select Slave select is active low SPICLK2(GPD1) <--> SPI-Flash0_CLK (pin 6) MISO20(GPD2) <--> SPI-Flash0_DO (pin 2) MOSI20(GPD3) <--> SPI-Flash0_DI (pin 5) SPISS20(GPD0) <--> SPI-Flash0_/CS (pin 1)

Smpl_SPI_Flashx2 System Diagram SPICLK2 MISO20 MOSI20 MISO21 MOSI21 SPISS20 CLK DO DI /CS SPI-Flash (W25Q16BV) SPI2 NUC140V3AN SPI-Flash (W25Q16B) Function : using SPI dual-wire mode to read/write flash memory (W25Q16)

Smpl_UAC System Diagram PC USB Flash WAU8822 Cortex-M0 I 2 C 2C0SCL I2C0SDA I 2 S 2SDI I2SDO NUC140V3AN Function : MP3 player,PC play mp3 file and send audio data to USB, NuMicro learning board receive data from USB and use I2S send to audio codec (WAU8822), then output to earphone or speaker

Smpl_UDC System Diagram PC USB Flash SD card Cortex-M0 SPI NUC140V3AN Function : USB SDcard reader

General Disclaimer The Lecture is strictly used for educational purpose. MAKES NO GUARANTEE OF VALIDITY The lecture cannot guarantee the validity of the information found here. The lecture may recently have been changed, vandalized or altered by someone whose opinion does not correspond with the state of knowledge in the relevant fields. Note that most other encyclopedias and reference works also have similar disclaimers. No formal peer review The lecture is not uniformly peer reviewed; while readers may correct errors or engage in casual peer review, they have no legal duty to do so and thus all information read here is without any implied warranty of fitness for any purpose or use whatsoever. Even articles that have been vetted by informal peer review or featured article processes may later have been edited inappropriately, just before you view them. No contract; limited license Please make sure that you understand that the information provided here is being provided freely, and that no kind of agreement or contract is created between you and the owners or users of this site, the owners of the servers upon which it is housed, the individual Wikipedia contributors, any project administrators, sysops or anyone else who is in any way connected with this project or sister projects subject to your claims against them directly. You are being granted a limited license to copy anything from this site; it does not create or imply any contractual or extracontractual liability on the part of Wikipedia or any of its agents, members, organizers or other users. There is no agreement or understanding between you and the content provider regarding your use or modification of this information beyond the Creative Commons Attribution-Sharealike 3.0 Unported License (CC-BY-SA) and the GNU Free Documentation License (GFDL);

General Disclaimer Personality rights Trademarks Any of the trademarks, service marks, collective marks, design rights or similar rights that are mentioned, used or cited in the lectures are the property of their respective owners. Their use here does not imply that you may use them for any purpose other than for the same or a similar informational use as contemplated by the original authors under the CC-BY-SA and GFDL licensing schemes. Unless otherwise stated , we are neither endorsed by nor affiliated with any of the holders of any such rights and as such we cannot grant any rights to use any otherwise protected materials. Your use of any such or similar incorporeal property is at your own risk. Personality rights The lecture may portray an identifiable person who is alive or deceased recently. The use of images of living or recently deceased individuals is, in some jurisdictions, restricted by laws pertaining to personality rights, independent from their copyright status. Before using these types of content, please ensure that you have the right to use it under the laws which apply in the circumstances of your intended use. You are solely responsible for ensuring that you do not infringe someone else's personality rights.