Instructions to change fuel maps on 14CUX Griffith, Chimaera

Instructions to change fuel maps on 14CUX Griffith, Chimaera

Author
Discussion

davep

1,143 posts

285 months

Tuesday 27th May 2014
quotequote all
danbourassa said:
... The goal is to have a version of code available that is optimized for the serial port and to use faster internal memory. In version 3 that I'm working on now, I have a directive that moves most of the bit flag variables (bytes that are used as individual bit flags) from external to internal memory and I have measured both a reduction in code size and actual performance gains.
OK, this bit I understand; sounds very elegant.

danbourassa said:
...You can think of this as the "small model" in old X86 segmented memory programming, where part of the addressing is implied resulting is smaller, faster executables...
I don't quite see the analogy between the small model data, code and stack segment pointers all being the same and addressing that is partially implied ... but this is getting very geeky and I don't want to distract you from V.3, so I'll figure it out latter.

stevesprint

Original Poster:

1,114 posts

180 months

Wednesday 28th May 2014
quotequote all
shpub said:
I used to work for Motorola. In fact I managed the Lucas support team
Steve,
Woow respect, thanks for sharing with us all your position at Motorola and your management roll of the Lucas support team, what does DaveP mean a TA? I fully respect you are sworn to the Lucas secrecy act and therefore I wouldn’t ask you any questions that your not allowed to answer. However, I'm hoping I can get away with one general Motorola question, but please excuse my ignorance as I'm not in the electronic, computer or motor trade.
Back in the 1980's when Motorola manufactured and sold new micro-controllers would the circuit board designers write the assembler code or would separate software developers? Also would Motorola provide sample assembler code or pseudo code to help sell their micro-controllers, especially when a micro-controller is aimed at a specific market?
Thanks again for spilling the beans and I'm sure everyone will respect your sworn to secrecy.
Steve

Edited by stevesprint on Wednesday 28th May 00:36

stevesprint

Original Poster:

1,114 posts

180 months

Wednesday 28th May 2014
quotequote all
Colin

Please can you consider adding status indicators to RoverGauge for the following:-
Inertia switch
Heated screen
Auto/neutral/manual
Air/Con

Thanks for all the previous updates.
Steve


davep

1,143 posts

285 months

Wednesday 28th May 2014
quotequote all
danbourassa said:
Dave, I'm pleased that you are looking at this code so closely that you would notice this.
Dan, for my bedtime reading I've now shelved War and Peace, instead I read Concatenated 14CUX Assembly Files by DB.

shpub

8,507 posts

273 months

Wednesday 28th May 2014
quotequote all
stevesprint said:
Steve,
Woow respect, thanks for sharing with us all your position at Motorola and your management roll of the Lucas support team, what does DaveP mean a TA? I fully respect you are sworn to the Lucas secrecy act and therefore I wouldn’t ask you any questions that your not allowed to answer. However, I'm hoping I can get away with one general Motorola question, but please excuse my ignorance as I'm not in the electronic, computer or motor trade.
Back in the 1980's when Motorola manufactured and sold new micro-controllers would the circuit board designers write the assembler code or would separate software developers? Also would Motorola provide sample assembler code or pseudo code to help sell their micro-controllers, especially when a micro-controller is aimed at a specific market?
Thanks again for spilling the beans and I'm sure everyone will respect your sworn to secrecy.
Steve

Edited by stevesprint on Wednesday 28th May 00:36
Motorola did supply public example code but it tended to be fairly generic. We occasionally would do customer specific stuff but it was rare. In some cases, the circuit board developers would also write the code but in others it would be software developers. There is/was no fast rule on this. One of the major problems for any development is when the hardware is changed without realising the effect on the software and vice versa.

