Speeduino
Loading...
Searching...
No Matches
Functions
decoders.h File Reference
#include <stdint.h>
#include "decoder_t.h"

Go to the source code of this file.

Functions

void loggerPrimaryISR (void)
 
void loggerSecondaryISR (void)
 
void loggerTertiaryISR (void)
 
int getCamAngle_Miata9905 (void)
 
decoder_t triggerSetup_missingTooth (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_DualWheel (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_BasicDistributor (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_GM7X (void)
 
decoder_t triggerSetup_4G63 (void)
 
decoder_t triggerSetup_24X (void)
 
decoder_t triggerSetup_Jeep2000 (void)
 
decoder_t triggerSetup_Audi135 (void)
 
decoder_t triggerSetup_HondaD17 (void)
 
decoder_t triggerSetup_HondaJ32 (void)
 
decoder_t triggerSetup_Miata9905 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_MazdaAU (void)
 
decoder_t triggerSetup_non360 (void)
 
decoder_t triggerSetup_Nissan360 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_Subaru67 (void)
 
decoder_t triggerSetup_Daihatsu (void)
 
decoder_t triggerSetup_Harley (void)
 
decoder_t triggerSetup_ThirtySixMinus222 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_ThirtySixMinus21 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_420a (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_Webber (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_FordST170 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_DRZ400 (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_NGC (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_Renix (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_RoverMEMS (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_Vmax (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_SuzukiK6A (void)
 Setup function for each decoder type.
 
decoder_t triggerSetup_FordTFI (void)
 

Function Documentation

◆ getCamAngle_Miata9905()

int getCamAngle_Miata9905 ( void  )

Miata '99 to '05 with 4x 70 degree duration teeth running at cam speed. Teeth believed to be at the same angles as the 4g63 decoder. Tooth #1 is defined as the next crank tooth after the crank signal is HIGH when the cam signal is falling. Tooth number one is at 355* ATDC. (See: www.forum.diyefi.org/viewtopic.php?f=56&t=1077)

◆ triggerSetup_24X()

decoder_t triggerSetup_24X ( void  )

GM 24X Decoder (eg early LS1 1996-2005). Note: Useful references:

  • www.vems.hu/wiki/index.php?page=MembersPage%2FJorgenKarlsson%2FTwentyFourX

Provided that the cam signal is used, this decoder simply counts the teeth and then looks their angles up against a lookup table. The cam signal is used to determine tooth #1

◆ triggerSetup_4G63()

decoder_t triggerSetup_4G63 ( void  )

Mitsubishi 4G63 / NA/NB Miata + MX-5 / 4/2. Note: raw.githubusercontent.com/noisymime/speeduino/master/reference/wiki/decoders/4g63_trace.png Tooth #1 is defined as the next crank tooth after the crank signal is HIGH when the cam signal is falling. Tooth number one is at 355* ATDC.

◆ triggerSetup_Audi135()

decoder_t triggerSetup_Audi135 ( void  )

Audi with 135 teeth on the crank and 1 tooth on the cam. This is very similar to the dual wheel decoder, however due to the 135 teeth not dividing evenly into 360, only every 3rd crank tooth is used in calculating the crank angle. This effectively makes it a 45 tooth dual wheel setup.

◆ triggerSetup_Daihatsu()

decoder_t triggerSetup_Daihatsu ( void  )

Daihatsu +1 trigger for 3 and 4 cylinder engines. Tooth equal to the number of cylinders are evenly spaced on the cam. No position sensing (Distributor is retained), so crank angle is a made up figure based purely on the first teeth to be seen. Note: This is a very simple decoder. See http://www.megamanual.com/ms2/GM_7pinHEI.htm

◆ triggerSetup_DRZ400()

decoder_t triggerSetup_DRZ400 ( void  )

Setup function for each decoder type.

◆ triggerSetup_DualWheel()

decoder_t triggerSetup_DualWheel ( void  )

Setup function for each decoder type.

◆ triggerSetup_GM7X()

decoder_t triggerSetup_GM7X ( void  )

Decode GM 7X trigger wheel with six equally spaced teeth and a seventh tooth for cylinder identification. Note: Within the decoder code pf GM7X, the sync tooth is referred to as tooth #3 rather than tooth #7. This makes for simpler angle calculations (See: http://www.speeduino.com/forum/download/file.php?id=4743 ).

◆ triggerSetup_Harley()

decoder_t triggerSetup_Harley ( void  )

Harley Davidson (V2) with 2 unevenly Spaced Teeth. Within the decoder code, the sync tooth is referred to as tooth #1. Derived from GMX7 and adapted for Harley. Only rising Edge is used for simplicity.The second input is ignored, as it does not help to resolve cam position.

◆ triggerSetup_HondaD17()

decoder_t triggerSetup_HondaD17 ( void  )

Honda D17 (1.7 liter 4 cyl SOHC).

◆ triggerSetup_HondaJ32()

decoder_t triggerSetup_HondaJ32 ( void  )

Honda J 32 (3.2 liter 6 cyl SOHC). The Honda J32a4 (and all J series I'm aware of) has a crank trigger with nominal 24 teeth (22 teeth actually present). It has one missing tooth, then 7 teeth, then another missing tooth, then 15 teeth. The tooth rising edges all have uniform spacing between them, except for teeth 14 and 22, which measure about 18 degrees between rising edges, rather than 15 degrees as the other teeth do. These slightly larger teeth are immediately before a gap, and the extra 3 degrees is made up for in the gap, the gap being about 3 degrees smaller than might be nominally expected, such that the expected rotational angle is restored immediately after the gap (missing tooth) passes.
Teeth are represented as 0V at the ECU, no teeth are represented as 5V. Top dead center of cylinder number 1 occurs as we lose sight of (just pass) the first tooth in the string of 15 teeth (this is a rising edge). The second tooth in the string of 15 teeth is designated as tooth 1 in this code. This means that when the interrupt for tooth 1 fires (as we just pass tooth 1), crank angle = 360/24 = 15 degrees. It follows that the first tooth in the string of 7 teeth is tooth 16.

◆ triggerSetup_Jeep2000()

decoder_t triggerSetup_Jeep2000 ( void  )

Jeep 2000 - 24 crank teeth over 720 degrees, in groups of 4 ('91 to 2000 6 cylinder Jeep engines). Crank wheel is high for 360 crank degrees. Quite similar to the 24X setup. As we only need timing within 360 degrees, only 12 tooth angles are defined. Tooth number 1 represents the first tooth seen after the cam signal goes high. www.speeduino.com/forum/download/file.php?id=205

◆ triggerSetup_MazdaAU()

decoder_t triggerSetup_MazdaAU ( void  )

Mazda AU version. Tooth #2 is defined as the next crank tooth after the single cam tooth. Tooth number one is at 348* ATDC.

◆ triggerSetup_Miata9905()

decoder_t triggerSetup_Miata9905 ( void  )

Setup function for each decoder type.

◆ triggerSetup_missingTooth()

decoder_t triggerSetup_missingTooth ( void  )

Setup function for each decoder type.

◆ triggerSetup_non360()

decoder_t triggerSetup_non360 ( void  )

Non-360 Dual wheel with 2 wheels located either both on the crank or with the primary on the crank and the secondary on the cam. There can be no missing teeth on the primary wheel.

◆ triggerSetup_Subaru67()

decoder_t triggerSetup_Subaru67 ( void  )

Subaru 6/7 Trigger pattern decoder for 6 tooth (irregularly spaced) crank and 7 tooth (also fairly irregular) cam wheels (eg late 90's Impreza 2.2). This seems to be present in late 90's Subaru. In 2001 Subaru moved to 36-2-2-2 (See: http://www.vems.hu/wiki/index.php?page=InputTrigger%2FSubaruTrigger ).