Cortex-M0 MCU Interface and Driver Design - Course Overview 2/21/2013 Richard Kuo Assistant Professor
Why Learning Microcontroller ? Microcontrollers Are Everywhere !
MCU Interfacing & Programming ICE (Nu-Link) PC IDE Peripheral Devices
MCU Block Diagram - Simplified Memory CPU I/O GPIO Flash ROM Interfaces UART I2C SPI PWM Cortex-M0 50MHz SRAM ADC
MCU Block Diagram - Detail
Course Outline Lesson 0. NuMicro MCU Overview & Introduction Lesson 1. NuMicro Learning Board & SDK Lesson 2. Basic Electronics Lesson 3. C Programming Lesson 4. GPIO (General Purpose I/O) Lesson 5. LCD (on-board LCD) Lesson 6. Timer/Watch-Dog Timer/Real-Time-Clock Lesson 7. ADC (Analog-to-Digital)
Course Outline Lesson 8. PWM (Pulse Width Modulation) Lesson 9. Motor Control Lesson 10. UART (Universal Asynchronous Receiver/ Transmitter) Lesson 11. I2C (Inter-Integrated Circuit) bus Lesson 12. SPI (Serial Peripheral Interface) Lesson 13. USB (Universal Serial Bus) & SDcard Lesson 14. CAN (Controller Area Network)
Lesson 0. NuMicro MCU Course Overview Course Introduction 0._NuMicro_MCU_Course_Overview.ppt ARM Cortex-M0 Introduction 0.ARM_CortexM0_Intro.ppt NuMicro NUC140 Technical Reference Manual 0. NuMicro_NUC140_Technical_Reference_Manual.pdf NuMicro CMSIS Introduction 0.NuMicro_CMSIS_Intro.ppt
Lesson 1. NuMicro Learning Board & SDK NuMicro Learning Board User Guide (including Schematics) 1.Nu-LB-NUC140_User_s_Guide_v2.0.pdf NuMicro Learning Board Usage Introduction 1.NuMicro_MCU_Learning_Board_Introduction.ppt NuMicro Learning Board SDK Installation 1.NuMicro_MCU_Learning_Board_SDK_Installation.ppt Exercise : Smpl_Start_Kit C:\Nuvoton\BSP Library\NUC100SeriesBSP_v1.05.001\NUC100SeriesBSP\NuvotonPlatform_Keil\Sample\NUC1xx-LB_002\Smpl_Start_Kit
Lesson 2. Basic Electronics 2.Basic_Electronics.ppt Electronic Fundamental Laws Electronic Tool/Equipment Basic Components Introduction Resistor Light Emitting Diode (LED) Oscillator Transistor Operational Amplifier (OP Amp) Ultrasound Sensor Circuit
Lesson 3. C Programming C Programming 3. C_programming.ppt Computer Architecture Introduction and Basic C Features Data Type and Operators Functions and Macro Exercise : GPIO to control on-board LEDs (Smpl_GPIO_LED) Exercise : GPIO using macro (Smpl_GPIO_LED1_macro) Exercise : GPIO to control RGB LED (Smpl_GPIO_RGBled) Exercise : GPIO to control Buzzer on/off (Smpl_GPIO_Buzzer) Exercise : GPIO to control 7-segment display (Smpl_7seg)
Lesson 4. General Purpose Input/Output Cortex-M0 MCU General Purpose Input/Output 4.NuMicro_GPIO.PPT Exercise : GPIO to scan 3x3 keypad (Smpl_7seg_Keypad) Exercise : GPIO controlled by 3x3 keypad (Smple_GPIO_Keypad) Exercise : GPIO to read Body Infrared Sensor (Smpl_GPIO_BodyInfrared) Exercise : GPIO connecting to LCM16x2 (Smpl_GPIO_LCM16x2) Exercise : GPIO interface to 16x16 LED Matrix (Smpl_GPIO_LED16x16)
Lesson 5. LCD display NuMicro MCU Learning Board’s LCD display 5.NuMicro_LCD.ppt Exercise: LCD display - Text mode (Smpl_LCD_Text) Print text on LCD 128x64 Exercise: LCD display – Text mode (Smpl_LCD_Keypad) Keypad input to display text on LCD Exercise: LCD display – Graphic mode (Smpl_LCD_Bmp) Display bitmap on LCD 128x64 Exercise: LCD display – Graphic mode (Smpl_LCD_Graphics) Draw Line/Circle on LCD 128x64 To design a LCD Driver (Driver_LCD.c)
Lesson 6.Timer/Watch-Dog Timer/RTC NuMicro MCU Timer/Watch-Dog Timer/RTC 6.NuMicro_Timer_WatchDog_RTC.ppt Exercise: Timer – one-shot、periodic、continuous (Smpl_Timer) set Timer 0,1,2,3 at different counting frequency and display on LCD Exercise: Watch-Dog Timer (Smpl_WDT) Set Watch-Dog Timer at 10KHz Exercise: Real-Time Clock (Smpl_RTC) set RTC alarm & display RTC time Exercise: using Timer + WatchDog Timer + RTC alarm (Smpl_Timer_WDT_RTC) Use Timer & WatchDogt Timer & RTC all in one program To design a Timer Driver (Driver_Timer.c)
Lesson 7. Analog-to-Digital Conversion Analog-to-Digital Conversion Introduction 7.NuMicro_ADC.ppt Exercise:using ADC to read variable resistor (Smpl_ADC_VR1) Exercise:using ADC to read thermistor (Smpl_ADC_Thermistor) Exercise : using ADC to read resistive touch panel (Smpl_ADC_Touch) To design a ADC Driver (Driver_ADC.c)
Lesson 8. Pulse Width Modulation PWM Introduction 8.NuMicro_PWM.ppt Exercise:using PWM to generate tone (Smpl_PWM_Tone) To use oscilloscope to observe the output waveform Exercise:using PWM to output to speaker (Smpl_PWM_stereo) Add a transistor to driver external speaker Exercise : using PWM with Keypad to select different tone to output to speaker (Smpl_PWM_Tone_Keypad) Use ScanKey driver to get input from 3x3 keypad Use PWM to generate tone To design a PWM driver (Driver_PWM.c)
Lesson 9. Motor Control Motor Control Introduction 9.NuMicro_Motor_Control.ppt Exercise:Stepping Motor control using GPIO (Smpl_GPIO_StepMotor) Exercise : DC servo control using PWM (Smpl_PWM_DCServo) Exercise:DC motor control using GPIO (Smpl_GPIO_DCmotor)
Lesson 10. UART (Universal Asynchronous Receiver / Transmitter) UART Introduction 10.NuMicro_UART.ppt Exercise:Interfacing with Ultrasound sensor module (Smpl_UART0_SRF04) Exercise:Interfacing with Bluetooth module (Smpl_UART0_HC05) Exercise:Reading Ultrasound sensor and transmit data to Bluetooth (Smpl_UART_BT_US100) To design an UART Driver (Driver_UART.c)
Lesson 11. I2C bus I2C Bus Introduction 11.NuMicro_I2C.ppt Exercise: I2C interface with Temperature Sensor IC (Smpl_I2C_TMP100) Exercise: I2C interface with 3-axis accelerometer (Smpl_I2C_MMA7445) Exercise: I2C interface with 3-axis Gyroscope (Smpl_I2C_L3G4200) Exercise: I2C interface with 3-axis Accelero + Gyro (Smpl_I2C_MPU6050) To design an I2C driver (Driver_I2C.c) To design device driver for above sensors
Lesson 12. SPI (Serial Peripheral Interface) SPI Bus Introduction 12.NuMicor_SPI.ppt Exercise : use SPI interface to LCD 128x64 (Smpl_SPI_QC12864B) Exercise: use SPI read/write SPI Flash (Smpl_SPI_Flash) Exercise: use SPI & PDMA access SPI Flash (Smpl_SPI2_Flash) Exercise : use SPI interface with RF2.4GHz (Smpl_SPI_RF24L01) To design a SPI driver (Driver_SPI.c) To design device drivers for LCD128x64, SPI Flash, RF2.4G
Lesson 13. USB & SDcard USB Introduciton 13.NuMicro_USB_SDcard.ppt Exercise : USB Virtual Com. Port (Smpl_VCOM) Using UART0 to USB Exercise : USB HID (Smpl_HID) Emulating USB Human Interface Device (keyboad, mouse, digitizer) Exercise : Audio player with SDcard (Smpl_SDcard_ADPCM) MCU decode .wav file read from SDcard Exercise : signal recording with SDcard (Smpl_SDcard_ADC7) MCU record signal input of pin ADC7 and store 12-bit data into SDcard To design a SDcard driver (Driver_SDcard.c) using FAT File System
Lesson 14. CAN (Controller Area Network) CAN Bus Introduction 14.NuMicro_CAN.ppt Exercise: CAN Basic Transmission (Smpl_CAN) TX for standard ID & RX for LCD display message Exercise : CAN networking with ScanKey (Smpl_CAN_Keypad) Exercise : CAN networking with ADC (Smpl_CAN_ADC7) Exercise : CAN networking with Timer0 (Smpl_CAN_Timer0) Exercise : CAN master/slave to control GPIOs To use CAN to network and control an external control board (with MOSFETs/Relys) for driving DC Motor /Step Motor /Actuator
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.