Przy odczytywaniu informacji z P28 z łącza CN2 poprzez arduino, pokazuje mi się stała wartość liczbową. Chciałbym odczytać aktualną prędkość. Czy powinienem odwołać się do jakiegoś adresu czy jak ?
komp nie nadaje, musisz go zapytać o to co chcesz wiedzieć..
Hi All,
Thanks to the great information posted by 'dip', I have been able to successfully get some basic datalogging working on a P13 ECU with unmodified ROM. I would really like to see a future version of ECU Control support logging from a stock ROM, so have posted some of my observations (on a P13) below.
To communicate with the ECU, parameters must be 9600,n,8,1.
The jumper for half-duplex must remain in-tact.
Commands are in the following format:
1st Byte - The command type (always 0x20)
2nd Byte - The length of the entire command, including checksum
3rd Byte - The offset of the data in the ROM's lookup table
4th Byte - The number of data bytes to return when responding
5th Byte - The checksum
So, on my P13, the following command retrieves RPM:
0x20 0x05 0x00 0x02 0xD9
RPM = 1875000 / ((1st byte * 256) + 2nd byte)
And the following command retrieves speed (VSS):
0x20 0x05 0x02 0x01 0xD8
Responses are in a similar format to the commands:
1st Byte - Always seems to be 0x00
2nd Byte - Length of the entire response including checksum
3rd, 4th, etc Bytes - The requested data
Last Byte - Checksum
So if the car was travelling at 60 km/h and I queried VSS I would get:
0x00 0x04 0x3C 0xC0
Through trial and error, I've managed to figure out the offsets in the P13 for retrieving RPM, VSS, TPS, VTEC, A/C and O2. With any luck, other OBD1 ECUs should be the same.
Sorry if everyone already knows this information, but there doesn't seem to be much discussion about datalogging on stock ROMs and I thought this might just get the ball rolling ...
Trev.
Hi guys,
I've currently got this working from the CN2 port on my P13 ECU (yes - OBD1!), using a MAX232 board. From memory, the person who originally figured out this information has an OBD2 Integra Type-R, so it seems the command structure is recognized by OBD1 and OBD2, although I have no information about the OBD0 ECUs - hopefully someone can give it a try and see if we're in luck!
I'm under the impression that the guy who originally worked this out is successfully using the DLC port for this, but I have no idea about whether he has some sort of TTL -> RS232 converter in between.
In case it helps, I have been playing with various figures in the "offset" field and have worked out the following things:
Offset 0/1 - 16-bit RPM
Offset 2 - VSS (Speed in kilometres per hour)
Offset 16 - A temperature sensor? Maybe IAT? (Intake Air Temp)
Offset 20 - TPS (Throttle Position)
Offset 21 - O2 Sensor
I'm a little unsure about these:
Offset 11 - Value increases by 2 when A/C on
Offset 12 - "5" in normal driving, "1" before/after VTEC, "9" during VTEC (perhaps the "1" could be IAB's or something like EGR or charcoal cannister purge?)
Offset 13 - "1" in normal use, "0" under hard acceleration.
And this is just a guess:
Offset 18 - Maybe MAP sensor?
These are all being figured out by trial and error - if I get stuck on any I think I'll start unplugging sensors to see what's what ;) The real question will be whether all ECUs have the same sensors at the same offsets, and it is quite possible for two reasons:
a) The ECU contains a table which maps these offsets to their actual memory locations - thus providing a layer of 'abstraction' for various ECUs
b) I believe this protocol is the same one that the Honda diagnostic equipment uses, so it would be strange if it's not all standardized in some way.
Thanks dligocki for offering to add this to ECU Control - if we're lucky this will make ECUControl available to users of unmodified OBD1/OBD2 (and maybe even OBD0) ECUs!
Regards,
Trev.
źródło z pgmfi
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.