The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

ENGINE CONTROL USING M32R/E Aug-00 Mitsubishi Electronics


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



M32R/E 32-bit RISC
ENGINE CONTROL USING M32R/E
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller Abstract
following article will briefly discuss M32R/E (M32170F6VFP) control single-cylinder engine,easily duplicatible into 8-cylinder support. crankshaft position signal input timer, from which fuel injection timing duration well spark timing duration triggered. program operation will explained, followed source code.
M32R/E 32-bit RISC
signal output TO11, using TIO0 delayed shot mode output signal degrees before dead center useconds.
1.3: File Descriptions
engine.c: This file contains main(), which initializes timers ports, then sits while loop forever, while interrupts work. Init.c: This file contains initialization functions, icu_init()- initializes interrupt control unit timer_init()initializes timers, TOP0- delayed single-shot output TIO0- delayed single-shot output T011. Mjti3_intr.c: This file contains interrupt functions, mjti3_intr()- Called input TIN23 tin23_intr()Called from mjti3_intr(), Calculates rotation speed using timer TML0, Adjusts TOP0 TIO0 current rotation speed, starts timers TOP0 TIO0. Start.ms: This startup file, with initial starting point reset vector, "startup:". Function main() called from here. Eit_vect.ms: This assembly file contains vector table vector table. also holds external interrupt handler, EIT_Handle, trap0 handler, EIT_TRAP0, well routines SBI, Makefile: This make file that will build entire project.
1.0: Introduction
M32R/E particularly well suited automotive engine controlling applications. abundance timers channels) converters channels inputs), well channel, 768KB Flash 40KB SRAM, only part features that make this device noteworthy. This application makes frequency generator input simulating crankshaft position sensor. Then output signals, fuel injection spark, read oscilloscope. Thus allowing output input frequency varied. multijunction timers used exclusively this application, showing enable these highly flexible timers. Output timer, TOP0, used, well Input/Output Timer, TIO0. program code will downloaded into M32R/E flash memory using Flash32R.exe. MSA2114 evaluation board will used this demonstration. This board serial port, port, JTAG port, LEDs, switches, potentiometers, etc.
1.4: Memory
memory M32170F6VFP shown below. This controller used engine control demo. Flash space located follows: vector table bytes, starting extending 80H. vector table bytes, starting extending 110H. Flash area 768K bytes deep, starting extending BFFFFH. area bytes deep, starting 800000H extending 80DFFFH. code data this application located follows: vector tables bytes, starting extending 110H. data area bytes deep, starting 805000H. (flash) code area bytes deep, starting 258H.
1.1: Hardware connections
MSA2114 connections necessary this demo are: Frequency generator signal input TIN23. Oscilloscope connection will (fuel injection) TO11 (spark ignition signal). Serial port connection, CN4, connects comm port program downloading.
1.2: Program overview
TIN23 input will used sense crankshaft rotation timing signal. Timer TML0 used measure rotation time, using TIN23 capture enable. crankshaft signal will occurring degrees after dead center. input interrupt (IRQ11) triggered rising edge TIN23. Timers TOP0 TIO0 started inside interrupt routine. fuel injection signal output TO0, using TOP0 delayed shot mode output signal degrees useconds. spark ignition
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller
M32R/E 32-bit RISC
Figure Address Space M32170F6
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller
M32R/E 32-bit RISC
2.0: Source code
Following functions this application. void main(void) init_func(); initialization while wait TIN23 interrupt void init_func(void) icu_init(); timer_init(); port_init(); void icu_init(void) interrupt TIN23 (IRQ11), Crank position/rotation speed TINIR6 ((~TINIM23) 0x0f); clear TIN20-23 interrrupt request enable TIN23 interrupt interrupt priority IMJTICR3 enable maskable interrupt IMASK 0x07; void timer_init(void) initialize clock bus1 10MHz/(*PRS1+1) PRS1 10usec cycle initialize TOP0 output fuel Injector signal degrees after dead center (ATC) /*see corresponding interrupt routine*/ delayed shot pulse output mode(TOP0-3) clock source clock line TOP05CR0 0x5501; TIN0 input enable source selected TIN0 really used, must TINCR0 P15MOD injection signal last 200usec 10MHz ((*PRS0+1) (*TOP0CT+1)) seconds TOP0 reload counter
TOP0CT TOP0RL /*mode output, P11.0 output*/ P11MOD 0x80;
initialize TIO0 output spark ignition signal degrees Dead Center initialize TIO0 output spark ignition signal 400usec /*see corresponding interrupt routine*/ TIO03CR0 0x0009; shot output mode TIN23 input enable source selected really used, must TINCR0 P15MOD TIO03CR1 0x0001; clock source clock line initialize TOP0 seconds till underflow 10MHz ((*PRS0+1) (*TOP0CT+1)) 0.3sec. This value corresponds with ignition occurring deg. TIO0CT TIO0RL1 30000 TIO0 reload counter spark ignition duration 400usec TIO0RL0 mode TO11 output, P10.3 output P10MOD 0x10;
initialize TIN23 measuring time delta between crankshaft rotations /*see corresponding interrupt routine*/ initialize TOP0, spark ignition timing TIN23 external input clock source clock line TML0CR ~TML0SS0; TIN23 select rising edge TINCR4 0x0040; Port P13.7 TIN23 P13MOD 0x01; PIEN 0x01; enable port input void port_init(void) port P11DATA 0x00; data
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller P110-117 output mode P11DIR 0xff; void mjti3_intr(void) unsigned char int_stat; masked interrupt request enabled? int_stat TINIR6 ~((TINIR6<<4)&0XF0) (int_stat TINIS23) TIN23 interrupt request? TINIR6 ~TINIS23; clear TINIS23 interrupt request tin23_intr(); void tin23_intr(void) /*engine crankshaft pulse, indicating*/ crank position degrees delta between captures TML0*/ indicate rotation speed. static unsigned long oldTMLcapture static unsigned long rotationTime; static unsigned long OneDegree; Determine time required last crankshaft rotation. rotation degrees. rotationTime oldTMLcapture; last capture value oldTMLcapture TML0MR0H_TML0MR0L; read capture value rotationTime oldTMLcapture rotationTime; delta value OneDegree rotationTime/360; value degree P11DATA OneDegree; Adjust fuel injection timing, TOP0, occurance degrees after dead center. TOP0RL already adjusted send signal 200usec. TOP0CT (unsigned short)((rotationTime turn timer TOP0 allow TOP0 turned on/off TOPPRO ~TOP0PRO; start TOP0 timer TOPCEN 0xffff;
M32R/E 32-bit RISC
disallow timers turned on/off TOPPRO 0xffff; Adjust spark plug ignition timing, TIO0, occurance degrees dead center. TIO0CT (unsigned short)((rotationTime (IGNITIONPOSITION CRANKPOSITION))/360); turn timer TOP0 allow TIO0 turned on/off TIOPRO ~TIO0PRO; start TIO0 timer TIOCEN 0xffff; disallow timers turned on/off TIOPRO 0xffff;
2.1: Source code files
Here file containing source code files make file build project, using Mitsubishi cc32r compiler.
engine1.zip
3.0: MSA2114 Development Board
MSA2114 evaluation board containing M302170F6VFP engine controller, package. Below diagram board, figure figure diagram RS232 connection Please note following board components: SW2: Mode switch, (on) flash boot mode, (off) user mode. SW1: Reset button controller CN4: RS232 serial communication port CN2: power supply connector board M32170F6 controller device
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller
M32R/E 32-bit RISC
Figure MSA2114 Board Configuration Figure MSA2114 connection connector
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller
M32R/E 32-bit RISC
4.0: Programming Flash using Flash32R
Flash32R Windows program used download program code into flash memory M32170F6 (M32R/E) controller. Figure diagram showing board configuration flash programming. Check following jumpers connections. Please connect comm1 port, using D-sub 9pin-9pin straight cable. Connect power supply connector CN2. Verify jumpers, JP1: Using power from analog power supply JP2: Converting power into 3.3V power supply JP3: Using 3.3V power supply converted from power supply Switch (MOD0): MOD0 jumper jumper J12: RXD0 jumper push (reset) switch, boot from Flash boot ROM. ready invoke Flash32R.exe communicate board.
Figure MSA2114 Configuration host
Aug-00
Mitsubishi Electronics
APM32RJ2700A
M32R/E engine controller
M32R/E 32-bit RISC
4.1: Invoking Flash32R
Flash32R easily downloads user program flash EEPROM MSA2114 operating dialog wizard. Communication COM1. First installFlash32R. Insert "Flash32R setup disk" into floppy drive. Copy files floppy work directory Copy "Flash32r.ini" file from floppy \windows directory Flash32R Windows program invoked clicking Flash32R icon. will screen similar figure References: MSA2114 Evaluation board User's Manual,
1999.6.9 Ver1.00
M32R/E#4(M32170/M32171) Simple Board System, MSA2114 Operation Manual, 1999.3.3 1.00 M32R/E#4(M32170/M32171) Simple Board System, MSA2114, 1999.3.3 1.00 32170 Group User's Manual, 2000-03-17 Ver0.10, MSD-m32170-U-0003 Mitsubishi Microcomputers M32170F6VFP SingleChip 32-bit CMOS microcomputer data sheet, 1999-2-24 Ver0.20
Figure Flash32R Window program. Select correct type under "MCU" menu. Select M32R/E#4 (M32170F6)XIN:10MHz. Select correct program file transmit clicking "Reference" button. Send program file MSA2114 clicking "Start" button. Click "Exit" button when finished programming. Toggle press reset controller user program.
Aug-00
Mitsubishi Electronics
APM32RJ2700A

Other recent searches


SPB-9605MWG - SPB-9605MWG   SPB-9605MWG Datasheet
SNC202S - SNC202S   SNC202S Datasheet
P202CH02-12 - P202CH02-12   P202CH02-12 Datasheet
GS1503 - GS1503   GS1503 Datasheet
GS9023A - GS9023A   GS9023A Datasheet
BAS40LT1 - BAS40LT1   BAS40LT1 Datasheet
2SC4519 - 2SC4519   2SC4519 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive