LINK ECU Binary Protocol - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


LINK Discussion about the LINK ECU.

Reply
 
 
 
LinkBack Thread Tools Search this Thread
Old 10-15-2014, 01:32 PM   #1
Newb
Thread Starter
 
Join Date: Sep 2013
Posts: 3
Total Cats: 0
Lightbulb LINK ECU Binary Protocol

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

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!
Attached Files
File Type: txt 2COMMS Updated.TXT (13.3 KB, 94 views)
97NA is offline   Reply With Quote
Old 10-15-2014, 01:44 PM   #2
Senior Member
iTrader: (7)
 
RedCarmel's Avatar
 
Join Date: Oct 2011
Location: Horse and Buggy, PA
Posts: 689
Total Cats: 18
Default

My best guess would be to PM Ken Hill on this forum and ask. He helped develop the FM link.
RedCarmel is offline   Reply With Quote
Old 10-15-2014, 01:53 PM   #3
Newb
Thread Starter
 
Join Date: Sep 2013
Posts: 3
Total Cats: 0
Default

Alright I will try and message him. Thank you!

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

Last edited by 97NA; 10-15-2014 at 01:55 PM. Reason: Not enough posts!
97NA is offline   Reply With Quote
Old 06-15-2015, 08:02 PM   #4
Senior Member
 
Join Date: Jun 2015
Location: TAMPA, FL
Posts: 644
Total Cats: 27
Default

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 is offline   Reply With Quote
Old 06-16-2015, 12:08 AM   #5
Senior Member
 
Join Date: Jun 2015
Location: TAMPA, FL
Posts: 644
Total Cats: 27
Default

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

Quote:
this.rpm = calculateRPM(bytearray[3], bytearray[4]);
Quote:
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;
}
AlwaysBroken is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Raleigh: Fiberglass headlight scope, 1.6L ECU, AFM, Hardtop latches, more bigmackloud Miata parts for sale/trade 13 09-22-2017 01:34 PM
3rd Time's a Charm...hopefully. zephyrusaurai Meet and Greet 2 09-28-2015 11:59 PM
Are my coils failing? viriiguy General Miata Chat 5 09-28-2015 08:39 PM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 10:48 PM.