Odometer and trip not working. - LotusTalk - The Lotus Cars Community
 
LinkBack Thread Tools Display Modes
post #1 of 3 (permalink) Old 01-16-2017, 03:15 AM Thread Starter
Registered User
 
Join Date: Jul 2014
Posts: 17
Odometer and trip not working.

Hi there. Just wondering if the odo on the white dash in a 2006 Exige uses inputs via the CANbus from the ecu? We've installed an aftermarket ecu and have the dash going with everything working except the odometer and trip. The odo and trip just don't move. The trip is at 0 and the odo just stays where it is.

Correct me if I'm wrong but the odo needs data from abs wheel sensor and ecu to calculate distance travelled is that correct? If so does anyone know what parameters it should be reading from the ecu?

Thanks.


Sent from my iPhone using Tapatalk

Last edited by theflinch; 01-16-2017 at 03:25 AM.
theflinch is offline  
Sponsored Links
Advertisement
 
post #2 of 3 (permalink) Old 01-16-2017, 06:17 AM
Registered User
 
Obeisance's Avatar
 
Join Date: Oct 2014
Location: SE MI
Posts: 555
I've read some posts from other users which suggest that the white dash should increment the odometer by integrating the speed signal. Based on this explanation, your cluster ought to be incrementing the odometer. The later cars are apparently different in that they received an extra signal in the CAN frame that may have been used to increment the odometer:

https://www.lotustalk.com/forums/f129...ml#post1199429

However, consistent with the observations of rob13572468, when I send CAN messages to my 2005 white dash gauge cluster at a rate faster than what the ECU does in order to control the needle position (raise the speed to high levels), the odometer did not advance:

https://www.lotustalk.com/forums/f129...tml#post172998

I can also confirm that the 2005 does not have special CAN bytes for the odometer advance (i.e. the two blank bytes in the CAN frame remain this way due to the way that the code is written):

Here is the code which assembles the 2005 CAN frame:
Code:
	;subroutine: input an address
	;assemble the 0x400 gauge cluster CAN packet
	;using data starting at input address
	;word, word, byte, byte, byte, byte
0x0154a2:	LINK.W A6,$fff4	; SP - 4 -> SP; An ->(SP); SP-> An; SP+dn -> SP, dn => twos complement = -12 	
0x0154a6:	MOVEM.L A3/A2,(A7)	; Registers -> destination (OR) source -> registers; register list mask: A7,A6,A5,A4,A3,A2,A1,A0,D7,D6,D5,D4,D3,D2,D1,D0 is reversed for -(An)	
	;move input address onto A3
0x0154aa:	MOVEA.L ($8,A6),A3	; source -> destination	
	;set A2 as $FFF146
0x0154ae:	MOVEA.L #16773446,A2	; source -> destination	
	;CAN control/status
	;time stamp  code   length
	;  15-8      7-4     3-0
	;136 = 10001000 -> length 8, code 1000 (not ready to transmit)
0x0154b4:	MOVE.W #136,($fff140_CAN control/status bytes buffer 5).L	; source -> destination	
	;CAN ID high
	;ID       RTR   0  0  0  0
	;15-5     4     3  2  1  0
	;10000000000 0 0000 -> CAN ID = 0x400
