[major=SE | course_id=MIP201 | syllabus_id=13783 | semester=7 | combo=SE_COM11 | title=Microcontroller Programming]
Course ID: MIP201
Title EN: Microcontroller Programming
Title VI: Lập trình vi điều khiển
Credits: 3.0
Prerequisites: PRF192
Description: Learn how to implement real-world embedded system projects on a simulated microcontroller using the Mbed API.

Modify skeleton code to implement functionality for multiple applications: an audio wave generator, an audio player, and controlling peripherals using analog and digital I/O interfaces, interrupts, timers, and pulse width modulation.

Learn key features of Arm processors and architectures and how a modern API

Learn key serial communication protocols used in the embedded environment including SPI, UARTs and I2C; evaluating their benefits and limitations.
Learn the features of a Real-time Operating System (RTOS) and how it facilitates multitasking in an microcontroller.

Develop working embedded prototypes using the Arm Mbed API, microcontroller on the ST Nucleo F401RE board and low cost parts. Learn hardware and software theory, immediately applied in practice.
Apply your knowledge to create a user interface, temperature sensing system, and music player - with ideas to develop each further.

Apply threads, mutex, semaphores and interrupts to write a fully-functioning multitasking program.
Learn deeper programming skills with C/C++, applying these to use of the powerful Mbed API.
Learn staged circuit development and troubleshooting skills.
Student tasks: - Students must attend at least 80% of contact sessions in order to be accepted to the final examination.
'- Student is responsible to do all exercises and practical given by instructor in class or at home and submit on time. Do quizzes during class.
- Constantly follow announcements on intranet/CMS at http://cms.fpt.edu.vn for up-to-date course information.
Tools: Specific Tools:
1) Lab equipments/ Training Kits
1.1. Keil Studio Cloud IDE (online free - https://studio.keil.arm.com/ - Main material)
1.2. Mbed Studio (offline free)
1.3. KIT Nucleo-F401RE (STM32F401RE)

2) Simulation software (free)
- Docker desktop
- Arm Education: Mbed_sim ( Arm Cortex-M4 )
Course type: traditional
Decision: 1318/QĐ-ĐHFPT dated 11/27/2025
Approved date: 2025-11-27
CLO1: Fundamentals of an embedded system and the discovery of Arm architecture and microcontrollers.
[1] category=Active learning; type=on-going; weight=10.0; duration=From start to finish in schedule; question_type=All CLOs; grading_guide=; completion_criteria=; clos=>0
[2] category=Exercise; type=on-going; weight=10.0; duration=; question_type=; grading_guide=All chapters; knowledge and skills; completion_criteria=; clos=>0
[3] category=Lab; type=on-going; weight=20.0; duration=; question_type=All CLOs; grading_guide=Lab1: Covering knowledge from Chapter 1 to Chapter 4
Lab2: Covering knowledge from Chapter 4 to Chapter 5
Lab3: Covering knowledge from Chapter 5 to Chapter 6
Lab4: Covering knowledge from Chapter 6 to Chapter 8
Lab5: Covering knowledge from Chapter 5 to Chapter 9
Lab6: Covering knowledge from Chapter 8 to Chapter 10; completion_criteria=; clos=4
[4] category=Progress test; type=on-going; weight=10.0; duration=30' - 40'; question_type=PT1: CLO 1,2,3,4,5
PT2: CLO 5,6,7,8,9,10; grading_guide=PT1: Covering knowledge from Chapter 1 to Chapter 5
PT2: Covering knowledge from Chapter 6 to Chapter 10; completion_criteria=; clos=4
[5] category=Project; type=on-going; weight=20.0; duration=From start to finish in schedule; question_type=All CLOs; grading_guide=All chapters; knowledge and skills; completion_criteria=; clos=4
[6] category=Final exam; type=Final exam; weight=30.0; duration=60'; question_type=All CLOs; grading_guide=All chapters; knowledge and skills; completion_criteria=; clos=4
[1] desc=Course from Edx; author=; publisher=; edition=; isbn=; main=True; online=True; note=1. Embedded Systems Essentials with Arm: Getting Started https://learning.edx.org/course/course-v1:ArmEducation+EDARMXES1.6x+3T2020/home
[2] desc=Course from Edx; author=; publisher=; edition=; isbn=; main=True; online=True; note=2. Embedded Systems Essentials with Arm: Get Practical with Hardware https://learning.edx.org/course/course-v1:ArmEducationX+EDARMXES2.4x+1T2021/home
[3] desc=STM32CubeMX 4 Essential Training; author=; publisher=Udemy.com; edition=; isbn=; main=; online=True; note=https://www.udemy.com/course/stm32cubemx-complete-training/learn/lecture/9606338#overview
[4] desc=A Beginner’s Guide to Designing Embedded System Applications on Arm Cortex-M Microcontrollers; author=Ariel Lutenberg, Pablo Gomez, Eric Pernia; publisher=ARM Education Media; edition=; isbn=978-1-911531-41-8; main=; online=True; note=https://www.arm.com/resources/education/books/designing-embedded-systems
Session 1: Course overview
Chapter 1: Introduction To Embedded Systems
1.1. CPUs vs. MCUs vs. Embedded Systems
Topic: Offline; Teaching type: CLO1; LO: IT
ITU: Slide Chapter 1
Materials: MIP201
Download: Read Slide Chapter 1

