Pages: [1] 2 3 ... 12
Author Topic: Multi map selection using cruz control  (Read 165617 times)
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« on: February 20, 2012, 02:43:06 AM »

Hi, this is a work in progress as of now. you can select multiple maps by switching on the cruise control keeping the clutch pressed,after that switch it back off and then on for the next map, can be switched when the car is being driven. There are 5 maps 4th and 5th is the same. 1) valet mode load 93% till 3000 rpm then 0%. 2) 150 bhp 3) 180 bhp 4&5 is a little higher than 180. Both ldrxn and LDRXNzk is switched. Can be made to access any number of maps.

Problem--
Their is no way of knowing which map is running unless you log memory space 0x3870fa.
Timing does not change but plan to include timing switch in future.

Would like to know from the experts how to flash the CEL light as to indicate which map is running.
Please put in your suggestions for improving the code
Thanks.
« Last Edit: November 01, 2012, 09:34:11 PM by rajivc666 » Logged
NOTORIOUS VR
Administrator
Hero Member
*****

Karma: +58/-7
Offline Offline

Posts: 1056


« Reply #1 on: February 20, 2012, 11:38:10 AM »

Nice work!  But what ECU is this for specifically?

I know nothing about programming so I will not be of much help here, but I'm assuming people wanting to help will need to see the actual "code" no?
Logged

SCHNELL ENGINEERING BLOG ·  STANDALONE ECUS · TUNING · DYNO · WIRING · PARTS · VEMS
Google Talk: NOTORIOUS.VR
n00bs start here: http://s4wiki.com/wiki/Tuning
phila_dot
Hero Member
*****

Karma: +173/-11
Offline Offline

Posts: 1709


« Reply #2 on: February 20, 2012, 11:50:26 AM »

Definitely interested in seeing how you implemented this.

Setting the MIL should be the easy part. IIRC there are condition bytes for MIL on and flashing.
Logged
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #3 on: February 20, 2012, 11:51:56 AM »

hi, its a 1.8t 06A906032hj ecu, though can be coded for any ecu. Its running fine on my car.
Here is the code at 0x8ffd40
 
extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_1
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_1
cc_isset:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_1:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset
     JB   0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit
CC_notset:
     jnb  0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I
     mov r4,#14h
     jmpr CC_uc,set_boost
  I:
     cmp  r4,#14H
     jmpr CC_nz,II
     mov r4,#3ch
     jmpr CC_uc,set_boost
 II:
     cmp  r4,#3cH
     jmpr CC_nz,III
     mov r4,#64h
     jmpr CC_uc,set_boost
 III:
     cmp  r4,#64H
     jmpr CC_nz,Iv
     mov r4, #0C8h
     jmpr CC_uc,set_boost
Iv:    
     mov r4,#0ah
set_boost:    
     extp #0e1h,#1
     mov 30fah,r4
exit:
    mov r12, #0e400h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
ldrxnzk:    
     extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_11
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_11
cc_isset1:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_11:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset1
     JB   0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit1
CC_notset1:
     jnb  0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit1
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I1
     mov r4,#14h
     jmpr CC_uc,set_boost1
  I1:
     cmp  r4,#14H
     jmpr CC_nz,II1
     mov r4,#3ch
     jmpr CC_uc,set_boost1
 II1:
     cmp  r4,#3cH
     jmpr CC_nz,III1
     mov r4,#64h
     jmpr CC_uc,set_boost1
 III1:
     cmp  r4,#64H
     jmpr CC_nz,Iv1
     mov r4, #0C8h
     jmpr CC_uc,set_boost1
Iv1:    
     mov r4,#0ah
set_boost1:    
     extp #0e1h,#1
     mov 30fah,r4
exit1:
    mov r12, #0e4d0h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
 
Logged
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #4 on: February 20, 2012, 11:53:34 AM »

For simplicity sake i have repeated codes for ldrxnzk, think can be made shorter if coded smartly.
Logged
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #5 on: February 20, 2012, 12:00:24 PM »

