FreeEMS
0.2.0-SNAPSHOT-282-g9efc524
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
main
decoders
code
NipponDenso-24and1and1.c
Go to the documentation of this file.
1
/* FreeEMS - the open source engine management system
2
*
3
* Copyright 2008-2014 Fred Cooke
4
*
5
* This file is part of the FreeEMS project.
6
*
7
* FreeEMS software is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* FreeEMS software is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
19
*
20
* We ask that if you make any changes to this file you email them upstream to
21
* us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
22
*
23
* Thank you for choosing FreeEMS to run your engine!
24
*/
25
26
27
/** @file
28
*
29
* @ingroup interruptHandlers
30
* @ingroup enginePositionRPMDecoders
31
*
32
* @brief Reads Nippon Denso 24/2 sensors
33
*
34
* This file contains the two interrupt service routines for handling engine
35
* position and RPM signals from mainly Toyota engines using this sensor style.
36
*
37
* One ISR handles the 24 evenly spaced teeth and the other handles the two
38
* adjacent teeth. This signal style provides enough information for wasted
39
* spark ignition and semi sequential fuel injection.
40
*
41
* Supported engines include:
42
* - 4A-GE
43
* - 7A-FE
44
* - 3S-GE
45
* - 1UZ-FE
46
* - Mazda F2T
47
*
48
* @note Pseudo code that does not compile with zero warnings and errors MUST be commented out.
49
*/
50
51
52
#define DECODER_IMPLEMENTATION_C
53
#define DECODER_MAX_CODE_TIME 150 // To be optimised (shortened)!
54
#define NUMBER_OF_REAL_EVENTS 24
55
#define NUMBER_OF_VIRTUAL_EVENTS 24
56
57
#include "../inc/freeEMS.h"
58
#include "../inc/interrupts.h"
59
#include "../inc/decoderInterface.h"
60
#include "../inc/utils.h"
61
62
63
const
unsigned
short
eventAngles
[] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690};
64
//const unsigned char eventValidForCrankSync[] = {?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?}; // Needs some thought.
65
66
67
#include "../inc/defaultPrimaryRPMISR.c"
68
#include "../inc/defaultSecondaryRPMISR.c"
Generated on Fri May 22 2015 10:24:05 for FreeEMS by
1.8.1.2