0x0154bc:	MOVE.W #32768,($fff142_CAN ID high buffer 5).L	; source -> destination
0x0154c4:	MOVE.W (A3),(A2)+	; source -> destination	
0x0154c6:	MOVE.W ($2,A3),(A2)+	; source -> destination	
0x0154ca:	MOVE.B ($4,A3),(A2)+	; source -> destination	
0x0154ce:	MOVE.B ($5,A3),(A2)+	; source -> destination	
0x0154d2:	MOVE.B ($6,A3),(A2)+	; source -> destination	
0x0154d6:	MOVE.B ($7,A3),(A2)	; source -> destination	
	;200 = 11001000 -> length 8, code 1100, RTR = 0 from above
	;(data frame ready to be transmitted once
0x0154da:	MOVE.W #200,($fff140_CAN control/status bytes buffer 5).L	; source -> destination	
0x0154e2:	MOVEM.L (A7),A3/A2	; Registers -> destination (OR) source -> registers; register list mask: A7,A6,A5,A4,A3,A2,A1,A0,D7,D6,D5,D4,D3,D2,D1,D0 is reversed for -(An)	
0x0154e6:	UNLK A6	; unlink: An -> SP; (SP) -> An; SP + 4 -> SP	
0x0154e8:	RTS	; return from subroutine (SP) -> PC; SP + 4 -> SP	
	;-----------------------------
and here is the code which calls that function:
Code:
	;now move data onto memory bytes 
	;to assemble CAN packet for gauge cluster
0x01ad34:	MOVE.B #0,D5	; source -> destination	
0x01ad38:	MOVEQ #0,D0	; Immediate data -> destination	
0x01ad3a:	MOVE.B (A2),D0	; source -> destination	
0x01ad3c:	MOVEQ #11,D1	; Immediate data -> destination	
0x01ad3e:	CMP.L D1,D0	; Destination - source -> cc	
	;if the byte at $80860 is not 11
	;jump to 0x1ad54
0x01ad40:	BNE.B $12	; if condition (Not equal) true, then PC + 2 + dn -> PC, twos complement = 18  displacement: 20 points to: 0x01ad54	
0x01ad42:	MOVEQ #0,D0	; Immediate data -> destination	
0x01ad44:	MOVE.B ($86ce1_byte vehicle speed zero level for gauge cluster).L,D0	; source -> destination	
0x01ad4a:	LSL.W #8,D0	; Destination shifted by Count -> Destination	
0x01ad4c:	MOVE.W D0,($8039a_word first data for gauge cluster CAN packet -vehicle speed (KPH), lower byte 0).L	; source -> destination	
0x01ad52:	BRA.B $10	; PC + 2 + dn(twos complement = 16 ) -> PC displacement: 18 points to: 0x01ad64	`
0x01ad54:	MOVEQ #0,D0	; Immediate data -> destination	
0x01ad56:	MOVE.B ($8036a_OBD vehicle speed).L,D0	; source -> destination	
0x01ad5c:	LSL.W #8,D0	; Destination shifted by Count -> Destination	
0x01ad5e:	MOVE.W D0,($8039a_word first data for gauge cluster CAN packet -vehicle speed (KPH), lower byte 0).L	; source -> destination	
0x01ad64:	MOVEQ #0,D0	; Immediate data -> destination	
0x01ad66:	MOVE.B (A2),D0	; source -> destination	
0x01ad68:	MOVEQ #12,D1	; Immediate data -> destination	
0x01ad6a:	CMP.L D1,D0	; Destination - source -> cc	
	;if the byte at $80860 is not 12
	;jump to 0x1ad7a
0x01ad6c:	BNE.B $c	; if condition (Not equal) true, then PC + 2 + dn -> PC, twos complement = 12  displacement: 14 points to: 0x01ad7a	
0x01ad6e:	MOVE.W ($86cde).L,($8039c_word second data for gauge cluster CAN packet -vehicle rpm).L	; source -> destination	
0x01ad78:	BRA.B $a	; PC + 2 + dn(twos complement = 10 ) -> PC displacement: 12 points to: 0x01ad84	`
0x01ad7a:	MOVE.W ($801c8_word RPM).L,($8039c_word second data for gauge cluster CAN packet -vehicle rpm).L	; source -> destination	
	;put fuel tank level onto $8039e
0x01ad84:	MOVE.B (A3),($8039e_byte third data for gauge cluster CAN packet -fuel tank level).L	; source -> destination
0x01ad8a:	MOVE.B ($80116_byte coolant temp-other unit).L,($8039f_byte fourth data for gauge cluster CAN packet -coolant temp other unit).L	; source -> destination	
0x01ad94:	MOVE.B D2,($803a0_byte fifth data for gauge cluster CAN packet -bit flags set by 0x80862 level).L	; source -> destination	*
0x01ad9a:	MOVE.B D5,($803a1_byte sixth byte for gauge cluster CAN packet -always 0).L	; source -> destination	
0x01ada0:	PEA ($8039a_word first data for gauge cluster CAN packet -vehicle speed (KPH), lower byte 0).L	; SP - 4 -> SP; <ea> -> (SP)	
	;[email protected] 0x154a2: input $8039a
	;input an address
	;assemble the 0x400 gauge cluster CAN packet
	;using data starting at input address
	;word, word, byte, byte, byte, byte
0x01ada6:	JSR ($154a2).L	; SP - 4 -> Sp; PC -> (SP); destination address -> PC displacement: -22788 points to: 0x0154a2
Another user ( @garw ) is creating an aftermarket gauge cluster which uses the signals sent from the car to control the cluster. Perhaps he/she can help explain what controls the odometer advance on the different cars.

Last edited by Obeisance; 01-16-2017 at 07:01 AM.
Obeisance is offline  
post #3 of 3 (permalink) Old 01-16-2017, 07:24 PM Thread Starter
Registered User
 
Join Date: Jul 2014
Posts: 17
@Obeisance This resolved my issue. Thanks so much. Aftermarket ECU was sending data at 100Hz. Chris at Prestige Tuning and Motorsport here in Wellington, NZ, did some testing and had to lower it to 10Hz and the Odo kicked in straight away. He calculated it was about 2 kilometers out for every 100kms but probably better than factory.

Thanks again for your hard work on that and sharing that info.

happy Lotusing

Last edited by theflinch; 01-16-2017 at 10:55 PM.
theflinch is offline  
Sponsored Links
Advertisement
 
Reply

  LotusTalk - The Lotus Cars Community > Lotus Discussions > Electrical

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the LotusTalk - The Lotus Cars Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in











Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may 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 On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome