EDC16CP34
Inhaltsverzeichnis
Pinbelegung
Slot | Pin | Beschreibung | Bemerkung |
---|---|---|---|
T94 | 1 | Masse/GND | KL31 (Fahrzeugmasse) |
T94 | 5 | Zündung | KL15 (geschaltetes Plus) |
T94 | 18 | Dauerplus | KL30 (Dauerplus) |
T94 | 66 | CAN-Low | High-Speed-CAN (500 kbit/s) |
T94 | 72 | K-Line | |
T94 | 89 | CAN-High | High-Speed-CAN (500 kbit/s) |
Memory
Hardware:
Hardware | Name |
---|---|
µController | MPC563 |
EEPROM | ST95320 |
Layout:
Type | method R/W | Memory starting from | Memory size (Byte) | Comment |
---|---|---|---|---|
RAM 1 | diag | 0x-- | 0x-- | |
RAM 2 | diag | 0x-- | 0x-- | |
Prozessor | ext.Prog | 0x0 | 0x80000 | 512KB |
Flash | ext.Prog | 0x0 | 0x200000 | 2MB |
EEPROM | ext.Prog | 0x0 | 0x1000 | 4KB |
EEPROM dump setup
In order to catch data losses, the data is stored redundantly.
CRC function:
unsigned char dump[0x1000];
...
unsigned short getCheckSum(unsigned short dumpStartIndex,
unsigned short dumpEndIndex,
unsigned short blockNumber)
{
unsigned short checksum = 0;
for (unsigned int i = dumpStartIndex; i <= dumpEndIndex; i++)
{
checksum = checksum + dump[i];
}
checksum = 0xFFFF ^ checksum;
checksum = checksum - blockNumber;
return checksum;
}
OMI function:
unsigned int getOmi_1(void)
{
return dump[0x156];
}
unsigned char getOmi_2(void)
{
return dump[0x176];
}
...
//omi On -> omiByte = 0x73;
//omi Off -> omiByte = 0x60;
void setOmi_1(unsigned char omiByte)
{
dump[0x156] = omiByte;
unsigned short checksum = getCheckSum(0x140, 0x15D, 4);
dump[0x15E] = checksum & 0xFF;
dump[0x15F] = checksum >> 8;
}
void setOmi_2(unsigned char omiByte)
{
dump[0x176] = omiByte;
unsigned short checksum = getCheckSum(0x160, 0x17D, 4);
dump[0x17E] = checksum & 0xFF;
dump[0x17F] = checksum >> 8;
}
WFS-Code:
unsigned short getWFSLogin_1(void)
{
return dump[0xE7] * 0x100 + dump[0xE8];
}
unsigned short getWFSLogin_2(void)
{
return dump[0x107] * 0x100 + dump[0x108];
}
unsigned short getWFSLogin_3(void)
{
return dump[0x127] * 0x100 + dump[0x128];
}
Mileage of engine control unit:
unsigned long getKM_1(void)
{
return dump[0x502] * 0x1000000 + dump[0x503] * 0x10000 + dump[0x504] * 0x100 + dump[0x505]; //unit meter
}
unsigned long getKM_2(void)
{
return dump[0x542] * 0x1000000 + dump[0x543] * 0x10000 + dump[0x544] * 0x100 + dump[0x545]; //unit meter
}