The main activities with Lucas was working out how to debug and test the code without destroying an engine. You can't simply stop the processor in mid execution to look at variables as it would cause havoc with the engine. It could leave injectors on full time and potentially hydraulic the engine. Same dangers happened when the code crashed or had a bug in it. So you had to stop the engine first and then the processor. By which time, the context is lost. The solution was to force all activities externally so that they could be captured with analysers etc. The serial port was a help but you could never be sure exactly when the data was read or even if the memory block was read in the same time frame.

Also bear in mind that this development started in the mid 1980s when micros in embedded designs like this was in its infancy. There were none of the tools available that there are today such as JTAG, symbolic debugging and so on. The 14CUx was probably the first digital ECU as well so it was very much state of the art and right on the (b)leading edge of technology.

I was also involved in training and writing for Motorola as well as my normal day job hence DaveP's comment about TA (technical Author). It was something that I did in my spare time as Motorola had a very lucrative bonus scheme for external publications... The University where I'm lecturing specified a couple of my books and then discovered I lived locally. The rest is history as they say.

danbourassa

246 posts

138 months

Wednesday 28th May 2014
quotequote all
davep said:
I don't quite see the analogy...
And I though I was being so clever.

davep said:
..for my bedtime reading I've now shelved War and Peace, instead I read Concatenated 14CUX Assembly Files by DB.
The way it loops back on itself, I was thinking it was more like Finnegans Wake (and just as readable).

cmb

103 posts

176 months

Wednesday 28th May 2014
quotequote all
stevesprint said:
Colin

Please can you consider adding status indicators to RoverGauge for the following:-
Inertia switch
Heated screen
Auto/neutral/manual
Air/Con

Thanks for all the previous updates.
Steve
I can definitely look into adding the inertia switch, screen heater, and A/C status. The gearbox selection is already displayed in RoverGauge next to the "Selected gear" label -- although if this isn't working correctly, please let me know. It's one of those features on which we didn't put much emphasis, and therefore didn't get a lot of testing.

I'll post here when I have a new version ready.

davep

1,143 posts

285 months

Thursday 29th May 2014
quotequote all
danbourassa said:
The way it loops back on itself, I was thinking it was more like Finnegans Wake (and just as readable).
Dan, as part of the forthcoming Original_code_V3 release could you include a Bourassean neologisms lexicon please?

danbourassa

246 posts

138 months

Thursday 29th May 2014
quotequote all
davep said:
Dan, as part of the forthcoming Original_code_V3 release could you include a Bourassean neologisms lexicon please?
Dave, as a fellow nerd you are not supposed to know this much about literature!

I wanted to mention earlier during discussions about the road speed that the flowchart on the G-drive has several graphs that may interest you, Steve and maybe others. The last page shows three graphs. Data was captured at 1 second intervals during an actual road test.

The top graph shows the timer overflow counter. The MPU sets a bit when the free running counter overflows and software checks this often enough to update it's own counter. This is what periodically latches the VSS state change counter into the road speed variable.

The middle graph shows the number of VSS high-to-low state changes since the last time the road speed was updated. This is a representation of VSS square wave frequency.

Finally, the third graph shows the 14CUX road speed. You may notice that this is an outline or envelope of the middle graph. This makes sense since the overflow counter and state change counter are cleared together. In fact, Lucas made sure that they were cleared together by wrapping the clearing operations with an interrupt mask.

cmb

103 posts

176 months

Saturday 31st May 2014
quotequote all
My understanding is that the inertia switch state is only monitored as a voltage change, not a discrete switch input. It's also only really applicable during the shutdown sequence (see code in shutDown.asm). Since the RoverGauge main display is pretty tight on space, I've decided to leave this one out.

I've done the work to add the screen heater and AC compressor indicators to the display. Anyone who builds RoverGauge from source themselves can pull from the repository and see this now. I'll do a build and test these two new inputs next weekend, after which I'll release version 0.8.0.

stevesprint

Original Poster:

1,114 posts

180 months

