You are here: Home / ECS / Teaching / Courses / Microcontroller

Microcontroller

Aim

Microcontrollers demand very precise and resource-saving programming. Therefore it is necessary to investigate the processor core; in particular, one has to study assembler language. This understanding enables to analyze compilation of C programs, which is a precondition to write efficient C programs for microcontrollers. Of utmost importance is the investigation of the microcontroller's hardware components. Goal of this course is the development of understanding of internal processes in the microcontroller chip. This will enable the student to conduct sound high-level-programming of such chips.

Subject

Lecture contents:
- Microcontroller architecture
- Assembler toolchain
- Interrupts vs. polling
- C-Compiler
- Memory analysis
- Digital communication
- Analog-digital- and digital-analog-conversion
- Interfacing
- Applications

Lab contents:
- Assembler and C
- Digital I/O
- Interrupts
- Timer
- Communication interfaces
- Analog I/O
- Anwendungen
- Embedded Operating Systems

Didactic methods:
- Important principles are presented in class
- Advance reading
- Supervised lab
- Guidance to read and comprehend datasheets
- Weekly learning objectives

Lecturer

Univ.Ass. Dipl.-Ing. BSc Perner Martin

Homepage

http://ti.tuwien.ac.at/ecs/teaching/courses/mclu

 

[News] [Course Organization] [Course Enrolment] [Exercises] [Exams] [Grading]

[Manuals/Datasheets/Programs] [Theory] [Lab Hours] [Self Assessment Test]

 

News

Apr 7, 2014

Clarifications regarding the application submission, the collaboration policy and the exams.

Mar 6, 2014

Supervised lab hours online
Slides from preliminary talk online.

Jan 13, 2014
Updating the Webpage. Not stable right now!
Course Organization

The course is organized in three parts. The first two parts are accompanied by a weekly lecture and are concluded by an exam. In the second and third part, you might additionally program a hands-on microcontroller application.

Schedule

DateLecturePre-ReadingSlidesLab exercises
05.03.2014
Preliminary talk - Slides -
09.03.2014 Deadline for course registration - - -
12.03.2014 A deep look into the processor core
Getting code onto the microcontroller chip
2.1, 4.2, 4.3

Slides,
Handout

1.2, 2.1.1,
2.1.2, 2.2.1
19.03.2014 Assembler programming 2.2, 2.3, 2.5

Slides,
Handout

2.2.2, 2.2.4,
2.2.5, 2.4.1
26.03.2014 Recitation for first exam - Slides,
Handout

2.2.8, 2.4.2,
2.4.3, 2.4.4

27.03.2014 Deadline for course de-registration (12:00)
- - -
28.03.2014
Exam for (and end of) part 1 - - -
02.04.2014
and
09.04.2014

Compilation of C programs
Structured C Programming
Application 1
Memory analysis
Bit tricks

Lecture script: 2.2
avr-libc-Manual: 4, 5, 7, 23.28
For reference only: GCC internals

Slides,
Handout

Slides,
Handout

3.1.1, 3.1.3,
3.3.2, 3.4.3

3.3.1, 3.4.1,
3.6.1+2, 3.9.1
30.04.2014 Problems of digital communication 3.1, 3.2, 3.3 Slides,
Handout
3.4.4, 3.6.4,
3.8.2, 3.8.4
07.05.2014 TinyOS Slides,
Handout
3.5.2, 3.5.3,
3.7.5, 3.10.4
14.05.2014 Recitation for second exam - 3.6.3, 3.7.2,
3.8.1, 3.10.14
15.05.2014 Deadline for part 2 exercise submission
- -
16.05.2014 Exam for (and end of) part 2 complete lecture script - -
- - - - 4.2.1, 4.2.2, 4.2.3
26.06.2014 Deadline for part 3 exercise submission - - -
27.06.2014 Make-up exam complete lecture script + TinyOS - -

Contact

TISS-Forum
For organizational announcements, for questions and discussions. You are expected to subscribe to the forum (log in with your student account and subscribe to course and forum).
For "inter-student" communication it is also possible to use the forum of the FSINF. Please be advised that we are not responsible for (maybe wrong) posts of other students.
Teaching Assistant
For questions that the tutors could not answer to your complete satisfaction.
Teaching Staff
For personal questions, notifications on broken microcontroller hardware, problems with the registration system.
TILAB system administrator (Heinz Deinhart)
In case of account troubles (forgotten passwords etc.), software problems, broken PCs, ...

Course Enrolment and Lab Account

