help needed CA18DET

If you know what B.S. stands for you know what goes here.

Moderator: Matt

Post Reply
ByReaL
Posts: 127
Joined: Fri Mar 23, 2007 11:46 pm
Location: Romania / SUA
Contact:

help needed CA18DET

Post by ByReaL » Tue Oct 09, 2007 6:33 am

ok i have a CA18DET engine and a Z32 MAF, as you may know the MAF translation map must be truncated in order to fit in the standard location,

can someone teach me how to relocate it in order to be able to fit all the MAF map ?


i believe the map should be written in an empty space, after that the map location should be changed also in the software and also the map size, and after that the nistune address file should be changed also.....
but this is theory i need some advices from someone who already did that.

GZ@hybridka
Posts: 112
Joined: Wed May 03, 2006 5:51 pm
Location: Id, USA

Post by GZ@hybridka » Tue Oct 09, 2007 11:46 am

I have heard of some so-called 64 point VQ conversions for the CA18, but I highly doubt this has been accomplished properly.

The location of the 64 point, 16 bit table/map within the ROM is not the problem, rather, the code routine that uses the table values would have to be modified to step through a full set of 64 voltage points.

The original routine will only access a table of the original size, no matter where you point it to.

So, the VQ table routine would need to be analyzed and perhaps compared to a known 64 point routine (from another ecu), and rewritten similarly.

This is a large routine to rewrite, and more than likely there is not enough room in the original location to do it.

GZ@hybridka
Posts: 112
Joined: Wed May 03, 2006 5:51 pm
Location: Id, USA

Post by GZ@hybridka » Tue Oct 09, 2007 4:00 pm

Here is the CA18 VQ 16bit routine in its entirety. Starts at L802C.

Code: Select all

L8001:
	std	X0060
	ldaa	X005C
	mul
	std	X005D
	ldaa	X0060
	ldab	X005C
	mul
	clr	X005C
	addd	X005C
	std	X005C
	ldaa	X0061
	ldab	X005B
	mul
	addd	X005C
	std	X005C
	ldaa	X005B
	ldab	#$00
	rolb
	stab	X005B
	ldab	X0060
	mul
	addd	X005B
	std	X005B
	rts
;
L802C:
	asld
	cmpa	#$3F
	bcs	L8034
	ldd	$7E,x
	rts
;
L8034:
	clr	X005C
	stab	X005B
	asla
	tab
	abx
	ldd	$02,x
	subd	$00,x
	bcs	L804A
	jsr	L8001
	ldd	$00,x
	addd	X005B
	rts
;
L804A:
	coma
	comb
	addd	#$0001
	jsr	L8001
	ldd	$00,x
	subd	X005B
	rts
Last edited by GZ@hybridka on Tue Oct 09, 2007 4:04 pm, edited 1 time in total.

GZ@hybridka
Posts: 112
Joined: Wed May 03, 2006 5:51 pm
Location: Id, USA

Post by GZ@hybridka » Tue Oct 09, 2007 4:03 pm

Here is the VQ 16bit table routine from the ka24e, which uses the same MCU (hitachi 6303) , and uses full 64 point. Starts from top.

Code: Select all

clr	X0048
	cmpa	#$3F
	bcs	LE0CC
	ldd	$7E,x
	rts
;
LE0CC:
	stab	X0047
	asla
	tab
	abx
	ldd	$02,x
	subd	$00,x
	bcs	LE0DE
	bsr	LE0EC
	ldd	$00,x
	addd	X004C
	rts
;
LE0DE:
	coma
	comb
	addd	#$0001
	bsr	LE0EC
	ldd	$00,x
	subd	X004C
	rts
;
LE0EA:
	stx	X0047
LE0EC:
	std	X004C
	ldaa	X0048
	mul
	std	X004E
	ldab	X0047
	ldaa	X004D
	mul
	clr	X004D
	addd	X004D
	std	X004D
	ldaa	X004C
	ldab	X0048
	mul
	addd	X004D
	bra	LE10E