Sunday 1st June 2014
quotequote all
cmb said:
My understanding is that the inertia switch state is only monitored as a voltage change, not a discrete switch input. It's also only really applicable during the shutdown sequence (see code in shutDown.asm). Since the RoverGauge main display is pretty tight on space, I've decided to leave this one out.

I've done the work to add the screen heater and AC compressor indicators to the display. Anyone who builds RoverGauge from source themselves can pull from the repository and see this now. I'll do a build and test these two new inputs next weekend, after which I'll release version 0.8.0.
Colin, thanks very much for adding the screen heater and A/C inputs. I’ve been looking at the code too long and forgot the gear selection is already in RG and yes it works correctly. I only mentioned the inertia switch input as I spotted it in the adc vector table and it was once questioned when FFMan couldn’t get his bench 14CUX running. It’s never an issue in the UK as our inertia switches are only connected to the fuel pump 12v supply and not directly to the ECU.

stevesprint

Original Poster:

1,114 posts

180 months

Monday 2nd June 2014
quotequote all
davep said:
danbourassa said:
The way it loops back on itself, I was thinking it was more like Finnegans Wake (and just as readable).
Dan, as part of the forthcoming Original_code_V3 release could you include a Bourassean neologisms lexicon please?
I haven't a clue what you're talking about so I must be the nerd. My 12 year old daughter has just saved up her pocket money and bought a Raspberry Pi computer so hopefully she'll also be a nerd. Her next bedtime story is going to be the Hayes manual How to assemble a Raspberry Pi and Python programming.
danbourassa said:
I wanted to mention earlier during discussions about the road speed that the flowchart on the G-drive has several graphs that may interest you, Steve and maybe others. The last page shows three graphs. Data was captured at 1 second intervals during an actual road test.

The top graph shows the timer overflow counter. The MPU sets a bit when the free running counter overflows and software checks this often enough to update it's own counter. This is what periodically latches the VSS state change counter into the road speed variable.

The middle graph shows the number of VSS high-to-low state changes since the last time the road speed was updated. This is a representation of VSS square wave frequency.

Finally, the third graph shows the 14CUX road speed. You may notice that this is an outline or envelope of the middle graph. This makes sense since the overflow counter and state change counter are cleared together. In fact, Lucas made sure that they were cleared together by wrapping the clearing operations with an interrupt mask.
In non-nerd lingo does the top graph shows the timer counting up from 0 to 14 repeatedly every 0.975sec ish (15 x 65ms)? Therefore the gaps horizontally between the top peaks are the length of time for each batch of road speed pulses used to calculate the road speed? The middle graph shows the number of road speed pulses per batch (0.975sec) and the last graph shows the road speed which is distance divided by time or in this case pulses divided by time.

Dan,
After some driving while AFR and RG logging today for Mark has made me realise how important accurate road speed is in the log. We are interested in AFR on light load at 60mph and my RG speed is either too high or strobing, so Dan, no pressure !!!

stevesprint

Original Poster:

1,114 posts

180 months

Monday 2nd June 2014
quotequote all
Mark
Here's the AFR for map 2 at a steady 60 mph and hopefully answers your question. It's great to see the AFR merged with RG without a time delay. The RoverGauge speedo it a bit random and usually over reads at low speed and then under reads at high speed.


#time MPH RPM throttle mafPercent MapRow MapCol pulseMs AFR
18:47:54.324 27 2274 0.198436 0.103297 1 9 3.18 14.5
18:47:54.829 27 2270 0.220919 0.132736 1 9 3.395 15.3
18:47:55.373 22 2267 0.231672 0.147253 1 9 3.617 15.5
18:47:55.988 22 2269 0.232649 0.1476 1 9 3.627 15.6
18:47:56.532 22 2275 0.232649 0.147947 1 9 3.631 15.6
18:47:57.012 22 2280 0.232649 0.1476 1 9 3.611 15.7
18:47:57.540 22 2288 0.232649 0.144939 1 9 3.623 15.7
18:47:58.100 24 2293 0.233627 0.145633 1 9 3.646 15.7
18:47:58.596 24 2299 0.236559 0.153094 1 9 3.668 15.7
18:47:59.107 24 2301 0.236559 0.152632 1 9 3.687 15.7
18:47:59.652 25 2308 0.236559 0.151938 1 9 3.666 15.6
18:48:00.186 25 2314 0.236559 0.149451 1 9 3.676 15.6
18:48:00.820 22 2324 0.236559 0.148409 1 9 3.626 15.5
18:48:01.370 22 2299 0.0537634 0.044013 0 9 1.894 14.2
18:48:01.876 25 2267 0.0537634 0.041642 0 9 1.956 13.5


