General information

Subject type: Mandatory

Coordinator: Joan Triadó Aymerich

Trimester: Second term

Credits: 4

Teaching staff: 

Marcos Faúndez Zanuy

Teaching languages

  • Catalan

Theory and practice notes as well as the bibliography are entirely in English


Specific skills
  • CE21: Understand the basics and applications of digital electronics and microprocessors.


The subject of microprocessors is the continuation of digital electronics II. Knowledge of analog electronics will also be used to interface with the real world.

It will work with a low-cost microcontroller (ARM Cortex M4, as implemented in the TIVA TM4C123GX launchpad development boards from Texas Instruments).

A microcontroller is a microprocessor with the most input and output capacity in the analog world. Therefore, it can operate autonomously without requiring peripherals.

In this subject the device will be programmed directly without an operating system layer. 

The student is recommended to purchase the Launchpad TIVA TM4C123GX development board from Texas Instruments in order to perform the practices and exercises on real hardware. The cost of this plate is less than € 25. However, it is possible to follow the subject and perform all the activities in simulation mode, without having the board.


1. Introduction. Learning objectives. Embedded systems. Fundamental Concepts. Digital logic. Binary information Implemented with transistors. Digital information stored in memory. Binary numbering systems. Fixed comma numbering.

2. Introduction to computers. I / O ports. CPU registers. Assembly language. Syntax. Ways of addressing and operands. Address space. Software development process.

3. Introduction to programming in C. Structure and organization of C. Variables and expressions. Functions. Conditional forks and loops. Keyboard input using scanf. Keywords C Score.

4. Parallel I / O ports. Stellaris LM4F120 and Tiva TM4C123 LaunchPad. I / O pins. Port entry and exit concepts. I / O programming and address registration.

5. Debug. Hardware debugging tools. Design and Development. Product Life Cycle. Refining forward. Quality Design. Functions, procedures, methods, and subroutines. Decision making. Conditional if-then Switch. Loops. Functional debugging.

6. Interface with external pushbuttons and LEDs. Protoboard. Examples. Hardware design. Software design. Tests.

7. Arrays, time and functional debugging. Debugging theory. SysTick timer. Arrays, chains. Stabilization. Breakpoints. Debugged step by step. Dumped to arrays.

8. Finite State Machines. Phase-Lock Loop. Structures. Finite state machines with indexed structures. Stepper motors. Examples.

9. Serial interface. I / O synchronization. The universal asynchronous receiver transmitter (UART). Asynchronous communication. Details of the UART of the TM4C. Conversions. Distributed Systems. Connect to a Nokia 5110 LCD screen using the serial port.

10. Interruptions. Multi-thread communication and synchronization (thread). NVIC on the ARM Cortex-M processor. Flank interruptions. SysTick on periodic interrupts. DC motor interface with PWM. Example of building a robotic car.

11. Digital to Analog and Audio Conversion. The approximation of continuous signals in the digital domain. Digital to Analog Conversion. Sound and music generation.

12. Analog to digital conversion. Data Acquisition and Control. ADC to TM4C123 / LM4F120. Nyquist's theorem. Robot Car Controller.

13. Complete Embedded Systems. Requirements document. The modular design. Introduction to Graphics. Data organization structures. Periodic interruptions. NOKIA 5110 display




Evaluation system

Continuous assessment will be based on three elements:
1. The note of the practical activities carried out in the laboratory (NL),
2. The theory and problem note (NTP)
3. Activities carried out by the student on the moodle platform (M)
The Final Grade (NF) of the subject is obtained by weighting the Grade of Theory and Problems (NTP) and the Grade of Laboratory Practices (NL):
NF = 0.7 NTP + 0.3 NL
The NTP is obtained through continuous assessment or through the Recovery Exam. The subject is planned so that, under normal conditions, it can be passed by continuous assessment. However, if any student fails to pass the continuous assessment) they can get the NTP mark directly from the Recovery Exam. To take the resit exam you must have taken a grade higher than 2.5 in the continuous assessment.
Theory and Problem Note (NTP) for continuous assessment:
The NTP is obtained by weighting 3 notes (N1, ..., N3). The grade Nk (for k = 1, ..., 3) is the grade obtained in the exam Ek (which is done in class) as long as the student has successfully completed 80% of the activities moodle (M) on the topics / objectives evaluated. In case of not reaching 80%, Nk will be 0.
Deliveries include both the timely (and home) completion of the proposed Exercises and Problems after each theory and problem session, as well as those Exercises and Problems performed in the class itself.
The weights that weigh each Nk note are proportional to the hours of work that the student dedicates to carry out the activities planned to achieve the evaluated objectives, as well as the relative importance of these objectives within the subject.
NTP = (N1 + N2 + N3) / 3
The Laboratory Note (NL):
As it is an eminently practical subject, the theoretical explanations will be reduced to the maximum and practicals will be carried out in the theory classes (full group) and in the practical classes (reduced group). This allows for a total of 9 practices.
The NL note is obtained using the following formula:
NL = 0.65 x PP + 0.35 IF

PP is the average mark of all individual pre-tests (lasting about 15 minutes), which is done at the beginning of the session and consists of questions similar to the activities performed in practice. Not all internships have a pre-test.
IF is the average grade of all final reports made during the practical activities (no paper document required).

Final grade:
At the end of the classes, after a few days of the E3 exam, the student will know if he has passed the subject through the continuous evaluation of theory and problems, and the evaluation of the laboratory (NF> = 5). In case of passing, it is no longer necessary for the student to take the Recovery Exam.
Qualification system
If he has not passed the subject by continuous assessment, the student can obtain the NTP mark through the final resit exam. The final mark of the subject will be calculated with the same weighting used for the students who passed by means of the continuous evaluation, using like note NTP the maximum note between the originating one of the continuous evaluation and the originating one of the Examination of recovery.
Only those students who have not passed by continuous assessment and have obtained a grade higher than 2.5 on the average of the theory exams can take the entrance exam.

Rules for carrying out the activities
The tests will be performed individually.
The practices will be done in pairs. The internship grade may be different for each group member if the teacher deems it appropriate.

It is mandatory to carry out all the activities of the subject.

Final recovery exam: students who do not pass by continuous assessment and have obtained a grade higher than 2.5 in the average of the exams may take the final remedial exam. The maximum mark for the recovery will be 5.

Laboratory activities are not recoverable.



Marcos Faundez Zanuy, PowerPoints "Microcomputers" 2023

Introduction to ARM Cortex-M Microcontrollers

John Valvano, Volume 1, Introduction to ARM Cortex-M Microcontrollers (fifth edition, 2nd printing- June 2014), 2016, ISBN: 978-1477508992

Real-Time Interfacing to ARM Cortex-M Microcontrollers

John Valvano, Volume 2, Real-Time Interfacing to ARM Cortex-M Microcontrollers (fifth edition, 1st printing June 2014), 2016, ISBN: 978-1463590154

Practical microcontroller engineering with ARM Technology

Ying Bai Practical microcontroller engineering with ARM Technology, IEEE Press Wiley 2016, ISBN 978-1-119-05237-1

E-Book J. Valvano 

Real-Time Operating Systems for ARM Cortex-M Microcontrollers

John Valvano, Real-Time Operating Systems for ARM Cortex-M Microcontrollers Volume 3, third edition, 2016