Skip to main content

MF2095 Programming in C for Embedded Systems 3.0 credits

Mechatronics and Embedded Systems in general are developed mainly via the programming language C. The course is given in the interface between hardware and software, hardware-oriented programming to handle the interfaces of the microcontroller, via C-programming. C-programming is therefore a tool to understand and use a microcontroller's interaction with the surroundings.

After completed course, course participants should be able to, via C-programming, manage the most common peripherals on a commun microcontroller (ATmega16). Examples are: A/D-conversion, PWM, interrupt, timers and counters.

The equiment needed to complete laboratory assignments are handed out at the start of the course and can be used freely during the course.

Choose semester and course offering

Choose semester and course offering to see current information and more about the course, such as course syllabus, study period, and application information.


For course offering

Autumn 2024 Start 26 Aug 2024 programme students

Application code


Headings with content from the Course syllabus MF2095 (Autumn 2022–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

The following modules are included in the course:

  • Computer models, von Neumann and Harvard architecture, CISC and RISC
  • Low level programming in C

Intended learning outcomes

After passing the course, the students should be able to:

  1. Explain the structure of embedded processors
  2. Design and develop sequential programmes in C, of relevance to mechatronics product development
  3. Use and utilise development tools for programming and troubleshooting of embedded systems

Literature and preparations

Specific prerequisites

Completed course MF1016 Basic Electrical Engineering, or the equivalent.

Completed course DD1321 Applied programming and computer science, or the equivalent.

Recommended prerequisites

No information inserted


No information inserted


No information inserted

Examination and completion

If the course is discontinued, students may request to be examined during the following two academic years.

Grading scale

P, F


  • LABA - Laboration, 3.0 credits, grading scale: P, F

Based on recommendation from KTH’s coordinator for disabilities, the examiner will decide how to adapt an examination for students with documented disability.

The examiner may apply another examination format when re-examining individual students.

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

No information inserted


Ethical approach

  • All members of a group are responsible for the group's work.
  • In any assessment, every student shall honestly disclose any help received and sources used.
  • In an oral assessment, every student shall be able to present and answer questions about the entire assignment and solution.

Further information

Course room in Canvas

Registered students find further information about the implementation of the course in the course room in Canvas. A link to the course room can be found under the tab Studies in the Personal menu at the start of the course.

Offered by

Main field of study

Mechanical Engineering

Education cycle

Second cycle

Add-on studies

No information inserted


Martin Edin Grimheden (