Edited by stevesprint on Monday 2nd June 22:16

blitzracing

6,387 posts

221 months

Tuesday 3rd June 2014
quotequote all
Superb- I think Ill be removing my Tornado chip and use the TVR one, that looks very good.

davep

1,143 posts

285 months

Tuesday 3rd June 2014
quotequote all
stevesprint said:
... I only mentioned the inertia switch input as I spotted it in the adc vector table and it was once questioned when FFMan couldn’t get his bench 14CUX running. It’s never an issue in the UK as our inertia switches are only connected to the fuel pump 12v supply and not directly to the ECU.
There's an inertia sensing input from a relay on my car that sits betwixt the inertia switch and the ECU:

Relay R8 – Fuel Pump Control

Pin out Connections (refer to Bible Circuit Diagram and Fuse panel block annotations). Cable colours in brackets.

Relay Pin 39
+12 V circuit to energise coil with ignition switched On:
Ignition switch – Block D 58ar (WR) – Block C 56ak (W) – Block H 50w – relay 39

Relay Pin 37
Ground circuit for coil:
CDL3 and RISTS12 (BW) – Block F 50z (BW) – relay 37

Relay Pin 38
+12 V feed control from ECU to relay contact:
ECU – Block J 58 (Y) – Fuse 14 - Block I 58D (Y) – Block E RS (Y) – relay 38

Relay Pin 36
With relay energised and contact made supply +12 V to Inertia Switch, and if closed circuit to Fuel Pump:
Fuel pump – Inertia switch (Y) - Block F RL (YB) – relay 36

Relay Pin 59
Not used.


The R8 relay is in addition to the fuel pump relay in the floating loom. Have you got this relay on your precat Steve?

Edited by davep on Sunday 8th June 08:15

davep

1,143 posts

285 months

Tuesday 3rd June 2014
quotequote all
stevesprint said:
Mark
Here's the AFR for map 2 at a steady 60 mph and hopefully answers your question. It's great to see the AFR merged with RG without a time delay. The RoverGauge speedo it a bit random and usually over reads at low speed and then under reads at high speed.


#time MPH RPM throttle mafPercent MapRow MapCol pulseMs AFR
18:47:54.324 27 2274 0.198436 0.103297 1 9 3.18 14.5
18:47:54.829 27 2270 0.220919 0.132736 1 9 3.395 15.3
18:47:55.373 22 2267 0.231672 0.147253 1 9 3.617 15.5
18:47:55.988 22 2269 0.232649 0.1476 1 9 3.627 15.6
18:47:56.532 22 2275 0.232649 0.147947 1 9 3.631 15.6
18:47:57.012 22 2280 0.232649 0.1476 1 9 3.611 15.7
18:47:57.540 22 2288 0.232649 0.144939 1 9 3.623 15.7
18:47:58.100 24 2293 0.233627 0.145633 1 9 3.646 15.7
18:47:58.596 24 2299 0.236559 0.153094 1 9 3.668 15.7
18:47:59.107 24 2301 0.236559 0.152632 1 9 3.687 15.7
18:47:59.652 25 2308 0.236559 0.151938 1 9 3.666 15.6
18:48:00.186 25 2314 0.236559 0.149451 1 9 3.676 15.6
18:48:00.820 22 2324 0.236559 0.148409 1 9 3.626 15.5
18:48:01.370 22 2299 0.0537634 0.044013 0 9 1.894 14.2
18:48:01.876 25 2267 0.0537634 0.041642 0 9 1.956 13.5


