pgmfi.org

Hacking up Honda's ECU
It is currently Fri Mar 29, 2024 12:48 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Reading a bin file
PostPosted: Fri Jul 22, 2011 9:52 am 
Offline

Joined: Sun Feb 21, 2010 10:47 am
Posts: 8
hey guys im trying to read the binary file for a p30 base and i cant get the low cam rpms to read correctly im trying the math on the wiki which is:

This is the conversion from the "low cam" 8-bit RPM values used for VTEC crossover points and in the low-cam tables.

It involves some modular arithmetic, so it's easier to break it up into a couple extra steps.

# Y = input value, 0 to 256 # let H = floor(Y/64) ''Where floor(x) = trunc(x) = int(x) = integer part of x. Fractional part truncated. Whatever you want to call it'' # let L = Y - (H-1)*64 # RPM = 1875000 * L * 2^H / 240000

You can also do it this way, using the modulo operator: # Y = input value, 0 to 256 # Q = Y div 64 ''(integer division, same as floor(Y/64) above)'' # R = Y mod 64 ''(modulus, i.e. remainder after division)'' # RPM = (2^Q)*(floor(R*500/64) + 500)

i cant get it to calculate the rpms correctly i already have the high cam rpms calculated correctly since the equation is simpler i think i have some order of operations mixed up or something if anyone has done this please post some pseudo code or something...

many thanks for any help


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group