← Back to Course

Microcontrollers 2

DE6417 — Tuesdays 8 am – 1 pm

Semester: S2 2026

Course Code: DE6417

Schedule: Tuesdays, 8:00 am – 1:00 pm

Duration: 15 weeks + Examination Period

Week Date Lecture Topic Practical / Assessment Activity
Week 1 14/07/2026 Lecture 1: Microcontrollers 1 Review

FSM, ADC, GPIO, ATmega328P Architecture

Introduction & Practical Setup

Review exercises on FSM, ADC, and GPIO

Week 2 21/07/2026 Lecture 2: Understanding Interrupts on the ATmega328P

Interrupt Vector Table, external interrupts (INT0/INT1), ISR execution, polling vs interrupts, registers (EIMSK, EICRA)

Interrupt Practical Exercises

Configuring external interrupts and writing simple ISRs

Week 3 28/07/2026 Lecture 2 (Cont.): External Interrupts & ISR Execution

External interrupts (INT0/INT1), ISR execution, digital inverter circuit, oscilloscope measurement, registers (EIMSK, EICRA)

External Interrupt Practical Exercises

Digital Inverter circuit setup, ISR implementation & oscilloscope verification

Week 4 04/08/2026 Lecture 3: Understanding Timers, Counters, PWM & Measuring Temporal Events

Timer/Counter architecture, prescalers, CTC, PWM modes (Fast PWM, Phase Correct), 8-bit vs 16-bit timers (Timer0, Timer1, Timer2)

Timer & PWM Practical Exercises

Hands-on practice with timer configuration and PWM output

Week 5 11/08/2026 Lecture 4: Fast PWM, Waveform Generation & Tone Generation

Timers/PWM registers, CTC registers, Fast PWM Mode 14 configuration, ICR1 top value, duty cycle control, piezo buzzer piano notes

Lab 1: Digital Signal Generation

Focus: Square, Triangle & Sine waves using PWM and Timer Interrupts • PWM Waveform Shaping

Week 6 18/08/2026 Lecture 5: Using Timer & Interrupt Arduino APIs

TimerOne library, MsTimer2, attachInterrupt(), square/triangle/sine PWM waveform shaping, RC filter analog output

Lab 1 — Continued

Focus: Waveform shaping and oscilloscope verification

Week 7 25/08/2026 Lecture 5 (Cont.): Timer APIs & Waveform Shaping

Timer interrupt routines, precision frequency control, analog filtering of PWM

Lab 1 — Continued

Hands-on calibration and waveform generation exercises

Week 8 01/09/2026 Lecture 5 (Cont.): Timer APIs & PWM Waveform Shaping (Helper for Lab 1)

TimerOne library, CTC registers, square/triangle/sine PWM, RC filter analog output

Lab 1 — Completion & Sign-off

Final testing, signal measurement, and Lab 1 demonstration

Break 08/09/2026 Mid-Semester Break No Classes
Break 15/09/2026 Mid-Semester Break No Classes
Week 9 22/09/2026 Lecture 6: Pin Change Interrupts (PCINT)

PCINT groups, shared ISR vectors, registers (PCICR, PCMSK), edge detection, software debouncing inside PCINT ISR, direct port access

Assignment 1 Released: Dual-Call Pedestrian Crossing with Night Mode

Focus: 7-State FSM, dual-call debounce latch, night caution mode • Due: Week 11

PCINT practical exercises & breadboard wiring

Week 10 29/09/2026 Lecture 7: WiFi Communication with ESP8266 ESP-01

ESP-01 hardware, AT commands, SoftwareSerial communication, WiFi Chat Terminal, WiFi LED Controller

Lab 2 Released: Conveyor Belt with Dual Limit Switches and E-Stop

Focus: PCINTs for E-Stop & limit switches, 5-state FSM, 1.0s hold-to-reset • Due: Week 12

Assignment 1 development & Class Test review Q&A

TestWeek 11 06/10/2026
Class Test

Coverage: Timers, PWM, Interrupts (External & PCINT), Debugging, ESP8266 AT commands (60 min)

Lecture 8: DHT11, Web Server & ThingSpeak

DHT11 sensor integration, live web server, cloud data logging with ThingSpeak IoT dashboard

Assignment 1 Due
Assignment 2 Released: IoT Security System with MQTT Image Upload

Focus: Motion ISR, OV7670 camera, framed UART, Python MQTT gateway • Due: Week 14

Lab 2 development

Week 12 13/10/2026 IoT Workshop & Lab Work

Hands-on IoT project work, ESP8266 integration, Telegram bot, camera control, cloud dashboard

Lab 2 Due
Lab 3 Released: Debugging a Pomodoro Up-Counter with VSCode

Focus: Finding and fixing 3 firmware bugs using VSCode/PlatformIO debugger • Due: Week 14

Assignment 2 development

Week 13 20/10/2026 Lecture 9: Arduino as ISP / Standalone ATmega328P

ISP protocol, SPI wiring, ArduinoISP sketch, bare-chip programming, fuses, bootloaders, external 16 MHz crystal, power regulation

Standalone Build Workshop

Hands-on building of standalone circuits and bootloading chips • Assignment 2 & Lab 3 development and testing

Week 14 27/10/2026 Lecture 10: Bare-Metal C Programming

avr-gcc toolchain, avrdude, direct register manipulation, bare-metal LED blink, INT0 external interrupts, 3-state button control without Arduino core

Assignment 2 Due
Lab 3 Due

Bare-Metal C practical exercises & final project submissions

Week 15 03/11/2026 Revision & Practical Preparation

Comprehensive course revision, PlatformIO debugger, 30 interactive exam practice questions, Q&A

Open Lab & Exam Preparation

Supervised practice on all course topics, lab catch-up, and final exam preparation

ExamWeek 16 10/11/2026 Examination Period Examination Period
ExamWeek 17 17/11/2026 Examination Period Examination Period

Key Deliverables & Assessments

Assessment Released Due Duration Weight
Assignment 1: Dual-Call Pedestrian Crossing with Night Mode Week 9 (22/09) Week 11 (06/10) 2 Weeks 10%
Lab 1: Digital Signal Generation
Week 5 (11/08) Week 8 (01/09) Completed 6%
Lab 2: Conveyor Belt with Dual Limit Switches and E-Stop
Week 10 (29/09) Week 12 (13/10) 2 Weeks 6%
Class Test Week 11 (06/10) In-class (60 min) 10%
Assignment 2: IoT Security System with MQTT Image Upload Week 11 (06/10) Week 14 (27/10) 3 Weeks 10%
Lab 3: Debugging a Pomodoro Up-Counter with VSCode
Week 12 (13/10) Week 14 (27/10) 2 Weeks 8%
Final Examination Weeks 16–17 Exam Period 50%