Fuel Injection Control for a 12 Cylinder Formula 1 Engine

Similar documents
Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Microprocessors/Microcontrollers

1. Attempt any three of the following: 15

MSK2. May 2012 Frankie Chan (IFAP ATV SMD SAE)

Description of the Simulator

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017

AP Bit CMOS Microcontroller Product. Interrupt Response Time of the XC16x Family. Microcontrollers. Application Note, V 1.0, Aug.

Engine Control etpu Library Covers all MPC5500, MPC5600, and MPC5700 Devices Featured with the Enhanced Time Processing Unit (etpu)

Developing Measurement and Control Applications with the LabVIEW FPGA Pioneer System

MPC55xx Highlighted Features

8051 Microcontroller

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Introduction to the MC9S12 Hardware Subsystems

Introduction to Computers - Chapter 4

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

8051 Microcontroller Interrupts

A First Look at Microprocessors

M16C/62 APPLICATION NOTE. Using the Expanded Memory Mode with the M16C/ Abstract. 2.0 Introduction. 3.0 Memory Expansion Mode

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices.

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

Computer Hardware Requirements for Real-Time Applications

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Interrupts, timers and counters

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK

VORAGO VA108x0 I 2 C programming application note

Errata Sheet. January 11, 1999 / Release 1.2. Stepping Code / Marking:

EECS 373 Midterm Winter 2013

UBC104 Embedded Systems. Review: Introduction to Microcontrollers

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

Three criteria in Choosing a Microcontroller

AN-8205 AMC Library Hall Interface Summary AMC Introduction

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

AUTOMOBILE APPLICATIONS USING CAN PROTOCOL

Unit wise Question Bank UNIT-II

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

UNIT 3 THE 8051-REAL WORLD INTERFACING

Have difficulty identifying any products Not incorporating embedded processor FPGA or CPLD In one form or another

SRI VENKATESWARA COLLEGE OF ENGINEERING

Using the Engine Position (CRANK and CAM) etpu Functions

Fujitsu Microelectronics Europe Application Note MCU-AN E-V10 F²MC-FR FAMILY 32-BIT MICROCONTROLLER MB91460 RELOAD TIMER APPLICATION NOTE

538 Lecture Notes Week 1

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

8051 Microcontrollers

Chapter 2. Overview of Architecture and Microcontroller-Resources

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Microcomputer Architecture and Programming

Programming at different levels

Grundlagen Microcontroller Interrupts. Günther Gridling Bettina Weiss

QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS

Analog Output with a Digital to Analog Converter

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

Emulating an asynchronous serial interface (ASC0) via software routines

KiBox To Go. Electronics & Software. Measurement and Evaluation System for Combustion Analysis on Test Benches and in Vehicles

Microcontroller Introduction

Question Bank Microprocessor and Microcontroller

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

AVR Microcontrollers Architecture

XE166 Family AP Application Note. Microcontrollers. X E D r i v e C a r d H a r d w a r e D e s c r i p t i o n Board REV.

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

TRANSPUTER ARCHITECTURE

Lab 5: EBI and ADC: Digital Voltmeter

MICROPROCESSOR BASED SYSTEM DESIGN

The MPC500 Family of 32-bit Embedded Controllers from Motorola. Rudan Bettelheim MCU Marketing Manager 32-bit Embedded Controller Division, SPS

8051 Microcontroller

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Team 8: Robert Blake Craig Goliber Alanna Ocampo

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

Data Analytics of High Frequency Engine Rotational Speed Using MATLAB

ECE 492 WINTER 2015 GROUP 2. Texas Instruments MSP430-FR Bit ADC Setup Guide

Lecture 6: memory structure 8086 Outline: 1.introduction 2.memory reserve 3.bus operation

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017

Chapter 1. Microcontroller Overview

One 32-bit counter that can be free running or generate periodic interrupts

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

XC2000 Family AP Application Note. Microcontrollers. XC2236N Drive Card Description V1.0,

Overview of Microcontroller and Embedded Systems

Microcontrollers. Microcontroller

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Introduction to general architectures of 8 and 16 bit micro-processor and micro-controllers

Basic Components of Digital Computer


Measuring Interrupt Latency

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

LUPO TimeStamp Module (Ver. 1.2) Hidetada Baba

EE445L Fall 2010 Final Version A Page 1 of 10

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.

80C51 Block Diagram. CSE Overview 1

Computer Software Requirements for Real-Time Applications

The Mobile Combustion Analyzer from Kistler. KiBox T o Go -Präsentation hoe March 09 1

Application Note One Wire Digital Output. 1 Introduction. 2 Electrical Parameters for One Wire Interface. 3 Start and Data Transmission

Transcription:

Microcontrollers ApNote AP1635 o additional file APXXXX01.EXE available Consequently, the C166 finds many applications in areas such as motor control and automotive engine management where the production of precisely timed pulse trains are required. Michael Beach / Hitex Semiconductor Group 03.97, Rel. 01

