INDUSTRIAL ELECTRONIC SYSTEMS
cod. 13131

Academic year 2022/23
3° year of course - Second semester
Professor
- Luciano VARANI
Academic discipline
Elettronica (ING-INF/01)
Field
"altre conoscenze utili per l'inserimento nel mondo del lavoro"
Type of training activity
More
48 hours
of face-to-face activities
6 credits
hub: PARMA
course unit
in ITALIAN

Learning objectives

Knowledge of 32-bit microcontroller

Prerequisites

Knowledge of digital electronics, programming in 'C' language

Course unit content

Architecture and programming of microcontrollers

Full programme

The advantages in using microcontrollers.
Microcontroller architecture: ALU, Program memory, data memory, peripherals
Internal bus; 8-16-32 bit micro;
The clock generator.
(4 hours)

The most common peripherals: IO lines, timers, AD converters, communication lines
Some more complex devices: PWM manager, IIC protocol manager, USART
Other devices available on recent microcontrollers. (2 hours)

POLLING, INTERRUPTIONS, DMA
Polling, interruptions and DMA compared.
IO lines and interruptions
IRQ line assignment to an IO line
Enabling and replying to IO requests (2 hours)

ENVIRONMENT FOR DEVELOPMENT FOR MICRO STM32
Configuration of a project, with choice of micro and programming-debugging software
Use of the C compiler intended for the development environment (Atollic- TrueStudio) (2 hours)

CARD STM Core 32F401
Reading the scheme
The STM32f401 CPU, essential features. Assignment (in the pinout tab to resources.
Main oscillator and oscillator for the clock
Reset (2 hours)

HELP SOWTWARE: STM32CubeMX
Creation of a new project.
Indications for the device
Examining the 'C' code and transferring it to TrueSTUDIO (2 hours)


The projects and the STM environment
Editing and Compilation. Error detection.
Debugging and positioning of break-points.
How to change the C code to answer the interrupt call. Transfer of the code (2 hours)

BUTTONS, ANTI-TIMES AND INTERRUPTIONS
Buttons for the user: on board and external Assignment of the IRQs for the SW1, SW2 and SW3 buttons;
Interception of the interruptions by button.
Rebound problem
Example code for the interception of IRQ coming from three different buttons. (2 hours)

TIMERS
Time measurement and event counting: 8-bit and 16-bit timer / counters available on the micro
Prescaler and its use.
Interrupt on overflow.
Example of measurement of distance between two events, for example). (2 hours)

CONVERTERS AD
Converting AD to successive approximations
General principles.
Conversion example
Conversion start
End of conversion and generation of signal interruption. (2 hours)

PWM MANAGEMENT
General concepts on the PWM
Analysis of a project able to regulate the PWM output to establish the rotation speed of a DC motor. (2 hours)
Management of elementary communication protocols (2 hours)

COMMUNICATION PROTOCOLS
Simple protocols with UART and / or I2C will be considered
(4 hours)


Laboratory activity aimed at creating a micro control system (24 hours)
This second part will include the examination of specific buttons, sensors and / or transducers, the control of electromechanical devices such as
DC motors, solenoid valves, character display.

Bibliography

Slide lessons, Data sheet

Teaching methods

Assessment methods and criteria

Written exam followed by discussion on a project developed

Other information

At the end of the course, the student must provide a documented and working project including a micro STM32, made with a board made available by the laboratories.