Introduction to L.A.P. 1

Similar documents
Chapter 13. PIC Family Microcontroller

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Fondamenti su strumenti di sviluppo per microcontrollori PIC

2.0 Command and Data Handling Subsystem

Lab Experiment 1: The LPC 2148 Education Board

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Tutorial for MPLAB Starter Kit for PIC18F

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Soft processors for microcontroller programming education

Microcontrollers in Practice

FLYPORT Wi-Fi G

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

Microtronics technologies Mobile:

Lecture N -1- PHYS Microcontrollers

Chapter 2 Features of Embedded System

EMBEDDED SYSTEM BASICS AND APPLICATION

An Introduction to MPLAB Integrated Development Environment

Atmel Norway XMEGA Introduction

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

USB OTG and Embedded Host Microchip Technology Incorporated. All Rights Reserved. Slide 1

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Embedded Component Based Programming with DAVE 3

STM32 F-2 series High-performance Cortex-M3 MCUs

Evo Laser Firmware Developer s Manual

Computer Automation Techniques. Arthur Carroll

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Serial port interface for microcontroller embedded into integrated power meter

THE TRANSITION FROM THE 8085 TO THE MODERN WORLD

EasyPIC4 User s Manual

AN-812 APPLICATION NOTE

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

AN4646 Application note

ARM Cortex -A8 SBC with MIPI CSI Camera and Spartan -6 FPGA SBC1654

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

ET-BASE AVR ATmega64/128

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

GAS LEAKAGE DETECTION & AUTO ON-OFF GAS SYSTEM

Computer and Set of Robots

Embedded Patient Monitoring System

ontroller LSI with Built-in High- Performance Graphic Functions for Automotive Applications

POCKET SCOPE 2. The idea 2. Design criteria 3

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

USER GUIDE EDBG. Description

QT1 Xplained Pro. Preface. Atmel QTouch USER GUIDE

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Freescale Semiconductor, I

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

Efficient Authorized Access Security System Control Using ATMEL 89C55 & Mobile Bluetooth

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Analog-to-Digital Converters

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Evolution of 8-bit Microcontrollers

8051 MICROCONTROLLER COURSE

Advanced Microcontrollers Grzegorz Budzyń Lecture. 3: Electrical parameters of microcontrollers 8051 family

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

STM32L. Ultra-low-power Cortex -M3 devices

MX PIC24F Educational Module User Manual

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

HMI EMBEDDED SYSTEM DESIGN AS A FUNCTION OF TECU

SBC8600B Single Board Computer

Introduction. Getting familiar with chipkit Pi

DAC Digital To Analog Converter

Accurate Measurement of the Mains Electricity Frequency

MPX28. o UART, SD-CARD, I2C, PWM, Serial Audio, SPI Power management optimized for long battery life 3.3V I/O

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

Microcontrollers and Sensors. Scott Gilliland - zeroping@gmail

Microprocessor or Microcontroller?

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

System Design Issues in Embedded Processing

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Data Transfer between Two USB Flash SCSI Disks using a Touch Screen

Conversion Between Analog and Digital Signals

Serial Communications

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Section 28. In-Circuit Serial Programming (ICSP )

Design Considerations in Adding USB Communications to Embedded Applications

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

dspic30f4012 Microcontroller

Chapter 12. Development Tools for Microcontroller Applications

Designing VM2 Application Boards

AN3998 Application note

Microcontrollers Figure 26-1 Objectives Key Words and Terms 26.1 OVERVIEW OF THE MICROCONTROLLER microcontroller

76-77 GHz RF Transmitter Front-end for W-band Radar Applications

Using the HT1632 for Dot Matrix LED Displays

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

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 themain() 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! We will use the MCUPIC18F25K22 by Microchip. 8-bit ARM-Cortex CPU CPU clock from 8 to 64 MHz 32K of flash memory 1532 bytes of RAM Several peripherals (digital, ADC, timers, SPI, I 2 C)

The MCU we will use! We will use a MCU of thestm32fx 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)

ThePIC18F25K22 The figure shows the pinout of the PIC18F25K22 microcontroller: VDD, VSS. These are the pins to power-up the MCU (the voltage used is 5V or 3.3V) MCLR. The Master Clear (RESET) pin; connecting this pin to ground (VSS, 0V) causes a CPU reset. All other pins are relative to I/O peripherals.

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

Some SFR of thepic18f25k22 The meaning of each SFR is reported in the programmer s manual of the specific MCU

How can I access SFR? Using C pointers!! But... The Microchip C compiler exports a global variable for each SFR, whose name matches the name of the SFR. Therefore, a SFR can be accessed, in C program, by using the relevant variable directly.

Resources for the PIC microcontroller Microchip MPLABX IDE: http://www.microchip.com/mplabx Microchip C compiler for 8-bit MCU, XC8: http://www.microchip.com/mplabx 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 PIC18F25K22: http://www.microchip.com/

Resources for the STM32 microcontroller OpenSTM32 IDE:http://www.openstm32.org The Data Sheet of the MCU STM32Fx: http://www.st.com/

Resources for the LAP1 Course Course Web Page (from http://www.dmi.unict.it/ santoro) A reference book: Dogan Ibrahim, PIC Microcontroller Projects in C - Basic to Advanced, Newnes The Web!

LAP1 Program Elements of circuit analysis; basics of digital circuits The digital I/O port of an MCU Programming models in MCU environments Managing time in MCUs: how to program and use timers Interrupt Management and programming Communication Interfaces in MCU: UART, I 2 C, SPI 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 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