Session 2: 1.2. Examples of Embedded Systems
1.3. Options for Building Embedded Systems
Topic: Offline; Teaching type: CLO1; LO: T
ITU: Slide Chapter 1
Download: Read Slide Chapter 2

Session 3: 1.4. Features of Embedded Systems
1.5. Building Embedded Systems
Topic: Offline; Teaching type: CLO1; LO: T
ITU: Slide Chapter 1
Download: Read Slide Chapter 3

Session 4: Chapter 2: Arm CortexM4 Processor Architecture
2.1. What is Arm architecture?
2.2. Arm processor families
2.3. Arm Cortex-M series
Topic: Offline; Teaching type: CLO2; LO: T
ITU: Slide Chapter 2
Download: Read Slide Chapter 2
CLO10: Developing working embedded prototypes using the Arm Mbed API, the ST Nucleo F401RE board, and low-cost parts.
Session 1: 2.4. Cortex-M4 processor
2.5. Arm processors vs. Arm architectures
2.6. Processor overview
Topic: Offline; Teaching type: CLO2; LO: T
ITU: Slide Chapter 2
Download: Read Slide Chapter 3

Session 2: 2.7. Block diagram
2.8. Registers
Topic: Offline; Teaching type: CLO2; LO: T
ITU: Slide Chapter 2
Download: Read Slide Chapter 4

Session 3: Lab0_GettingStarted
Topic: Offline; Teaching type: CLO2; LO: TU
ITU: Lab0 Tutorial
Download: Read Lab0 Tutorial

Session 4: Lab0_GettingStarted
Topic: Offline; Teaching type: CLO2; LO: TU
ITU: Lab0 Tutorial
Download: Read Lab0 Tutorial
CLO2: Understanding the characteristics of microcontrollers and embedded systems, including their components, benefits, and constraints.
Session 1: Lab0_GettingStarted
Topic: Offline; Teaching type: CLO2; LO: TU
ITU: Lab0 Tutorial
Download: Read Lab0 Tutorial

Session 2: Chapter 3: Introduction To Arm CortexM4 Programming
3.1. C language vs. assembly language
3.2. Program-generation flow
3.3. Cortex-M4 program image
Topic: Offline; Teaching type: CLO3; LO: T
ITU: Slide Chapter 3
Download: Read Slide Chapter 3

Session 3: 3.4. How is data stored in RAM?
3.5. Data types
3.6. Accessing data using C and assembly
Topic: Offline; Teaching type: CLO3; LO: T
ITU: Slide Chapter 3
Download: Read Slide Chapter 3

Session 4: 3.7. Calling a C function from assembly
3.8. Calling an assembly function from C
3.9. Embedded assembly
Topic: Offline; Teaching type: CLO3; LO: T
ITU: Slide Chapter 3
Download: Read Slide Chapter 3
CLO3: Understanding the industry-standard Arm-based microcontroller architecture, their features, and programming models.
Session 1: Lab00_GettingStarted_Docker
Topic: Offline; Teaching type: CLO3; LO: TU
ITU: Lab00 Tutorial
Download: Read Lab00 Tutorial

Session 2: Lab00_GettingStarted_Docker
Topic: Offline; Teaching type: CLO3; LO: TU
ITU: Lab00 Tutorial
Download: Read Lab00 Tutorial

Session 3: Lab00_GettingStarted_Docker
Topic: Offline; Teaching type: CLO3; LO: TU
ITU: Lab00 Tutorial
Download: Read Lab00 Tutorial

Session 4: Chapter 4: Introduction To The Mbed Platform And CMSIS
4.1. Mbed Overview
4.2. Mbed and the Internet of Things
Topic: Offline; Teaching type: CLO4; LO: T
ITU: Slide Chapter 4
Download: Read Slide Chapter 4
CLO4: Implementing real-world embedded system projects on a simulated microcontroller using the Mbed API (MbedOS).
Session 1: 4.3. Overview of Software Libraries
4.4. Mbed OS
4.5. Mbed Software Development Kit
Topic: Offline; Teaching type: CLO4; LO: T
ITU: Slide Chapter 4
Download: Read Slide Chapter 4

