Introduction to L.A.P. 1

Similar documents
Using the Digital I/O interface of STMicroelectronics STM32 Microcontrollers

The I2C BUS Interface

The Serial Peripheral Interface

Using the Special Function Registers of the Digital I/O interface of STM32

Using Timers of Microchip PIC18F Microcontrollers

Using the Special Function Registers of the Digital I/O interface of STM32

The Analog to Digital Converter (ADC)

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Additional Timer Functionalities. Capture, Compare, PWM

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

Chapter 15. ARM MCUs Architecture, Programming and Development Tools

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Basic Components of Digital Computer

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

The Controller Area Network (CAN) Interface

Lecture 1. Course Overview and The 8051 Architecture

Advanced Embedded Systems

Unlocking the Potential of Your Microcontroller

Diploma in Embedded Systems

8051 Microcontroller

Introduction to ARM LPC2148 Microcontroller

PIC Microcontroller and

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Embedded Robotics. Software Development & Education Center

Goal: We want to build an autonomous vehicle (robot)

Quick Start Guide TRK-KEA. Kinetis EA Series MCUs for Automotive Electronics Applications. StarterTRAK

1 Microprocessors 2 Microcontrollers 3 Actuation sensing, process control

Interconnects, Memory, GPIO

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Objective: Additional project details: Code: PSEMBP 100 Category:STEM Level: High School/Community C.

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

EMBEDDED SYSTEM BASICS AND APPLICATION

Reduce SW Development Time with DAVE 3. March, 2012

STM32 Cortex-M3 STM32F STM32L STM32W

Distributed Real-Time Control Systems. Module 3 Hardware for Real Time Distributed Control Systems

ARDUINO BOARD LINE UP

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Kinetis EA Ultra-Reliable Microcontrollers. Automotive and Industrial Applications

EDJE PROJECT. The Software Foundation for IoT Devices. IS2T S.A All rights reserved.

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

Low-Cost Microcontrollers

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

STM32 F0 Value Line. Entry-level MCUs

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Learning Module 9. Managing the Sensor: Embedded Computing. Paul Flikkema. Department of Electrical Engineering Northern Arizona University

Approximately half the power consumption of earlier Renesas Technology products and multiple functions in a 14-pin package

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Embedded Technosolutions

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

Embedded Technosolutions

Somes French translations :

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

AT89S8252 Development Board V1.0. Manual

Overview The Microcontroller The Flex Board Expansion boards Multibus board Demo board How to: Compile demo Flash & Run Demos

Intel Galileo gen 2 Board

Microprocessors/Microcontrollers

Fig 1. Block diagram of a microcomputer

Kinetis KE1xF512 MCUs

Designing with STM32F2x & STM32F4

CONSUMER ELECTRONICS Microwave Ovens

MB95260H/MB95270H. MB95280H Series. MB95260H Series/MB95270H Series/

Final Exam Study Guide

User Manual. LPC-StickView V3.0. for LPC-Stick (LPC2468) LPC2478-Stick LPC3250-Stick. Contents

ATmega128. Introduction

University Program Advance Material

Freedom FRDM-KV31F Development Platform User s Guide

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

2-Oct-13. the world s most energy friendly microcontrollers and radios

Husarion CORE2. Husarion CORE2 is a development board for Internet-connected automation & robotic devices.

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

NXP Unveils Its First ARM Cortex -M4 Based Controller Family

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Computer Hardware Requirements for Real-Time Applications

AVR Microcontrollers Architecture

New 70 MIPS dspic33ep and PIC24EP Family High Performance, Integrated Analog, Easy Migration

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

1. Attempt any three of the following: 15

Introduction to 8051 microcontrollers

Z8 Encore! XP F0822 Series

HVP-KV10Z32 User s Guide

F 2 MC-8FX Family. 8-bit Microcontroller. MB95200 Series

Introduction to Embedded Programming with ARM Cortex-M3

Getting to know the Arduino IDE

CORRIGENDUM ISSUED FOR NATIONAL COMPETITIVE BIDDING UNDER TEQIP PHASE-II

STM32F3. Cuauhtémoc Carbajal ITESM CEM 12/08/2013

EMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Skill Badge Requirements: Microcontrollers

MICROPROCESSORS B (17.384) Spring Lecture Outline

Ultra Low Power Microcontroller - Design Criteria - June 2017

Lab 1 Introduction to Microcontroller

A Low-Cost Energy Management System That Compares Power Consumption of Electronic Home Appliances

EMBEDDED SYSTEMS READY TO USE LECTURE MATERIALS FOR UNDERGRADUATES

(Embedded) Systems Programming Overview

Transcription:

Introduction to L.A.P. 1 Corrado Santoro ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.A.P. 1 Course

What is a Microcontroller? A Microcontroller (MCU) is an integrated circuit including all parts of complete computer. In includes: CPU Built-in oscillator for clock source Flash memory (in the order of KBytes/MBytes), to hold the program RAM, in the order of KBytes/MBytes Several I/O peripherals for both generic and specific purposes In its PINs, a microcontroller does not provides the BUS (as in normal CPUs) but the I/O peripherals.

What is a Microcontroller?

What are the typical peripherals? Digital (1-bit) lines Analog lines Analog-to-Digital (ADC) Digital-to-Analog (DAC) Timers Special digital lines (Pulse-Width-Modulation); Communication interfaces for other devices and/or sensors/actuators: USB UART (serial port) SPI (Serial Peripheral Interface) I2C (I-square-C) CAN (Controller Area Network) Ethernet...

Where are microcontrollers employed? Special-purpose applications/equipments, such as: Measurement equipments; Cars (i.e. automotive industry, engine control, driver assistance); Household Appliances (TV sets, set-top-boxes, DVD, washing machines, microwave ovens, etc.); Previous-generation cellphones and smartphones; Industrial automation, robotics;...

How are microcontrollers programmed? Generally, they run the software in bare metal, i.e. without an operating system. In some cases, they host a very small operating system (e.g. FreeRTOS) able to offer minimum functionalities: a simple driver layer, no MMU, cooperative or preemptive scheduling When the system is programmed in bare metal, the developer has to take care also of programming I/O peripherals

How are microcontrollers programmed? A specific term exists for MCU software: firmware Usually they are programmed in C or assembly through a development tool running in a host computer which includes: A compiler A hardware tool to transfer the code into the flash memory An in-circuit debugger (optional) When the firmware is written in C, the MCU, at power-up, runs the program directly from the main() function.

Microcontrollers: manufacturers and families There are many manufacturers of microcontrollers: Microchip Atmel Freescale STMicroelectronics Intel... A specific microcontroller (the specific chip) is identified by: The core, that is the CPU: 8-bit, 16-bit, 32-bit, etc. The core usually denotes also the family The amount of flash memory and RAM The peripherals which are included in the chip

The MCU we will use! STM32 provides a series Corrado Santoro of evaluation Introduction boards to L.A.P. 1 (Discovery or We will use a MCU of the STM32Fx family by STMicroelectronics. 32-bit ARM-Cortex CPU CPU clock from 80 to 240 MHz Flash memory from 512K to 2M RAM from 512K to 2M Several peripherals (digital, ADC, timers, SPI, I 2 C, CAN, USB, Ethernet)

How can I use/program a MCU? Using MCU implies to use its peripherals Thus, we must learn how to program in C the MCU peripherals A certain region of the system memory is reserved for peripherals In this region, each memory location has a specific meaning These memory locations are called Special Function Registers (SFRs) Writing a data into a SFR implies to program the behaviour of a specific peripheral

How can I access SFR? Using C pointers!! But... The Cortex Microcontroller Software Interface Standard (CMSIS) STM32 libraries export a global variable for each SFR. Therefore, a SFR can be accessed, in C program, by using the relevant variable directly.

The stm32 unict lib Library At first, we do not use SFR directly Access to hardware will be mediated by a library written ad-hoc for the LAP1 course

Tools for the STM32 microcontroller OpenSTM32 IDE (Editor+Compiler): http://www.openstm32.org A terminal emulator program, such as: minicom or cutecom, for Linux; picocomlap1 for Linux (see LAP1 web page); ZOC Terminal, for Win and MacOS. TeraTerm, for Win. The Data Sheet of the MCU STM32F401RE: http://www.st.com/ The STM32F4Cube Libraries (including the CMSIS): http://www.st.com/en/embedded-software/ stm32cubef4.html The STM32-UNICT-LIB Libraries: http: //www.dmi.unict.it/ santoro/index.php?p=13

Resources for the LAP1 Course Course Web Page http: //www.dmi.unict.it/ santoro/index.php?p=13 The Web!

LAP1 Program The digital I/O port of an MCU Elements of circuit analysis; basics of digital circuits Programming models in MCU environments Managing time in MCUs: how to program and use timers Interrupt Management and programming The Analog-to-Digital Converter (ADC) Case-Studies Special signal generation: PWM How to drive a servo-motor How to drive a DC motor How to interface digital and analog sensors How to interface I 2 C/SPI sensors

Requirements Knowledge: Computer Architectures C language Operating Systems Software Engineering Skills: Programming! English

Exams! A test which several questions (6 10) with both open answers and multiple choices A practical exam with a program to be developed onto a MCU board An optional course project

Introduction to L.A.P. 1 Corrado Santoro ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.A.P. 1 Course