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

Skills


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

Description


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 practicals and exercises on real hardware. The cost of this plate is less than €30. However, it is possible to follow the subject and do all the activities in simulation mode, without having the board.

Contents


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. Other plates (STM32)

 

 

 

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)
rating:
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 the grades of 3 exams (N1, ..., N3). The grade Nk (for k = 1, ..., 3) is the grade obtained in the exam Ek (which is carried out during class time) as long as the student has satisfactorily completed 80% of the activities moodle (M) on the subjects/objectives assessed. In the case of not reaching 80%, Nk will be 0.
The deliveries include both the on-time completion (at home) of the Exercises and problems proposed after each theory and problem session, as well as those Exercises and problems done in the class itself.

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

on:
PP is the average mark of all subsequent pre-tests (about 15 minutes long), which is carried out at the beginning of the next session and which consists of questions similar to the activities carried out in practice. Not all internships have a previous 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 grade through the final remedial 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:  The maximum mark for the recovery will be 5.

Laboratory activities are not recoverable.

REFERENCES


Basic

Marcos Faundez Zanuy, PowerPoints and videos "Microcomputers" 2024

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

E-Book J. Valvano

http://users.ece.utexas.edu/~valvano/Volume1/E-Book/ 

Complementary

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

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