Introduction The C166 family is perhaps unique in having 16 high speed I/O pins coupled to a capture and compare (CAPCOM) unit that can be used either as pulse generators or event detectors. The combination of a very fast RISC-like CPU and a 16 channel capture and compare unit (CAPCOM) allows the easy generation of multiple pulse trains, all locked to a single timebase. Consequently, the C166 finds many applications in areas such as motor control and automotive engine management where the production of precisely timed pulse trains are required. As the CAPCOM unit is an integral part of the CPU, it can be fully configured and controlled directly from assembler or C and does not require the use of microcode. This application note outlines how 13 such C166 channels can be used to provide fuel injector waveform drives, as used on a 12 cylinder formula 1 engine. The overall CPU loading to achieve this is just 3.6% at 18000rpm, even when programmed in C! The input pulse train is fed into input capture channel 15 from a sensor giving a negative edge at each cylinder's TDC (top dead center). In a 12 cylinder engine, successive TDCs are 60 degrees apart and at the maximum operating speed of 18000rpm, this corresponds to a time of 555µs between TDC "references". Semiconductor Group 2 of 6 AP1635 03.97

At each TDC, the capture register CC15 latches the value of a free running 16 bit timer, running at a 1.6µs per count. An interrupt service routine is subsequently called, during which the C166 must make an analog to digital conversion of the throttle position (and hence mass airflow), read the injector firing angle, relative to the TDC from a table and then create a turn-on time-out using a compare output to turn that cylinder's injector on. It must also immediately switch off the injector, in case it is still on from the previous cycle, as might happen under high acceleration conditions. This foreshortening of the truncated pulse requires the fuel deficit to be made up by a transient fueling strategy which is outside the scope of this piece. Semiconductor Group 3 of 6 AP1635 03.97

/*** Crankshaft TDC Interrupt ***/ void tdc_int(void) interrupt 0x1f using TDCREGS { unsigned int temp, time_for_60 ; // Make this a register variable unsigned int time_last_60 ; // These are really static but dedicated unsigned int tooth_count ; // regbank TDCREGS makes them like static // register variables /*** Read Pressure Channel For Synchronous Fuelling ***/ ADCON = 0 ; ADST = 1 ; // Set AN0 // Start conversion time_for_60 = CC15 - time_last_60 ; // Find time between references In a conventional processor, the CPU working registers would have to be pushed onto the stack on entry to the interrupt routine, resulting a delay of many microseconds before the CPU is in a position to start processing. The C166 allows a simple context switch to be performed to make available a fresh set of working registers. This uses the SCXT ("switch context") instruction and takes 100ns - the "USING" control in the function prototype above performs the switch from C. With this dedicated set of registers, all the data used can be held purely in registers so that most instructions take just 100ns - in keeping with the RISC-like CPU design. The conversion from the angle domain into the time domain, necessary to create the injector firing angle time-out, is performed by a scaling calculation, based on the measured time since the last TDC interrupt. As the compare registers are attached to the same timer as the input capture, the calculated firing angle time-out is simply added to the captured value of the time at the start of the TDC interrupt. The preceding calculations give sufficient time to allow the A/D conversion to be completed. The result is fed into a two-dimensional look-up table interpolator, along with the engine speed to obtain the required injector pulsewidth, based on the A/D reading and the engine speed. By structuring the C source for the interpolator function to take best advantage of the C166 core design, the run time can be got down to just 24µs. Overall, the software effectively simulates the fuel distributor found in a mechanical system, such as Bosch K-Jetronic. The distribution of injector pulses is performed via a reference count, which allows each individual cylinder's TDC to be identified and hence the appropriate injector to be fired via one of the 12 CAPCOM outputs. When the compare register matches the timer value after the calculated time-out period, the corresponding compare pin changes state to switch the injector on. A simple interrupt routine is now required to set the turn off time-out, to define the injector opening time. This injector-off interrupt takes a total of just 0.4µs! Semiconductor Group 4 of 6 AP1635 03.97

/*** Injector On Interrupts To Determine On-Time ***/ void CC0_int(void) interrupt 0x10 { CC0 += inj_pw ; CC0IE = 0 ; // No more interrupts until next ref The problem arises when the engine is accelerating hard as the injector firing angle to time-out conversion will be wrong as it was based on a time between references that is no longer current. temp = inj_delay_angle/max_timeout_angle ; timeout_angle[tooth_count] = MDH ; // Decide angle to timeout over. This // direct access to MDH gives the // remainder without doing a DIV again. temp += tooth_count ; out from if(temp >= No_Of_Cylinders) { per cycle temp -= No_Of_Cylinders; // Decide which tooth to time // Limit to correct no of teeth timeout_tooth[tooth_count] = temp ; The solution is to time-out each firing angle from the reference just before the required angle. This simply amounts to subtracting multiples of 60 degrees from the angle and then just timing out over the remainder of angle/60. The overall effect is to count references until the one just before the required firing point and then to set the time-out. /*** Check If We Need To Timeout From This Tooth ***/ if(timeout_tooth[0] == tooth_count) { temp = timeout_angle[0] ; temp = ((unsigned long)time_for_60 * temp)/max_timeout_angle ; // Inline DIV CC0 = temp + T0 ; CC0IR = 0 ; // Could be done with a pointer CCxIC! CC0IE = 1 ; if(timeout_tooth[1] == tooth_count) {... etc. Semiconductor Group 5 of 6 AP1635 03.97

The overall run time of the whole TDC interrupt is 45.9µs, including 25µs for the 2- dimensional look up table interpolation, at a CPU clock of 20MHz with a 16 bit nonmultiplexed bus. The overall CPU load to perform the injector drive signal amounts to just 3.6% at 18000 rpm or 7% when the interpolation is included. Semiconductor Group 6 of 6 AP1635 03.97