## ## ##### ## ## ## ## ## ## #####
### ## ### ## ## ## ## ## ### ## ## ## ###
__ __ \ \ / / \ \ / / \ \/ / \ / \/
##### ## ## ## ## ## ## ## ##
_____ / ___| \ `--. `--. \ /\__/ / \____/
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '''This page list the outputs that can be used for GenBoard/Manual/DigitalOut configuration and testing'''. Injector drivers are primarily used for driving injectors, but any (otherwise) free channel can be configured for any output. The same goes for all the drivers, including ignition and idle solenoid outputs. ---- '''For inductive loads''' it must be verified that the '''chosen driver handles flyback'''. * Injector drivers are normally populated with GenBoard/Manual/DDFlyback - make sure yours are too * IGBTs (usually used for ignition) have internal clamping that provide an appr. 400V flyback voltage * P259 have internal appr. 50V flyback * stepper channels also have flyback '''No flyback on''' * WBO2 heater1 and 2 * SPECFET 0 and 1 (DRIVE_A and DRIVE_B) so be extremely careful with these. It is easy to apply a simple diode onboard or in the harness to provide flyback if needed, but without it the FET dies (and maybe other things too) when inductive load is switched with it. '''Note''': the IDL output is only ment to be used with the ON/OFF type solenoids, driving the relay (max 350mA) that drives the valve. If you want to drive a PWM controlled idle valve directly it's best to use one of the free INJ outputs they can handle much more current (max 10A) and are equipped with flyback. ---- ||'''Family'''||'''Number'''||'''mdh ON/OFF'''||same in decimal||'''Pin'''||'''Name'''||'''Max Load'''||'''Comments'''|| ||SPECFET||5||D1/51||81||EC18 pin 12||Drive A||7 A||Misc driver|| ||SPECFET||6||E1/61||97||EC18 pin 6||Drive B||7 A||Misc driver|| ||I259||0||82/02||2||EC36 pin 35||Drive 00||7 A||Ignition Driver|| ||I259||1||92/12||18||EC36 pin 33||Drive 01||7 A||Ignition Driver|| ||I259||2||A2/22||34||EC36 pin 34||Drive 02||7 A||Ignition Driver|| ||I259||3||B2/32||50||EC36 pin 36||Drive 03||7 A||Ignition Driver|| ||I259||4||C2/42||66||EC36 pin 11||Drive 04||7 A||Ignition Driver|| ||I259||5||D2/52||82||EC36 pin 12||Drive 05||7 A||Ignition Driver|| ||I259||6||E2/62||98||EC36 pin 24||Drive 06||7 A||Ignition Driver|| ||I259||7||F2/72||114||EC36 pin 10||Drive 07||7 A||Ignition Driver|| ||S259||0||86/06||6|| N/A ||lcd_rs||N/A||Used internally|| ||S259||1||96/16||22|| (Onboard) ||S259 Out1||logic||Has to be soldered|| ||S259||2||A6/26||38|| (Onboard) ||S259 Out2||logic||Check board layout|| ||S259||3||B6/36||54|| EC18 pin 4||Step A||1A||Can be used for stepper|| ||S259||4||C6/46||70||EC18 pin 10 ||Step B||1A||Or as separate drivers with || ||S259||5||D6/56||86||EC18 pin 5 ||Step C||1A||stepper chip populated|| ||S259||6||E6/66||102||EC18 pin 11||Step D||1A||otherwise, internal logic level|| ||S259||7||F6/76||118|| N/A ||EN_ab||N/A||used internally|| ||P259||0||87/07||7||EC36 pin 4||Drive 08||350mA||Free. Often tach-out|| ||P259||1||97/17||23||EC36 pin 16||Drive 09||350mA||Free for any usage|| ||P259||2||A7/27||39||(Onboard) ||CL LED||350mA||Onboard, LED1|| ||P259||3||B7/37||55||(Onboard) ||MISC LED||350mA||Onboard, LED2|| ||P259||4||C7/47||71||EC36 pin 3||IDL||350mA||Idle solenoid relay|| ||P259||5||D7/57||87||EC36 pin 15||FP||350mA||Fuel pump relay|| ||P259||6||E7/67||103||EC36 pin 31||Drive 10||350mA||Free for any usage|| ||P259||7||F7/77||119||EC36 pin 30||Drive 11||350mA||Free for any usage|| Notes: * when using mdh.. command for testing (take care what is connected, eg. a coil will fry) add hexa 80 to turn the signal on: eg. mdhf2 turns I259/7 (that is the gate-signal for the IGBT that drives Drive07) on, while mdh72 turns it off. * when adding hexa 80 in configuration, the signal will be inverted. * The decimal value is only used in Megatune ---- '''Summary for mdh.. testing''' Above you've seen examples for ("." = hexadecimal character from 0..f) * mdh.1 extraFETs (usually not used, since those EC18 pins are used for analog or trigger inputs by default ) * mdh.2 ign outputs * mdh.6 stepper outputs * mdh.7 p259 outputs * mdhff (channel disable => no output is actuated) but the most interesting and flexible * mdh.0 h[0] table => inj outputs is yet to be seen. Read on. ---- '''Mapping guideline''' - how to map outputs to functions * injectors => injector outputs * ignition => ignition outputs (logiclevel for active coils; IGBT based power outputs for passive coils) * bipolar stepper (if used) => stepper outputs * other outputs => after assigning the above use the remaining outputs. take care about current rating and flyback protection (eg. WBO2 second channel FET and DPAK "extraFET"-s have no flyback installed by default!) ** Use the higher current stuff first for more safety ** except for (low current like) LEDs (like shiftlight), where p259 outputs are the best ** don't forget flyback and GND and GND5 connections ---- '''Several injector outputs can be switched simultaneously''' - mdh.0 This is a very nice and often useful feature. There is no direct connection between an mdh.0 command (replace '.' with 0..9,a..f) and injector FET. Only the h[0] table-line makes the connection. This very important. Don't fool yourself by forgetting this. Let's assume (just for the example) that tables.txt has: <code> h[0]=A2 00 01 04 08 FF 10 60 </code> It is very important to note the difference compared to other outputs. While configuring ...channel=47 means the P259 output 4 (labelled idle solenoid relay, EC36 pin 3) is used (which is direct mapping), '''configuring 70 will not necessarily mean INJ H''' (because of the indirect "lookup"). * ..._channel=70 * ..._channel=f0 (same channels used as for =70, but inverted output) * mdh70 (HW testing: turn off ) * mdhf0 (HW testing: turn on ) instructs the controller to look up the 7th (that is last, since it's 0 based) element from the h[0] line. The value is set to 60 (Mask 40+20) in the above example, so INJ G (mask=40) and INJ F (mask=20) channels will be used. mdh70 will turn these off, mdhf0 will turn these on. * mdh10 and mdh90 will turn nothing OFF/ON because 00 at index 1 (remember it is 0 based?) means nothing is selected. * mdh00 and mdh80 will turn OFF/ON injector channels behind mask A2, that is 80 + 20 + 02, that is INJ H and INJ F and INJ B * mdh50 and mdhd0 turns OFF/ON all injector channels, since mask FF means 80 + 40 + 20 + 10 + 08 + 04 + 02 + 01 that includes all injector channels. ||'''Family'''||'''Number'''||'''h[0] mask'''||'''Pin'''||'''Name'''||'''Max Load'''||'''Comments'''|| ||INJFET||0||01/1||EC36 pin 7||Inj A||10 A||Injector driver|| ||INJFET||1||02/2||EC36 pin 19||Inj B||10 A||Injector driver|| ||INJFET||2||04/4||EC36 pin 8||Inj C||10 A||Injector driver|| ||INJFET||3||08/8||EC36 pin 20||Inj D||10 A||Injector driver|| ||INJFET||4||10/16||EC36 pin 9||Inj E||10 A||Injector driver|| ||INJFET||5||20/32||EC36 pin 18||Inj F||10 A||Injector driver|| ||INJFET||6||40/64||EC36 pin 6||Inj G||10 A||Injector driver|| ||INJFET||7||80/128||EC36 pin 17||Inj H||10 A||Injector driver|| h[0] mask is written in hex / decimal, as megatune wants the injector output table in decimal values. In general it doesn't make sense to control the same injector channel from several h[0] elements (countrary to the above made-up example). Also, it doesn't make sense to assign the same output for different config..._channel. The result will be undefined (and hard to track down). Assign config..._channel=FF for unused functions, that means "disable". We found a strange behavior (that we first thought is a firmware bug) in a firmware compiled by Gabor's winavr. Reproduced on several boards, first on v3.1 serialNo=86: the outputs in h[0] first element (mask) just flashes a tiny while (30msec ? no exact measurement) when mdh80 is issued (independent of the configured mask). All other elements ( mdh90 .. mdhf0 ) light the outputs (we used LEDs) given in the mask that is in element 0 of h[0] => work as expected. All ..._channel=FF was maintained and verified in the output of mct (so it's not fuelpump or other output interfering because of a configuration error). '''Released firmwares we tested did not show any bad behaviour like that'''. I got interested in this, so I table tested mdh80 and it worked fine. But I also tested other mdhXX and mdha2 made a short led flash! It has nothing to do with h[0], DRIVE02 is set to FP, mdh22 did nothing. So I changed fuelpump_channel to FF and tested mdha2, led was bright like it should, mdh22 turned led off. My v3 has never been driven, but configs are almost the same as my daily driven v2. Both with v12 firmware. * fuelpump_channel=I259_2 * h[0]=18 C0 00 00 04 00 00 00 * h[2]=03 00 00 00 00 00 00 00 ** So does Gabor have fuelpump_channel set to some injfet? ---- '''See also''' * GenBoard/Manual * GenBoard/Manual/DigitalOut Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.