Edited by stevesprint on Monday 2nd June 22:16
Steve how did you do the merge? I tried a whole load of functions in Excel and couldn't manage it. I ended up doing a few key alignments manually, there were a few glitches but overall the AFR values look good.

Re the cable screening problem, have you looked at RFI shielding tape?

stevesprint

Original Poster:

1,114 posts

180 months

Tuesday 3rd June 2014
quotequote all
blitzracing said:
Superb- I think Ill be removing my Tornado chip and use the TVR one, that looks very good.
Mark, Ah of cause, the Tornado chip is on a scrambler so we can't alter the fuel tables. Shame, as MA has done a lot of R&D over the years and come up with some good ideas, like reduce cranking and warn up fuelling etc.
Sounds like its time I use Dan's rebuild project to merge the Griff 400 precat map 2 into the Chimaera 400 cat prom and then you'll have the best of both plus with the later TVR code. Once tested we can then look at extending the RPM points, it's good to start with the standard maps. I hope it's not urgent as I'm currently working on my car in the evenings this week, but I'm sure I'll make time as I love this stuff but I don't know why.


stevesprint

Original Poster:

1,114 posts

180 months

Tuesday 3rd June 2014
quotequote all
davep said:
Steve how did you do the merge? I tried a whole load of functions in Excel and couldn't manage it. I ended up doing a few key alignments manually, there were a few glitches but overall the AFR values look good.
Dave, I have to admit I also merged the logs manually. I do intend to add a merge feature to my AFR logger especially now I've seen how accurately the logs matched up. After the merge I could then create a search to remove the glitches before summarising into a table.
I'm sorry it may take a while as I'm not up to full speed with c, plus its now the most precious time of year and my high octane hormones have come out to play. In the mean time try searching for "Merge Spreadsheets in excel" as it comes up with some good examples of the consolidate function. Also if you have MS Access you could try creating a relationship between the two logs, sorry if I'm teaching you how to drive, (meaning suck eggs).
davep said:
Re the cable screening problem, have you looked at RFI shielding tape?
Good idea especially as I already have a roll of foil tape.
davep said:
The R8 relay is in addition to the fuel pump relay in the floating loom. Have you got this relay on your precat Steve?
Yes I do have the second fuel pump relay on the main fuse board and I know there is also one on a friends precat. I think both relays only cut the supply to the fuel pump because if you pull either relay out or pop the inertia switch your engine will start and then die as the fuel pressure drops.

Where as NAS vehicles Dan has said the ECU monitors the inertia switch and I assume works according to his post below from page 13 of “Graphics interface for the 14CUX”.
danbourassa said:
I just thought of something else. The 12V supply needs to be connected to 3 inputs. Besides the main (ignition on) input and the always-on battery backup, 12V needs to be applied to the inertia switch input. This voltage comes into one of the ADC channels and the shutdown sequence is triggered when it goes away.
Edited by stevesprint on Wednesday 4th June 19:33

blitzracing

6,387 posts

221 months

Thursday 5th June 2014
quotequote all
stevesprint said:
Mark
Here's the AFR for map 2 at a steady 60 mph and hopefully answers your question. It's great to see the AFR merged with RG without a time delay. The RoverGauge speedo it a bit random and usually over reads at low speed and then under reads at high speed.


