ARAL

UNIVERSITY OF ENGINEERING AND TECHNOLOGY PESHAWAR

ADVANCED ROBOTICS AND AUTOMATION LAB

MtE-316: Microprocessors and Microcontrollers

Announcements

  • 16/11/2020: The course starts today.

Course Structure

  • Credits: 3 (theory) +1 (lab), Fall 2018 Semester
  • 3 hours of lecture per week and 3 hours of lab

Course Description

MtE-316 (Microprocessors and Microcontrollers) deals with microcontrollers as components in mechatronics design. It focuses on the architecture, programming, and interfacing of microcontrollers. The course is taught using the AVR family of microcontrollers (e.g., ATmega328P).

Following is the summary of topics:

Microprocessor vs microcontroller, the architecture of a microprocessor/microcontroller, programming microcontrollers in C and assembly languages, port programming, addressing modes, timers/counters, interrupts, serial communication, ADC/DAC, interfacing of different sensors and actuators.

Instructor

Dr. Muhammad Tufail, tufail@uetpeshawar.edu.pk

Office Hours: Fridays 14:00-16:00 (or by appointment)

Textbook

Muhammad Ali Mazidi, Sarmad Naimi, Sepehr Naimi: The AVR Microcontroller and Embedded System: Using Assembly and C, 1st Edition, Pearson, 2011. (Download ebook from here, and all its chapter-wise code from here)

Course Grading

  • Theory: Class participation/quizzes: 10%, Homework 10%, Midterm Exam 30%, Final Exam 50%
  • Lab: Lab tasks 25%, Lab reports 25%, Project 50%

Weekly Schedule (Tentative)

Weeks Module Lectures Assigned Readings/Supplementary Material Homework
Week 1 & 2 Introduction
  • Introduction (LEC1)
  • C Programming Language Refresher (LEC2)
  • Refresh your C programming concepts by reading Essential C from Stanford.
  • For homeworks, see Google Classroom.
Week 3 Microcontroller Architecture and Assembly Language Programming
  • Introduction to Microcontrollers (LEC3)
  • HW2: Solve Review Questions 1 to 15 of Section 0.3 of Chapter 0 (pages 28 and 29).
Week 4
  • AVR Architecture and Assembly Language Programming (LEC4)
  • HW3: Solve the following end-of-chapter problems of Chapter 2 (pages 99 – 103):
    • Problems 1, 5, 6, 7, 9, 18, 21, 22, 27, 32, 38, 39, 40, 58
Week 5
  • Assembly Programming continued (Jump and Call Instructions) (LEC6)
  • HW4: Solve end-of-chapter problems 1 to 16
       
Week 6 Programming Microcontrollers in C Language
  • AVR Programming in C (LEC5)
  • Quiz 1: Solve problems 1, 8, 12, 15, 17, 21, and 27 on pages 285-286 of textbook
   
Week 10, 11 Timers and Counters
  • AVR Timer Programming (LEC6)
  • PWM Generation Modes (LEC7)
  • HW 5: Solve problems 10, 17, 19, 21, 22, 23, 26, 35, 37, 40, 41 of Chapter 9 of the Mazidi textbook.
Week 13,14 ADC/DAC      
Week 15 Interrupts (Read Chapter 10 and Do Homework 6)
   
   

Software Tools

Labs (Note: Google Classroom has updated information.)

  • As guidelines for writing lab reports, see a sample report here. Please don’t send Proteus and Atmel Studio files. Rather include code directly (not as a screenshot) and a screenshot of Proteus in the report. If the code is too long, include it as an appendix in the report. Use the report title as this one. Each lab report will be marked out of 10.
  • Marking sheet (rubric) for a lab report, and lab work.
  • Lab 1: Introduction to the development and simulation environments (software)
  • Lab 2: Switch debouncing
    • How to download hex code to Arduino in Atmel Studio 7? You need the AVRDude downloader (a utility program). See here.
  • Lab 3: LCD Interfacing
  • Lab 4: Keypad Interfacing
  • Lab 5: DC Motor Control

Project Resources