Enrolment for the course is done via TISS but all other things are done via myTI ( https://ti.tuwien.ac.at/admin/ ). Please note, that enrolments as "Wahlfach" can only be accepted as long as there are enough capacities while students of computer engineering (033 535) have priority. The enrolments are transfered from TISS to the myTI system on March, 10. (without the need for additional course enrolment from your side). Late enrolments are possible per email only and

You have to ensure you have an account in myTI ( https://ti.tuwien.ac.at/admin/ ) and have logged in at least once in the system before the enrolments are transfered! On the next day (March, 11.) the accounts (and chipcards for lab access if you don't already have one) should be available in the lab and can be picked from a Tutor (ensure you have uploaded a valid photo, else your chipcard/account cannot be created). You have to pick up your account from the tutor (even if you plan working from home) as the sysadmin has to remove all accounts not fetched by March, 27.

On March, 27. noon, all enrolments will be deleted that are not active in both systems!

The enrolment to the supervised lab slots is always done one week after the enrolments have been transfered from TISS to myTI. During this week you can suggest three timeslots in myTI.

Enrolment for exams and submissions of tasks is via myTI only!

Lecture

During parts 1 and 2, there is one lecture per week: Wednesday 1030-1200 in lecture hall EI4.

Lecture notes download: Lecture notes
Exercises download: Exercises
Manuals/Datasheets download: Manuals/Datasheets

Application Programming Task

The specification for the application which you have to program will be posted on this website before the respective part begins.

All relevant manuals, datasheets, etc. can be found here.

The exercises are intended to help you understand the intrinsics of hardware-based and microcontroller programming and to develop the necessary programming and debugging skills.

Submission

You have to write a protocol in LaTeX with the following entries:

  • A detailed description of your solution, including all design decisions.
  • Correct and detailed answers to all exercise questions. (Justify all your answers!)
  • Any problems you encountered (programming difficulties, trouble with datasheets, mistakes you made, ...).
  • How much time (in person hours) you spent for the exercise, broken down into preparatory work (e.g. reading datasheets), design, programming, debugging, and protocol (including questions).
  • The commented program code in the appendix (and you have to demonstrate the program to a tutor).

You have to submit the exercise before or at the day of the deadline. Submission consists of several tasks:

  1. Show the tutor that your program solves the task before the deadline. There will be a list in the lab where you can select a timeslot of 10 minutes in the week of the deadline, or in the week prior the deadline. You will have priority for a submission during your tutor timeslot in the week of the deadline.
  2. Create a gzip'd tar-archive, containing the application source code and the protocol, according to the template provided by us.
  3. Electronically submit the archive to myTI in front of your tutor.

Location

The TILAB is located in the Treitlstrasse building (building DE) on the mezzanine (raised ground floor). The lab is open from 8:00 to 22:00. It is closed on official holidays, but open on all other student holidays. As you can see in the TILAB timetable, the course is assigned to Room 4. You will find tutors in the lab during their lab hours.

Labkits

You can borrow a lab kit, which contains the bigAVR6 board with an ATmega1280 mcu card, 2x16 Character LCD, usb2serial converter, temperature sensor, and matrix keypad. The deposit for the kit is 100 Euro. You have to return the kit at the end of the course.

Collaboration Policy

We encourage discussions among students, but all work you submit must be written in your own words and must have been programmed by you. Using programs or protocols from other courses or from previous years is not allowed (if you have already done an exercise in a previous year, you can use it again. But we encourage you to do it again from scratch as you most likely will profit from the exercise.).

If we detect cheating on a submission, we will not only ignore the submissions of the persons involved, but will also deduct 15 points from their final results!
Please note: we deduct the points from all students involved, so if you steal from your colleagues without their knowledge and we find out, they will get punished for your misdeed. If they ask, we do disclose your name to them.

Exams

The exam consists of a theory exam (25 min), a preparatory phase for the practical exam (25 min), and the practical exam itself (about 50 min). You register for a particular 120 min exam slot. The remaining 20 minutes are for organisational things like changing rooms. You start with the theory exam in the TILab rooms on the Mezzanine, then move to the TI Seminarraum (ground floor) for the preparation, and finally go to the TILab rooms on the Mezzanine for the practical exam. Please be in front of the TILab rooms on the Mezzanine at the start time of your exam slot.

Theory

  • True/False Questions. 30 questions, grouped into 10 topics with 3 questions each.
  • The questions test whether you understand the material (pre-reading as stated in the timetable, lecture slides and lab hardware) and whether you can look things up in the ATmega1280 manual and AVR instruction set manual.
  • An ATmega1280 manual, AVR instruction set, board schematic, avr-libc manual and a calculator will be provided. Own notes, paper, and calculators are not allowed.
  • A correctly answered questions is awarded with 1 point, a wrong answer results in 1 point deduction.
  • If your overall score for the exam is negative, it will be set to 0.
  • The overall score is then divided by two, thus the maximum is 15 points per theory exam.

Programming

  • 2 programming tasks. Here is an example test for the first part.
  • The task will not only involve components which have been used in the application programming tasks, but also were covered by the recommended exercises. Additionally, the operational modes of the components which can appear in a programming task are not limited to their usage in the application programming tasks and recommended exercises!
  • You will receive a program skeleton where you have to fill in the important stuff (mainly initializations, perhaps some computations).
  • All manuals and schematics necessary for solving the tasks are provided, own notes, paper, and calculators are not allowed. You will get the task descriptions and program skeletons on paper so you can write down your design during the preparation phase. For the third exam you will be provided with a copy of 'TinyOS Programming' only during the practical exam itself, but not during the preparation phase or the theory exam!
  • As soon as you have completed a task, call a tutor. The tutor will verify that your program is correct.

Viewing (Einsichtnahme)

The viewing for the programming exams is by email: Just mail us within a week after the exam which of your exam tasks you are interested in, and we will evaluate them and send you an explanation of your mistakes per email. Depending on our workload and the number of students interested in getting feedback, our response time may vary between a day and 1-2 weeks.

Viewing for a theory exam is by appointment (send email).

Grading

Your final score (max. 100 points) is composed of the following parts:

Programming Exams (30 points)
best two out of three exams, 15 points per exam. Each exam consists of two exercises.
Theory Exams (30 points)
best two out of three exams, 15 points per exam
Application Exercise (19+21 points)
hands-on programming in two applications

Prerequisites for a positive grade:

Two practical exam exercises successfully submitted (i.e., 15 points achieved with programming exams).

Grading Scheme

PointsGrade
[0,100], prerequisites not fulfilled nicht genügend
[0, 52) nicht genügend
[52, 64) genügend
[64, 76) befriedigend
[76, 88) gut
[88, 100] sehr gut