Commande d’actionneurs à l’aide d’un microprocesseur

Slides:



Advertisements
Similar presentations
Parul Polytechnic Institute
Advertisements

Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
PLC Timer Instructions
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
External Interrupt Module MTT EXTERNAL INTERRUPT REQUEST MODULE (IRQ)
I/O Unit.
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
1-1 SYS Module System Clocks FXTAL BCLK Reset Circuit Reset Conditions Bootstrap Initialization.
Programming 8-bit PIC Microcontrollers in C Martin Bates Elsevier 2008.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Interfacing ‘C542 DSP to Analog Interface Circuit EE113L Week 3 Rick Huang.
Lecture 5. AT91 - Memory Map, Timers, and AIC -
1 EKT 225 MICROCONTROLLER I CHAPTER 3 I/O PORT PROGRAMMING.
V 0.91 Polled IO versus Interrupt Driven IO Polled Input/Output (IO) – processor continually checks IO device to see if it is ready for data transfer –Inefficient,
LPC2148 Programming Using BLUEBOARD
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
Typical Microcontroller Purposes
7/23 Interrupt Controller and Edge Port in Coldfire Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
ECS642U Embedded Systems Digital I/O William Marsh.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
1 General Purpose and Alternate Function I/O (GPIO and AFIO)
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Texas Instruments Incorporated Module 10 : Flash Programming C28x 32-Bit-Digital Signal Controller TMS320F2812.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Chapter 7 Larger Systems and the PIC 16F873A The aims of this chapter are to introduce: The architecture of the 16F873A microcontroller; The 16F873A memory.
IO Subsystem IV Ports and peripherals. IO Subsystem (1) All devices connected to the system buses, other than memory and CPU – Input and output ports.
1 - 1 Digital Signal Controller TMS320F2812 Module 1 : Architecture.
32-Bit-Digital Signal Controller Texas Instruments Incorporated
4 - 1 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH) Module 4 : Interrupt System C28x 32-Bit-Digital.
PPI-8255.
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
MICRO-CONTROLLER MOTOROLA HCS12 Interrupts Mechatronics Department Faculty of Engineering Ain Shams University.
The 8085 Microprocessor Architecture. What 8085 meant for? 80 - year of invention bit processor 5 - uses +5V for power.
Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current.
Chapter Microcontroller
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne
8255:Programmable Peripheral Interface
ARM Embedded Programming Lecture 4 Accessing Memory Mapped Registers.
Lab 2 Microprocessor MPC430F2274 MSP-430 Architecture.
INTV1 & MMCV4 By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg., SITS, Pune-41 URL: microsig.webs.com.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Special Features. Device Configuration bits Revision Device Configuration bits Revision On-chip Power-on Reset (POR) Revision On-chip Power-on Reset (POR)
STM32F107VC Datablad Reference manual Schematics.pdf.
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
1 The LPC1768 Architecture (with focus on Cortex-M3)
COURSE OUTCOMES OF Microprocessor and programming
68HC11 Interrupts & Resets.
Interrupts In 8085 and 8086.
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
The Arduino Microcontroller: Atmel AVR Atmega 328
Interrupt and Exception Programming
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Subject Name: Microcontroller Subject Code: 10ES42
The TMS320C6x Family of DSPs
8259 PROGRAMMABLE INTERRUPT CONTROLLER
8085 Microprocessor Architecture
전자의료시스템 및 실습 System Configuration/Interrupt
8259 PROGRAMMABLE INTERRUPT CONTROLLER
8051 Micro Controller.
8085 Microprocessor Architecture
Presentation transcript:

Commande d’actionneurs à l’aide d’un microprocesseur 1 Prise en main du DSP Christian Koechli

Composants de l’électronique de commande CPU: DSP ou mcontrôleur Signaux de mesure Mesure Capteurs Signaux logiques Driver Alim. de la « logique » Signaux de commande Alim puissance

Texas Instruments TMS320F28069 Processeur 32 bits Architecture Harvard F=90MHz (80 protos) FPU / CLA 256 kB flash 100 kB RAM 1 AD (16 canaux 12 bits 3MSps) SPI/I2C/CAN/USB 2 RS232 54 GPIO 3 CAPTURE +4 HRCap+ 2eQep 8 ePWM

F28069 Block Diagram

Memory Map

Gestion de la mémoire

Watchdog Timer

General Purpose IO

GPIO Multiplexing