Session 2: 4.6. Mbed Hardware Development Kit (HDK)
4.7. Cortex Microcontroller Software Interface Standard (CMSIS)
Topic: Offline; Teaching type: CLO4; LO: T
ITU: Slide Chapter 4
Download: Read Slide Chapter 4

Session 3: Chapter 5: Digital Input And Output
5.1. Voltages and logic values
5.2. Using pointers to access GPIO
5.3. Define data structure for peripherals
Topic: Offline; Teaching type: CLO5; LO: T
ITU: Slide Chapter 5
Download: Read Slide Chapter 5

Session 4: 5.4. DigitalIn/DigitalOut
5.5. BusIn/BusOut
Topic: Offline; Teaching type: CLO5; LO: T
ITU: Slide Chapter 5
Download: Read Slide Chapter 5
CLO5: Applying knowledge of digital and analog I/O to programming.
Session 1: 5.6. Using LED
5.7. Using 7-segment display
5.8. Using infrared emitter/detector
Topic: Offline; Teaching type: CLO5; LO: T
ITU: Slide Chapter 5
Download: Read Slide Chapter 5

Session 2: Lab01_Chapter5_DigitalInputAndOutput_HW
Topic: Offline; Teaching type: CLO5; LO: TU
ITU: Lab01 Tutorial
Download: Read Lab01 Tutorial

Session 3: Lab01_Chapter5_DigitalInputAndOutput_HW
Topic: Offline; Teaching type: CLO5; LO: TU
ITU: Lab01 Tutorial
Download: Read Lab01 Tutorial

Session 4: Lab01_Chapter5_DigitalInputAndOutput_HW
Topic: Offline; Teaching type: CLO5; LO: TU
ITU: Lab01 Tutorial
Download: Read Lab01 Tutorial
CLO6: Implementing interrupts to control peripherals, utilizing the Mbed API.
Session 1: ProccessTest1
Topic: Offline; Teaching type: ; LO: U
ITU: ProccessTest1
Download: ProccessTest1

Session 2: Chapter 6: Interrupts And Low Power Features
6.1. Interrupts
What are interrupts?
Why use interrupts?
6.2. Exceptions
Entering an exception handler
Exiting an exception handler
Topic: Offline; Teaching type: CLO6; LO: T
ITU: Slide Chapter 6
Download: Read Slide Chapter 6

Session 3: 6.3. Microcontroller interrupts
Lab02_Chapter6_InterruptsAndLowPowerFeatures_Sim
6.4. Timing analysis
6.5. Program design with interrupts
6.6. Sharing data safely between ISRs and other threads
Topic: Offline; Teaching type: CLO6; LO: T
ITU: Slide Chapter 6
Download: Read Slide Chapter 6

Session 4: Lab02_Chapter6_InterruptsAndLowPowerFeatures_HW
Topic: Offline; Teaching type: CLO6; LO: TU
ITU: Lab02 Tutorial
Download: Read Lab02 Tutorial
CLO7: Developing an audio player incorporating timers, tickers, and Pulse Width Modulation using the Mbed API.
Session 1: Lab02_Chapter6_InterruptsAndLowPowerFeatures_HW
Topic: Offline; Teaching type: CLO6; LO: TU
ITU: Lab02 Tutorial
Download: Read Lab02 Tutorial

Session 2: Lab02_Chapter6_InterruptsAndLowPowerFeatures_HW
Topic: Offline; Teaching type: CLO6; LO: TU
ITU: Lab02 Tutorial
Download: Read Lab02 Tutorial

Session 3: Chapter 7: Analog Input And Output
7.1. Analog input and output overview
7.2. Analog input
Digital-to-analog converter
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 7
Download: Read Slide Chapter 7

Session 4: 7.3. Analog output
7.4. Analog-to-digital converter
ADC range
Resolution and quantization
Sampling frequency
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 7
Download: Read Slide Chapter 7
CLO8: Evaluating serial communication protocols used in the embedded environment, including SPI, UARTs, and I2C, and their benefits and limitations.
Session 1: 7.5. Input/output analog signals using Mbed
Mbed analog input
Mbed analog output
Lab03_Chapter7_AnalogInputAndOutput_Sim
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 7
Download: Read Slide Chapter 7

Session 2: Lab03_Module07_AnalogInputAndOutput_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab03 Tutorial
Download: Read Lab03 Tutorial

Session 3: Lab03_Module07_AnalogInputAndOutput_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab03 Tutorial
Download: Read Lab03 Tutorial

