rusefi_documentation/pinouts-backup/microrusefi/main.html

555 lines
12 KiB
HTML

<html>
<head>
<style>
.pin-marker {
position: absolute;
z-index: 1;
border-radius: 50%;
background-color: white;
border: 2px blue solid;
cursor: pointer;
color: black;
text-align: center;
line-height: 200%;
}
.pin-marker:hover {
background-color: #f15a24;
color: white;
transform: scale(2);
z-index: 2;
}
.pin-marker.highlight {
border: 2px #f15a24 solid;
}
.pin-marker.selected {
background-color: #fc935a;
}
#connector-container {
width: 100%;
height: 50%;
overflow-x: scroll;
position: relative;
}
#connector-div {
height: 100%;
position: relative;
z-index: 0;
}
#connector-img {
height: 100%;
z-index: 0;
}
table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: clamp(100%, 100%, 1000px);
text-align: left;
}
@media (min-width: 1000px) {
table {
font-size: 1rem;
}
}
@media (max-width: 1000px) {
table {
font-size: 3rem;
}
}
table tbody tr {
cursor: pointer;
}
table td, table th {
border: 1px solid black;
padding: 8px;
}
table tr:nth-child(even){
background-color: #fc935a;
}
table tr:hover {
background-color: #f15a24;
}
table th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #f15a24;
color: black;
}
@media (prefers-color-scheme: dark) {
html {
background-color: black;
color: white;
}
table td, table th {
border: 1px solid #ddd;
}
table th {
color: white
}
table tr:nth-child(even){
background-color: #230c00;
color: white;
}
table tr:hover {
background-color: #f15a24;
}
}
</style>
<script type="text/javascript" src="yaml.min.js"></script>
<script type="text/javascript">
var connectorYaml = `
#
# microRusEfi board
# https://github.com/rusefi/rusefi/wiki/Hardware_microRusEfi_wiring
#
pins:
- pin: 1
id: EFI_ADC_11
class: analog_inputs
color: white right
function: 12V Supply from main relay output, see also pin #29
ts_name: Battery Sense
type: 12V
# default Idle Air Control TLE8888 high current low side: VVT2 TLE8888_OUT5
- pin: 3
id: TLE8888_PIN_5
class: outputs
color: white
function: Idle solenoid
ts_name: 3 - Lowside 2
type: ls
# default VVT TLE8888 high current low side: VVT1 TLE8888_OUT6
- pin: 7
id: TLE8888_PIN_6
class: outputs
color: black
function: VVT
ts_name: 7 - Lowside 1
type: ls
# TC4427 ignition outputs (5v)
- pin: 9
id: GPIOD_4
class: outputs
color: dark blue
function: Ignition 1
ts_name: 9 - Ignition 1
type: ign
- pin: 10
id: GPIOD_3
class: outputs
color: dark blue
function: Ignition 2
ts_name: 10 - Ignition 2
type: ign
- pin: 11
id: GPIOD_2
class: outputs
color: dark blue
function: Ignition 3
ts_name: 11 - Ignition 3
type: ign
- pin: 12
id: GPIOD_1
class: outputs
color: dark blue
function: Ignition 4
ts_name: 12 - Ignition 4
type: ign
- pin: 13
id: GPIOD_6
class: outputs
color: yellow
function: Alternator (see JP2 jumper note)
ts_name: 13 - GP Out 6
type: gp_high
# TC4427 general purpose output (selectable 5v/12v)
- pin: 14
id: GPIOD_7
class: outputs
color: yellow
function: (see JP2 jumper note)
ts_name: 14 - GP Out 5
type: gp_high
- pin: 18
id: [GPIOA_0, EFI_ADC_0]
class: [switch_inputs, analog_inputs]
color: red
function: CLT sensor
ts_name: 18 - AN temp 1
type: at
- pin: 19
id: [GPIOC_2, EFI_ADC_12]
class: [switch_inputs, analog_inputs]
color: red
function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector)
ts_name: 19 - AN volt 4
type: av
- pin: 20
id: [GPIOC_3, EFI_ADC_13]
class: [switch_inputs, analog_inputs]
color: red left
function: Throttle position sensor (TPS)
ts_name: 20 - AN volt 5
type: av
- pin: 22
id: [GPIOA_3, EFI_ADC_3]
class: [switch_inputs, analog_inputs]
color: dark green
ts_name: 22 - AN temp 4
type: at
- pin: 23
id: [GPIOA_1, EFI_ADC_1]
class: [switch_inputs, analog_inputs]
color: dark green
function: IAT sensor
ts_name: 23 - AN temp 2
type: at
- pin: 24
id: [GPIOA_2, EFI_ADC_2]
class: [switch_inputs, analog_inputs]
color: dark green
ts_name: 24 - AN temp 3
type: at
# RC filter input for hall
- pin: 25
id: [GPIOA_5, GPIOA_5]
class: [event_inputs, switch_inputs]
color: light blue right
ts_name: 25 - Hall Cam
type: hall
- pin: 26
id: [GPIOA_6, EFI_ADC_6]
class: [switch_inputs, analog_inputs]
color: light blue
ts_name: 26 - AN volt 2
type: av
- pin: 27
id: [GPIOC_0, EFI_ADC_10]
class: [switch_inputs, analog_inputs]
color: light blue
function: MAP sensor
ts_name: 27 - AN volt 1
type: av
- pin: 28
id: [GPIOA_4, EFI_ADC_4]
class: [switch_inputs, analog_inputs]
color: light blue left
ts_name: 28 - AN volt 10
type: av
- pin: 30
id: [GPIOC_5, EFI_ADC_15]
class: [switch_inputs, analog_inputs]
color: pink
ts_name: 30 - AN volt 7
type: av
- pin: 31
id: [GPIOA_7, EFI_ADC_7]
class: [switch_inputs, analog_inputs]
color: pink
function: Throttle Pedal Position Sensor (PPS)
ts_name: 31 - AN volt 3
type: av
- pin: 32
id: [GPIOC_4, EFI_ADC_14]
class: [switch_inputs, analog_inputs]
color: pink
function: External wideband O2 sensor
ts_name: 32 - AN volt 6
type: av
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT23
- pin: 33
id: TLE8888_PIN_23
class: outputs
color: orange right
function: (IDLE stepper coil 2+)
ts_name: 33 - GP Out 3
type: [gp_low, gp_pp]
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT22#89
- pin: 34
id: TLE8888_PIN_22
class: outputs
color: orange
function: Fan relay (IDLE stepper coil 1-)
ts_name: 34 - GP Out 2
type: [gp_low, gp_pp]
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT21#91
- pin: 35
id: TLE8888_PIN_21
class: outputs
color: orange
function: Fuel pump relay (IDLE stepper coil 1+)
ts_name: 35 - GP Out 1
type: [gp_low, gp_pp]
- pin: 36
id: [GPIOB_0, EFI_ADC_8]
class: [switch_inputs, analog_inputs]
color: orange left
ts_name: 36 - AN volt 8
type: av
- pin: 37
id: TLE8888_PIN_1
class: outputs
color: grey right
function: Injector 1
ts_name: 37 - Injector 1
type: inj
- pin: 38
id: TLE8888_PIN_2
class: outputs
color: grey
function: Injector 2
ts_name: 38 - Injector 2
type: inj
- pin: 40
id: [GPIOB_1, EFI_ADC_9]
class: [switch_inputs, analog_inputs]
color: grey
ts_name: 40 - AN volt 9
type: av
- pin: 41
id: TLE8888_PIN_3
class: outputs
color: brown right
function: Injector 3
ts_name: 41 - Injector 3
type: inj
- pin: 42
id: TLE8888_PIN_4
class: outputs
color: brown
function: Injector 4
ts_name: 42 - Injector 4
type: inj
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT24
- pin: 43
id: TLE8888_PIN_24
class: outputs
color: brown
function: (IDLE stepper coil 2+)
ts_name: 43 - GP Out 4
type: [gp_low, gp_pp]
- pin: 45
id: GPIOC_6
class: event_inputs
color: light green right
function: Crank VR+/hall
ts_name: 45 - VR/Hall Crank
type: vr hall
`;
function addRow(table, pin, pdiv) {
var template = document.getElementById("table-template");
var clone = template.content.cloneNode(true);
var row = clone.querySelector(".data");
var pdata = clone.querySelector(".pin-data");
var idata = clone.querySelector(".id-data");
var tdata = clone.querySelector(".type-data");
var fdata = clone.querySelector(".function-data");
var cdata = clone.querySelector(".color-data");
pdata.textContent = pin.pin;
idata.textContent = pin.id;
tdata.textContent = pin.type
fdata.textContent = pin.function;
cdata.textContent = pin.color
row.addEventListener('click', function(pin, pdiv) {
clickPin(pin, pdiv);
}.bind(null, pin, pdiv));
table.appendChild(clone);
}
function clickPin(pin, pdiv) {
var table = document.getElementById("info-table").querySelector("tbody");
table.innerHTML = "";
if (Array.isArray(pin.id)) {
var pinIds = pin.id.filter((value, index) => {
return pin.id.indexOf(value) === index;
});
for (var i = 0; i < pinIds.length; i++) {
addRow(table, {pin: pin.pin, id: pinIds[i], function: pin.function}, pdiv);
}
} else {
addRow(table, pin, pdiv);
}
var pins = document.querySelectorAll(".pin-marker");
for (var i = 0; i < pins.length; i++) {
if (pins[i].dataset.type == pin.type) {
pins[i].classList.add("highlight");
} else {
pins[i].classList.remove("highlight");
}
pins[i].classList.remove("selected");
}
pdiv.classList.add("selected");
}
function adjustMarkers() {
var cdiv = document.getElementById("connector-div");
cdiv.style.width = document.getElementById("connector-img").clientWidth;
var pins = document.querySelectorAll(".pin-marker");
for (var i = 0; i < pins.length; i++) {
var height = cdiv.clientHeight * 0.05;
pins[i].style.height = height + "px";
pins[i].style.width = height + "px";
pins[i].style.marginTop = "-" + (height * 0.5) + "px";
pins[i].style.marginLeft = "-" + (height * 0.5) + "px";
pins[i].style.fontSize = (height * 0.5) + "px";
}
}
window.addEventListener('load', function() {
var connector = YAML.parse(connectorYaml);
document.getElementById("connector-img").addEventListener('load', function() {
for (var i = 0; i < connector.pins.length; i++) {
var pin = connector.pins[i];
if (!pin.pin) {
continue;
}
var pinfo;
for (var ii = 0; ii < connector.info.pins.length; ii++) {
if (connector.info.pins[ii].pin == pin.pin) {
pinfo = connector.info.pins[ii];
break;
}
}
var cdiv = document.getElementById("connector-div");
var template = document.getElementById("pin-template");
var clone = template.content.cloneNode(true);
var pdiv = clone.querySelector("div");
var img = document.getElementById("connector-img");
var imgHeight = img.naturalHeight;
var imgWidth = img.naturalWidth;
pdiv.textContent = pinfo.pin;
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
pdiv.dataset.type = pin.type;
pdiv.addEventListener("click", function(pin, pdiv) {
clickPin(pin, pdiv);
}.bind(null, pin, pdiv));
cdiv.appendChild(pdiv);
var fullTable = document.getElementById("pinout-table").querySelector("tbody");
addRow(fullTable, connector.pins[i], pdiv);
}
adjustMarkers();
});
document.getElementById("connector-img").src = connector.info.image.file;
});
window.addEventListener('resize', function() {
adjustMarkers();
});
</script>
</head>
<body>
<template id="pin-template">
<div class="pin-marker"></div>
</template>
<div id="connector-container">
<div id="connector-div">
<img id="connector-img"></img>
</div>
</div>
<template id="table-template">
<tr class="data">
<td class="pin-data"></td>
<td class="id-data"></td>
<td class="type-data"></td>
<td class="function-data"></td>
<td class="color-data"></td>
</tr>
</template>
<table id="info-table">
<thead>
<tr>
<th>Pin Number</th>
<th>Firmware ID</th>
<th>Type</th>
<th>Typical Function</th>
<th>Pigtail Color</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<br/>
<br/>
<br/>
<br/>
<h2>Full Pinout Table</h2>
<table id="pinout-table">
<thead>
<tr>
<th>Pin Number</th>
<th>Firmware ID</th>
<th>Type</th>
<th>Typical Function</th>
<th>Pigtail Color</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</body>
</html>