Exemple de programmation extern volatile struct GPIO_CTRL_REGS GpioCtrlRegs; extern volatile struct GPIO_DATA_REGS GpioDataRegs; struct GPIO_CTRL_REGS { union GPACTRL_REG GPACTRL; // GPIO A Control Register (GPIO0 to 31) union GPA1_REG GPAQSEL1; // GPIO A Qualifier Select 1 Register (GPIO0 to 15) union GPA2_REG GPAQSEL2; // GPIO A Qualifier Select 2 Register (GPIO16 to 31) union GPA1_REG GPAMUX1; // GPIO A Mux 1 Register (GPIO0 to 15) union GPA2_REG GPAMUX2; // GPIO A Mux 2 Register (GPIO16 to 31) union GPADAT_REG GPADIR; // GPIO A Direction Register (GPIO0 to 31) union GPADAT_REG GPAPUD; // GPIO A Pull Up Disable Register (GPIO0 to 31) Uint32 rsvd1; // reserved union GPBCTRL_REG GPBCTRL; // GPIO B Control Register (GPIO32 to 63) union GPB1_REG GPBQSEL1; // GPIO B Qualifier Select 1 Register (GPIO32 to 47) union GPB2_REG GPBQSEL2; // GPIO B Qualifier Select 2 Register (GPIO48 to 63) union GPB1_REG GPBMUX1; // GPIO B Mux 1 Register (GPIO32 to 47) union GPB2_REG GPBMUX2; // GPIO B Mux 2 Register (GPIO48 to 63) union GPBDAT_REG GPBDIR; // GPIO B Direction Register (GPIO32 to 63) union GPBPUD_REG GPBPUD; // GPIO B Pull Up Disable Register (GPIO32 to 63) Uint16 rsvd2[24];// reserved union AIO_REG AIOMUX1; // Analog IO Mux 1 Register (AIO0 to 15) Uint32 rsvd3; // reserved union AIODAT_REG AIODIR; // Analog IO Direction Register (AIO0 to 15) Uint16 rsvd4[5]; // reserved };

Exemple de programmation struct GPIO_DATA_REGS { union GPADAT_REG GPADAT; // GPIO Data Register (GPIO0 to 31) union GPADAT_REG GPASET; // GPIO Data Set Register (GPIO0 to 31) union GPADAT_REG GPACLEAR; // GPIO Data Clear Register (GPIO0 to 31) union GPADAT_REG GPATOGGLE; // GPIO Data Toggle Register (GPIO0 to 31) union GPBPUD_REG GPBDAT; // GPIO Data Register (GPIO32 to 63) union GPBDAT_REG GPBSET; // GPIO Data Set Register (GPIO32 to 63) union GPBDAT_REG GPBCLEAR; // GPIO Data Clear Register (GPIO32 to 63) union GPBDAT_REG GPBTOGGLE; // GPIO Data Toggle Register (GPIO32to 63) Uint16 rsvd1[8]; // reserved union AIODAT_REG AIODAT; // Analog IO Data Register (AIO0-15) Uint16 rsvd2; union AIODAT_REG AIOSET; // Analog IO Data Set Register (AIO0-15) Uint16 rsvd3; union AIODAT_REG AIOCLEAR; // Analog IO Data Clear Register (AIO0-15) Uint16 rsvd4; union AIODAT_REG AIOTOGGLE; // Analog IO Data Toggle Register (AIO0-15) Uint16 rsvd5; }; Au reset toutes les pates sont configurées comme IO/input. Pour configurer la patte EPWM1A comme périphérique EPWM : EALLOW; GpioCtrlRegs.GPAMUX1.bit.GPIO0=1 ; EDIS;

Interrupts

Maskable Interrupt Processing Conceptual Core Overview 1 (IFR) “Latch” INT1 INT2 INT14 Core Interrupt C28x Core (INTM) “Global Switch” (IER) “Switch” A valid signal on a specific interrupt line causes the latch to display a “1” in the appropriate bit If the individual and global switches are turned “on” the interrupt reaches the core

Interrupt Flag Register (IFR) RTOSINT DLOGINT INT14 INT13 INT12 INT11 INT10 INT9 8 9 10 11 12 13 14 15 INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1 1 2 3 4 5 6 7 Pending : IFR Bit = 1 Absent : IFR Bit = 0 /*** Manual setting/clearing IFR ***/ extern cregister volatile unsigned int IFR; IFR |= 0x0008; //set INT4 in IFR IFR &= 0xFFF7; //clear INT4 in IFR Compiler generates atomic instructions (non-interruptible) for setting/clearing IFR If interrupt occurs when writing IFR, interrupt has priority IFR(bit) cleared when interrupt is acknowledged by CPU Register cleared on reset

Interrupt Enable Register (IER) RTOSINT DLOGINT INT14 INT13 INT12 INT11 INT10 INT9 8 9 10 11 12 13 14 15 INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1 1 2 3 4 5 6 7 Enable: Set IER Bit = 1 Disable: Clear IER Bit = 0 /*** Interrupt Enable Register ***/ extern cregister volatile unsigned int IER; IER |= 0x0008; //enable INT4 in IER IER &= 0xFFF7; //disable INT4 in IER Compiler generates atomic instructions (non-interruptible) for setting/clearing IER Register cleared on reset

Interrupt Global Mask Bit INTM ST1 Bit 0 INTM used to globally enable/disable interrupts: Enable: INTM = 0 Disable: INTM = 1 (reset value) INTM modified from assembly code only: /*** Global Interrupts ***/ asm(“ CLRC INTM”); //enable global interrupts asm(“ SETC INTM”); //disable global interrupts

F28069 PIE Interrupt Assignment Table

Déroulement d’un appel d’interruption