Definitely interested in seeing how you implemented this.

Setting the MIL should be the easy part. IIRC there are condition bytes for MIL on and flashing.
Can you please give the details, ideally i would like the CEL to flash number of times the map number  selected.
Logged
rob.mwpropane
Sr. Member
****

Karma: +32/-0
Offline Offline

Posts: 370


WWW
« Reply #6 on: February 20, 2012, 08:04:44 PM »

This is great work, I wish I could be more help besides a pat on the back. You'll have to excuse my novice question, but could this be potentially used to switch between E85 and 93?
Logged

This has nothing to do with cars but you can see my glorifying job at,

www.MWPropane.com
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #7 on: February 20, 2012, 11:33:45 PM »

Hi, can you tell me the maps that has to be switched for switching between e85 and e93, I can give it a try.
Logged
masterj
Hero Member
*****

Karma: +62/-5
Offline Offline

Posts: 1049



WWW
« Reply #8 on: February 21, 2012, 02:20:38 AM »

This is great work, I wish I could be more help besides a pat on the back. You'll have to excuse my novice question, but could this be potentially used to switch between E85 and 93?

I think it would be these maps: KRTKE, KFZW/2..
Logged

rob.mwpropane
Sr. Member
****

Karma: +32/-0
Offline Offline

Posts: 370


WWW
« Reply #9 on: February 21, 2012, 05:52:18 AM »

I should have been more precise. For a pretty basic E85/93 oct switch, you would need 2 versions of KRKTE to switch back and forth, along with 2 versions of KFZW/KFZW2. I'm not a programmer either, so I'm unsure of the logic that goes into your "switching" and how far you can take it. No matter what, still great work.
Logged

This has nothing to do with cars but you can see my glorifying job at,

www.MWPropane.com
modzila
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


« Reply #10 on: February 21, 2012, 07:16:31 AM »

I will not be able to add value to this, but I can express my amazement at what you did for the community there!!

Credit where credit is due
Logged
phila_dot
Hero Member
*****

Karma: +173/-11
Offline Offline

Posts: 1709


« Reply #11 on: February 21, 2012, 04:41:10 PM »

Can you please give the details, ideally i would like the CEL to flash number of times the map number  selected.

It looks like B_mil at 0x00FD22 (M box) should do it.
Logged
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #12 on: February 21, 2012, 11:47:16 PM »

Thank you everybody, 99% of whatever I know about ecu tuning is from this forum. The progress is I have completed the code required for switching kfzw/kfzw2 and krkte. But the most important testing is yet to be done as I am out of station for two days. I had made one ldrxn/lrxnzk map switch with accelerator/brake combination for those of you who does not have cruise control but it didnt work while testing but still believe with some help might be able to make it work.
My plan is to switch ldrxn/ldrxnzk as before with cruise on switch and clutch. And kfzw/kfzw2 and krkte with cruise reset/dec button and clutch. So you can have different boost levels for different timings/krkte.
Thanks
 
Logged
rajivc666
Full Member
***

Karma: +23/-2
Offline Offline

Posts: 127



« Reply #13 on: February 22, 2012, 12:15:38 AM »

oH .. thanks phila_dot  Grin, I had not seen your reply. I will try and make the visual indication part work as soon as the code is working as desired.
Logged
jacog
Newbie
*

Karma: +1/-1
Offline Offline

Posts: 4


« Reply #14 on: February 22, 2012, 05:11:59 AM »

For simplicity sake i have repeated codes for ldrxnzk, think can be made shorter if coded smartly.
Thanks for you effort to provide us this nice feature in ME7.5. But am I right that you have to use different variable for holding previous state of TCS switch? I'm talking about variable 0x387000. In code you showed (maybe in binary it is fixed), one event (clutch depressed, tcs off->on) will switch only one map (depends which subroutine is currently active).
Logged
Pages: [1] 2 3 ... 12
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.024 seconds with 17 queries. (Pretty URLs adds 0.001s, 0q)