- Computer models, von Neumann and Harvard architecture, CISC and RISC
- Low level programming in C
- Peripherals such as A/D-converters, PWM (Pulse Width Modulation), I2C (Inter-Integrated Circuits), SPI (Serial Peripheral Interfaces). Interrupt handling
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.
Information per 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.
Information for Autumn 2025 Start 25 Aug 2025 programme students
- Course location
KTH Campus
- Duration
- 25 Aug 2025 - 24 Oct 2025
- Periods
- P1 (3.0 hp)
- Pace of study
25%
- Application code
50786
- Form of study
Normal Daytime
- Language of instruction
English
- Course memo
- Course memo is not published
- Number of places
Min: 5
- Target group
Mandatory for TMEKM1
Open for all students as long as the course can be included in the programme.
The course is suitable for incoming exchange students.
- Planned modular schedule
- [object Object]
- Schedule
- Schedule is not published
Contact
Course syllabus as PDF
Please note: all information from the Course syllabus is available on this page in an accessible format.
Course syllabus MF2095 (Autumn 2024–)Content and learning outcomes
Course contents
Intended learning outcomes
After passing the course, the student should be able to:
1. Explain the structure of embedded processors
2. Design and develop sequential programmes in C relevant for mechatronic product development, especially with external units such as A/D-converters, PWM, interrupt handling
3. Apply 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.
Literature
Examination and completion
If the course is discontinued, students may request to be examined during the following two academic years.
Grading scale
Examination
- 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.
Examiner
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.