Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   EcuFlash (https://www.miataturbo.net/ecuflash-93/)
-   -   LINK ECU Binary Protocol (https://www.miataturbo.net/ecuflash-93/link-ecu-binary-protocol-81455/)

97NA 10-15-2014 12:32 PM

LINK ECU Binary Protocol
 
1 Attachment(s)
Hello, I am trying to understand the binary protocol of the link ecu so I can finish implementing it in an android app. I was curious if anyone had any experience with the binary protocol or could understand how to calculate the RPM from the 4th & 5th bytes of the sample? I will be releasing this open source if anyone still uses the FM Link ECU :laugh:

I found a text file included with the data log lab software, it is what I am using to decipher it.

Any help would be much appreciated! :D

RedCarmel 10-15-2014 12:44 PM

My best guess would be to PM Ken Hill on this forum and ask. He helped develop the FM link.

97NA 10-15-2014 12:53 PM

Alright I will try and message him. Thank you!

My post count is too low :[ - I will leave a visitor message.

AlwaysBroken 06-15-2015 07:02 PM

I wrote a windows app that handled the link serial protocol just fine, but that was like 8 years ago and I am not sure what I did with the source code (was many hard drives ago). If I track it down, I'll be sure to try and help.

IIRC, I did bitwise operations to get out the time value and then divided a constant by the time to get the RPM value. Or something like that.

AlwaysBroken 06-15-2015 11:08 PM

Found this. Apologies if the code is shit, I wrote it a million years ago in a language I've since forgotten:


this.rpm = calculateRPM(bytearray[3], bytearray[4]);

private int calculateRPM(byte high, byte low)
{
int rpm = 0;
try
{
int increments_per_minute = 1875000; //(usec * 32 per minute)
int high_byte = (int)high;
int low_byte = (int)low;
int time = (high_byte << 5) + (low_byte >> 2);
rpm = increments_per_minute / time;
}
catch { }
return rpm;
}


All times are GMT -4. The time now is 12:05 PM.


© 2024 MH Sub I, LLC dba Internet Brands