#time MPH RPM throttle mafPercent MapRow MapCol pulseMs AFR
18:47:54.324 27 2274 0.198436 0.103297 1 9 3.18 14.5
18:47:54.829 27 2270 0.220919 0.132736 1 9 3.395 15.3
18:47:55.373 22 2267 0.231672 0.147253 1 9 3.617 15.5
18:47:55.988 22 2269 0.232649 0.1476 1 9 3.627 15.6
18:47:56.532 22 2275 0.232649 0.147947 1 9 3.631 15.6
18:47:57.012 22 2280 0.232649 0.1476 1 9 3.611 15.7
18:47:57.540 22 2288 0.232649 0.144939 1 9 3.623 15.7
18:47:58.100 24 2293 0.233627 0.145633 1 9 3.646 15.7
18:47:58.596 24 2299 0.236559 0.153094 1 9 3.668 15.7
18:47:59.107 24 2301 0.236559 0.152632 1 9 3.687 15.7
18:47:59.652 25 2308 0.236559 0.151938 1 9 3.666 15.6
18:48:00.186 25 2314 0.236559 0.149451 1 9 3.676 15.6
18:48:00.820 22 2324 0.236559 0.148409 1 9 3.626 15.5
18:48:01.370 22 2299 0.0537634 0.044013 0 9 1.894 14.2
18:48:01.876 25 2267 0.0537634 0.041642 0 9 1.956 13.5


Edited by stevesprint on Monday 2nd June 22:16
Just trying to get the same data- first problem- the time logger program only seems to allow for Com 1 and 2, although my serial USB port is com 3, it wont allow a manual input, and I assume you have done a lot of editing from the log files and merged it with the time logger file? Whats involved?

davep

1,143 posts

285 months

Thursday 5th June 2014
quotequote all
stevesprint said:
Yes I do have the second fuel pump relay on the main fuse board and I know there is also one on a friends precat. I think both relays only cut the supply to the fuel pump because if you pull either relay out or pop the inertia switch your engine will start and then die as the fuel pressure drops.

Where as NAS vehicles Dan has said the ECU monitors the inertia switch and I assume works according to his post below from page 13 of “Graphics interface for the 14CUX”.
danbourassa said:
I just thought of something else. The 12V supply needs to be connected to 3 inputs. Besides the main (ignition on) input and the always-on battery backup, 12V needs to be applied to the inertia switch input. This voltage comes into one of the ADC channels and the shutdown sequence is triggered when it goes away.
Could this be how it works, i.e. with ECU monitoring, on the pre-cat Griffith with the R8 fuse board relay? See the circuit:

Relay Pin 38
+12 V sensing circuit to ECU from relay contact:
ECU – Block J 58 (Y) – Fuse 14 - Block I 58D (Y) – Block E RS (Y) – relay 38

Relay Pin 36
With relay energised and contact made supply +12 V via Inertia Switch, and if closed circuit to ECU:
Fuel pump – Inertia switch (Y) - Block F RL (YB) – relay 36

The inertia service code from my R2422 would suggest this is so:

CDC7 adc0_inertia:
CDC7 : D6 85 " " [3] ldab X0085
CDC9 : C5 04 " " [2] bitb #$04
CDCB : 26 6A "&j" [3] bne LCE37
CDCD : 81 1F " " [2] cmpa #$1F
CDCF : 24 0A "$ " [3] bcc LCDDB
CDD1 : D6 B1 " " [3] ldab X00B1
CDD3 : 5C "\” [2] incb
CDD4 : C1 32 " 2" [2] cmpb #$32
CDD6 : 24 07 "$ " [3] bcc LCDDF
CDD8 : D7 B1 " " [3] stab X00B1
CDDA : 39 "9” [5] rts
;
CDDB LCDDB:
CDDB : 7F 00 B1 " " [6] clr X00B1
CDDE : 39 "9” [5] rts
;
CDDF LCDDF:
CDDF : 0F " “ [2] sei
CDE0 : F6 20 06 " " [4] ldab X2006
CDE3 : F1 C0 B4 " " [4] cmpb XC0B4
CDE6 : 25 02 "% " [3] bcs LCDEA
CDE8 : C6 00 " " [2] ldab #$00
CDEA ....



Steve you really must get a copy of 'that' lexicon from Dan!

Edited by davep on Thursday 5th June 19:55