General information


Subject type: Mandatory

Coordinator: Julián Horrillo Tello

Trimester: Second term

Credits: 4

Teaching staff: 

Marcos Faúndez Zanuy

Teaching languages


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

This subject has methodological and digital resources to make possible its continuity in non-contact mode in the case of being necessary for reasons related to the Covid-19. In this way, the achievement of the same knowledge and skills that are specified in this teaching plan will be ensured.

The Tecnocampus will make available to teachers and students the digital tools needed to carry out the course, as well as guides and recommendations that facilitate adaptation to the non-contact mode.

Learning outcomes


1. Implement hardware using discrete (SSI, MSI), programmable (PLD), microprocessor, microcontroller, and DSP digital components. (CE21, CE28)

2. Design algorithms and write code in high and low level programs. (CE23)

3. Apply programming tools for PLD devices, microprocessors, microcontrollers and DSP of digital equipment. (CE21)

4. Handles the scientific-technical terminology of digital electronic components in English (CE21, CE24, CE28)

5.      Prepares technical project reports, evaluates alternatives and justifies their analysis and design criteria (CE21, CE24, CE28)

 

At the end of the course the student must be able to:

1. Design low-cost autonomous systems that solve problems of medium complexity.

2. Configure the input and output ports as well as program microcontrollers.

3. Develop applications such as a pacemaker, finite state machine, or applications that require analog inputs and outputs (A / D conversion, processing, and D / A conversion) in an integrated development environment (IDE).

4. Debug designs made both at the level of development software and using visualization tools.

5. Interconnect the microcontroller with display elements and boosterpacks.

6. Implement easy-to-maintain and debug software (software quality)

Working methodology


The course consists of theory and practice, following the structure of the analogous course at the University of Texas.

Theoretical classes are not limited to the theoretical explanation of the subject but include practical demonstrations on the development environment. This is why it is recommended that the student attend classes with his or her own laptop or with a computer for every two people.

At the end of the week the student must do at home the proposed practical exercises and Moodle questionnaires. The uVISION development environment allows to include an automatic grader that will provide feedback to the student on the errors of its code as well as a numerical code that the student will have to enter in the Moodle platform to demonstrate that it has finished satisfactorily. the proposed exercise.

Laboratory sessions involve solving more complex problems that the student will have to perform first in simulation mode and then on the microcontroller development board. Solutions may require the incorporation of external elements mounted on protoboard (resistors, LEDs, pushbuttons, display screen, etc.). Again the student will have the help of the automatic grader to detect possible errors and verify the correct operation of the circuit.

In the event of a covid-19 pandemic, classes will be online from home.

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. Complete Embedded Systems. Requirements document. The modular design. Introduction to Graphics. Data organization structures. Periodic interruptions. NOKIA 5110 display

 

 

 

 

 

 

 

 

Learning activities


 

Dedication

Hours

Percentage

Guided learning

Large group / theory

30

30%

Medium group / internships

0

 

Small group / laboratory

10

10%

Directed activities

0

 

Autonomous learning

 

60

60%

Practical activities:

  1. Installation and Commissioning of the uVISION integrated development environment (IDE), grader, Texasdisplay and TM4C123G development board. Competence E21
  2. Debugging and modifying a program to control LEDs with the pushbuttons on the development board (). Learning outcomes 2 and 4. Competences CB3 and E21
  3. Program and run in uVISION a program that reads the dimensions of a rectangular room and calculates the area. Learning outcomes 3 and 4. Competences CB3 and E21
  4. Time measurement with the virtual oscilloscope and generation of light pulses of predetermined duration, modifiable by means of the switches. Learning outcomes 1 and 6. Competences CB3 and E21
  5. Pacemaker system simulation for the heart. Learning outcomes 3, 4 and 6. Competences CB3 and E21
  6. Connection of the development board with external elements (LEDs and pushbuttons). Learning outcomes 4 and 5. Competences CB3 and E21
  7. Finite state machine to control 3 traffic lights. Learning outcomes 1 to 6. Competences CB3 and E21
  8. Conversion of numerical data to strings and transmission by the UART Learning outcomes 4 and 6. Competences CB3 and E21
  9. Audio generation using interrupts. Learning outcomes 1 to 6. Competences CB3 and E21
  10. Construction of a small 4-key piano. Learning outcomes 1 to 6. Competences CB3 and E21
  11. Measurement and visualization of the position of a sliding potentiometer. Learning outcomes 1 to 6. Competences CB3 and E21

Some practical activities will be carried out in theory class, others in the laboratory in small groups (5 sessions) and others will be carried out by the student on his own, preferably with his own computer.

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 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 this is an eminently practical subject, the theoretical explanations will be reduced to a minimum and practices will be carried out in the theory classes (full group) and in the practice classes (small group). This allows a total of 10 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 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 will be able to go to the final resit exam.

REFERENCES


Basic

Marcos Faundez Zanuy, PowerPoints "Microcomputers" 2022

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

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

Complementary
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