Session 4: Lab03_Module07_AnalogInputAndOutput_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab03 Tutorial
Download: Read Lab03 Tutorial
CLO9: Understanding Real-time Operating System (RTOS) and how it facilitates multitasking in an embedded system.
Session 1: Chapter 8: Timer And Pulse Width Modulation
Lab04_Chapter8_TimerAndPulseWidthModulation_Sim
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 8
Download: Read Slide Chapter 8

Session 2: 8.1. Timer and pulse-width modulation (PWM)
Timer overview
Components of a standard timer
Compare mode, capture mode, PWM mode
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 8
Download: Read Slide Chapter 8

Session 3: 8.2. Mbed timer and PWM
Mbed timer
Mbed time ticker
Mbed PWM
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slide Chapter 8
Download: Read Slide Chapter 8

Session 4: Lab04_Module08_TimerAndPulseWidthModulation_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab04 Tutorial
Download: Read Lab04 Tutorial
Session 1: Lab04_Module08_TimerAndPulseWidthModulation_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab04 Tutorial
Download: Read Lab04 Tutorial

Session 2: Lab04_Module08_TimerAndPulseWidthModulation_HW
Topic: Offline; Teaching type: CLO7; LO: TU
ITU: Lab04 Tutorial
Download: Read Lab04 Tutorial

Session 3: Chapter 9: SerialCommunication
9.1. Serial communication overview
Lab05_Chapter9_SerialCommunication_Sim
Topic: Offline; Teaching type: CLO8; LO: TU
ITU: Slide Chapter 9
Download: Read Slide Chapter 9

Session 4: 9.2. Universal Asynchronous Receiver/Transmitter (UART) communication
UART protocol
Character-encoding scheme
Mbed UART API
Topic: Offline; Teaching type: CLO8; LO: T
ITU: Slide Chapter 9
Download: Read Slide Chapter 9
Session 1: 9.3. Serial Peripheral Interface (SPI) bus
SPI protocol
Mbed SPI API
9.4. I2C bus
I2C protocol
Mbed I2C API
Topic: Offline; Teaching type: CLO8; LO: T
ITU: Slide Chapter 9
Download: Read Slide Chapter 9

Session 2: Lab05_Chapter9_SerialCommunication_HW
Topic: Offline; Teaching type: CLO8; LO: TU
ITU: Lab05 Tutorial
Download: Read Lab05 Tutorial

Session 3: Lab05_Chapter9_SerialCommunication_HW
Topic: Offline; Teaching type: CLO8; LO: TU
ITU: Lab05 Tutorial
Download: Read Lab05 Tutorial

Session 4: Lab05_Chapter9_SerialCommunication_HW
Topic: Offline; Teaching type: CLO8; LO: TU
ITU: Lab05 Tutorial
Download: Read Lab05 Tutorial
Session 1: Chapter10: RealTimeOperatingSystems
10.1. Operating System Overview
What is an Operating System?
Functions, types, and services of Operating Systems
Topic: Offline; Teaching type: CLO9; LO: TU
ITU: Slide Chapter 10
Download: Read Slide Chapter 10

Session 2: 10.2. Real-Time Operating System (RTOS)
RTOS overview
RTOS task scheduling
Keil RTX RTOS
Topic: Offline; Teaching type: CLO9; LO: T
ITU: Slide Chapter 10
Download: Read Slide Chapter 10

Session 3: 10.3. RTOS on Mbed Platform
Mbed RTOS API
Using Mbed RTOS API for your project
Threads, Mutex, and Semaphore
Topic: Offline; Teaching type: CLO9; LO: T
ITU: Slide Chapter 10
Download: Read Slide Chapter 10

Session 4: ProccessTest2
Topic: Offline; Teaching type: ; LO: U
ITU: ProccessTest2
Download: ProccessTest2
Session 1: Lab06_Chapter10_RealTimeOperatingSystems_HW
Topic: Offline; Teaching type: CLO9; LO: TU
ITU: Lab06 Tutorial
Download: Read Lab06 Tutorial

Session 2: Lab06_Chapter10_RealTimeOperatingSystems_HW
Topic: Offline; Teaching type: CLO9; LO: TU
ITU: Lab06 Tutorial
Download: Read Lab06 Tutorial

Session 3: Project Review
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review

Session 4: Final report document
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review
Session 1: Block diagram
Circuit analysis and assembly
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review

Session 2: Project Review
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review

Session 3: Presentation
Flowchart
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review

Session 4: Source code analysis
Demonstration, Q&A
Topic: Offline; Teaching type: CLO10; LO: U
ITU: Project Review
Download: Project Review