;
LE108:
	staa	X004C
	ldab	X0048
	mul
	clc
LE10E:
	std	X004D
	ldaa	X004C
	ldab	#$00
	adcb	#$00
	stab	X004C
	ldab	X0047
	mul
	addd	X004C
	std	X004C
	rts




Matt
Site Admin
Posts: 8322
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Post by Matt » Wed Oct 10, 2007 2:22 am

I have the rom image that Daniel had programmed into this board. If it is okay with him you might be able to have a look at that

datsunboy
Posts: 106
Joined: Thu Mar 15, 2007 1:51 pm
Location: New Zealand

Post by datsunboy » Wed Oct 10, 2007 2:10 pm

are you talking about my board?
if so, then yeah, go ahead.
I didnt make that ROM, after reading this thread, I am doubtful that the ROM I have loaded is any use over the factory 52point VQ

ByReaL
Posts: 127
Joined: Fri Mar 23, 2007 11:46 pm
Location: Romania / SUA
Contact:

Post by ByReaL » Wed Oct 10, 2007 5:32 pm

so the 64 points conversion is only a nice story to make children go to sleep or anybody did it for real ?

datsunboy
Posts: 106
Joined: Thu Mar 15, 2007 1:51 pm
Location: New Zealand

Post by datsunboy » Thu Oct 11, 2007 8:16 am

I have one of these ROMs, and you can put 64point VQ maps into them no problem.

but from the sounds of in here, there may not be any point to it, if the code isnt looking at it anyway :(

GZ@hybridka
Posts: 112
Joined: Wed May 03, 2006 5:51 pm
Location: Id, USA

Post by GZ@hybridka » Thu Oct 11, 2007 11:39 am

I looked into this code a bit, and it would seem that the CA18 does indeed utilize a full set of 64 points (word wide), at least in some way.

Forgive me but I am not really familar with this ecu, I have never messed with VQ swaps and running cars anyways.

I see an anomaly in the first few data points beginning at 3E00 with the oem VQ table.

What happens when you paste over these values, using a complete 64 point table from another MAF? Firstly I can see there shouldnt be any immediate code function issues in doing this, but , that only goes as far as the table function itself.

Provided the car seems to run ok with a swapped, full size VQ table, there would only be one more test required before deeming the "modification" acceptable.

Someone would need to rig up a CA18 bench rig including voltage simulation for the MAF (potentiometer circuit). The voltage would need to be swept from 0-5v using the potentiometer while at the same time monitoring the VQ table output value (Q), and comparing to the actual VQ table itself. The Q output should match the current positions value on the VQ table, but specifically you would want to check the Q value at low MAF voltages where the oem VQ table has the odd values.

Just to summarize, from the original code I can see the VQ table starts at 3E00 and is 128 bytes long. Stepping through 2 bytes at a time , the final value is the 64th and not the 52nd.

JCD
Posts: 54
Joined: Thu May 03, 2007 7:50 am

Post by JCD » Sat Nov 17, 2007 9:40 pm

Guys,
This truncation 64-point conversion routine stuff reads like chinese to me :oops:
Can I use the "Change Mass Airflow Meter" function in Nistune when I want to replace my stock CA18DET MAF by a Z32 MAF? :?:
It seems to load the Z32 "MAF translation table" in a 52 point map. On the laptop it looks OK...
Regards,

Jean

ByReaL
Posts: 127
Joined: Fri Mar 23, 2007 11:46 pm
Location: Romania / SUA
Contact:

Post by ByReaL » Sun Nov 18, 2007 12:11 am

yes you can do that, what i asked here is a little bit more complicated, and is about getting more resolution point in the idle part, in fact i hope i'll get this if all the points can be used

JCD
Posts: 54
Joined: Thu May 03, 2007 7:50 am

Post by JCD » Sun Nov 18, 2007 8:44 am

Ah OK thanks :)
Just out of curiosity, what are you aiming for with better resolution of the VQ-map around idle?

Post Reply