DIY PROMDo It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.
Welcome to ThirdGen.org!
Welcome to ThirdGen.org.
You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, at no cost, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, join the ThirdGen.org community today!
I've always been under the impression that mode-4 does not work on the '165 and '730 ECM. My snap-on scanner cannot perform mode4 operations, such as clear DTC.
Can anyone verify this?
A search revealed 3 posts on this, all involving Craig moates saying it would be "cool".. I'm guessing it doesn't work on our platforms.
i think you need a patch, in order to access the ram, they probably removed that code or changed it after initial calibration tuning. (the changes Montecarslow made in that thread, allowed him to access the additional sram he added). I can't read assembly well enough to say what the original code was doing there.
I don't believe you need additional ram unless you are putting the cal into it, as done with the nvsram. BTW, the nvsram module is pretty sweet, but right now it's only available for the '730 and a couple of cals, using the software package it comes with. If it had tunerpro support, that would be bada$$.
Mode 4 commands work. I've used them on a '7730 ECM. Can change all kinds of settings in real time as the engine is running. Can turn the fan(s) on/off, EGR and CCP duty cycle, force closed or open loop. Run the IAC, idle speed, Spark advance, turn the SES light on. . .
Mode 4 commands work. I've used them on a '7730 ECM. Can change all kinds of settings in real time as the engine is running. Can turn the fan(s) on/off, EGR and CCP duty cycle, force closed or open loop. Run the IAC, idle speed, Spark advance, turn the SES light on. . .
RBob.
Hi,
Interesting. Tunerpro/tunercat has no ability to edit mode 4 stuff though huh?
cool! from those other threads, it sounded like it didn't work. sorry for posting erroneous facts....
what did you use to poke the commands? a terminal program?
Many years ago I wrote a DOS terminal program. In it is functionality to transmit data strings that the user input in hex. So if the following data wanted to be sent: $F4 $56 $01 $B5, it was typed in as: F45601B5, which sent it out as binary data.
The incoming data could be displayed in text or as hex data. And can also be captured to a disk file. The above string is a mode 1 command, a data packet request.
It gets tedious putting together mode 4 commands. As they are bit mapped and have a particular layout. Best bet would be to build the strings and place them into the program. Then just click a button to select what function is desired.
Interesting. Tunerpro/tunercat has no ability to edit mode 4 stuff though huh?
No code changes are needed to use Mode 4 write?
I can't find any good documentation on it.
-- Joe
I don't believe that any of the editors/data-loggers support mode 4 commands. Many of the commercial scan tools don't either. The GM Tech1 and Tech2's obviously support mode 4 commands.
No code changes are needed to use Mode 4 write?
It depends what you mean by a write. If you mean to send a mode 4 command and have the ECM act upon it. No code changes are required. This is a standard function of the ECM.
I used the hac to figure out what mode 4 operations are available along with which bits of which bytes need to be set. Should send all ten data bytes of the packet. Then the header bytes & packet checksum.
I don't believe that any of the editors/data-loggers support mode 4 commands. Many of the commercial scan tools don't either. The GM Tech1 and Tech2's obviously support mode 4 commands.
No code changes are needed to use Mode 4 write?
It depends what you mean by a write. If you mean to send a mode 4 command and have the ECM act upon it. No code changes are required. This is a standard function of the ECM.
My biggest concern was resetting DTC codes. Currently as you know, I'd have to disconnect the battery. It would be nice to be able to do it without opening the hood. I wonder why Magnus doesn't put mode-4 support in tunerpro? hrmm.
Datamaster doesn't have it. My snapon scanner doesn't either.
TunerPro RT does have an option for clearing trouble codes. Look for the ALDL setup button at the top of the main window. Then look for the window labeled ALDL Commands Quick-Send. I never tried using it so maybe Mark never implemented it, but its there.
Yes it does.
Its in the record box. This is actually Mode 10 to clear the error codes.
It sends back a message stating "Strange ECM response" or something like that, but it does clear the DTCs.
I tried to get TP to do it using the code from the hac but it never worked.
ED: For AUJP if you set this bit, errors will be cleared.
bset *L0040,#0x01
bit is automatically cleared once error words are zero'd out.
Maybe I could log the port to see what is being transmitted there. Hmmmm...
For DTC's, the other thing that can be done is to set the "number of error free starts to clear codes" to a lower number. Stock is usually 50. I like to set it to 3 or 5. This way the codes don't stick around too long.
Just did some testing,
This works on the bench for $8D but need to try in the car.
Enter this into the datastream definition and then select it in the ALDL screen, hit send command.
I forgot about the # of starts to clear. Good idea too.
Should send all ten data bytes of the packet. Then the header bytes & packet checksum.
RBob.
Interesting idea if I could make a string to clear the BLM cells.
Better than pulling a fuse or writing a routine to do it in code.
can you elaborate a bit on that, I'm pretty slow when it comes to the comm stuff.
Try these strings and see if they work. I didn't test them, so it's a 50-50 shot. I did find a mode 4 command to clear the DTC's. Same as the mode 10 command as far as functionality.
The fan 1 on/off is an easy one to test as it is easy to see the results. Note that the BLM clear also clears the SAM cells.
The strings start with the header: $F4
Then the length of the packet: $60
Then the mode type: $04
Then 10 bytes of command data: $nn - $nn (varies)
Then the checksum: $cc (varies)
Note that mode 4 commands typically time out. If the fan is commanded on after a period of time is will be turned off. Although the same command can be repeated every couple of seconds to reset the mode 4 timer.
Another thing, several commands can be placed into the same mode 4 packet. Such as clearing the DTC's and BLMs with one command. Just OR the command byte together and change the checksum.
If you guys take the mode 4 hack I did to make the NVSRAM module work, you can use that to write to any location in RAM that you want.... just a thought for quick and dirty register changes (like clearing BLMs)
I found the 10 words that the control works on.
I never put it together how the code was written in the manner that it was for controlling outputs.
Now its a bit clearer.
Thing I was wondering was if the commands are masked to only make the changes or would you need to have all 10 registers the way you want them when uploading a command.
Looks like Mode 4 takes full control of the registers when operating. Q:Basically, If I turn on the fans with the above line does the rest of the bits stay as the code is running them or does the 00 for each word clear the other memory location?
Making changes while running would need to maintain everything except what you want to change.
Typically there is a bit to define the operational parameter. This would be such as selecting fan1 or fan 2, or EGR, or commanded AFR. Then another bit for items that are on/off, such as the fans. Or another byte for items such as CCP DC%, or commanded AFR.
So in the command you can select which operating parameter to change, then how to change it. If the only select bit that is set is for that parameter, then that is the only one affected.
Here is an example of SES light control along with fan 1:
Code:
Turn on Fan 1:
F4 60 04 02 02 00 00 00 00 00 00 00 00 A4
Turn on SES:
F4 60 04 01 01 00 00 00 00 00 00 00 00 cc
Turn off Fan 1 leaving SES on:
F4 60 04 02 00 00 00 00 00 00 00 00 00 cc
Turn on Fan 1 and SES on:
F4 60 04 03 03 00 00 00 00 00 00 00 00 cc
I'm sitting in front of my bench now playing with them and my NVSRAM board.
I'll be trying stuff all weekend if the stupid laptops quit breaking.
Vibration in the car during "Testing" is really taking its toll on the display backlight controller,USB and power connectors. So far I've soldered the mainboard three times in the last two days, hopefully I got them all now.
As you're discovering, TunerPro can be made to work with Mode 4 commands. However, do note that some (all?) of the commands require regular re-sends in order to maintain the requested mode.
What TunerPro doesn't do is allow you to easily set the variables in the mode 4 strings. I do have this planned for the scannerpro engine (which I have integrated into TunerPro, but nothing releasable yet). Once I'm done with the meat and potatoes of the integration, I plan to add more "complete" Mode 4 support - e.g. the ability to actually set the variables and send regular keep-alive messages.
Took some digging to find this again, wanted to get back to working with this again and figured I'd post the locations for others to try if they wanted.
Here is the info on the words used by the $8D code for Mode 4 Control.
Code:
; MODE 4 OPERATION (10 WORDS)
RBob's examples from previous post
;Clear DTC's:
;F4 60 04 00 00 40 00 00 00 00 00 00 00 68
;
;BLM Reset:
;F4 60 04 00 00 10 00 00 00 00 00 00 00 98
;
;Turn on Fan 1:
;F4 60 04 02 02 00 00 00 00 00 00 00 00 A4
;
;Turn off Fan 1:
;F4 60 04 02 00 00 00 00 00 00 00 00 00 A6
;
; COMMAND FOR MODE 4 = F4 60 04 ...
; 10 WORDS SELECTED BY THE LOCATION IN THE BIN "MARKED" FOR MODE 4 USE
; These start at L0192 and go to L019B
;
; Each byte is the binary word output setting (EX: 02 = bit 1 will be on)
;
; ldd L0171 ; ALSO ICB+1 (WHICH TBL TO TX)
; std L0192 ; ALDL DISCRETE ENABLE
; ldd L0173 ; ALSO ICB+3
; std L0194 ; ALDL MODE 4 CONTROL WORD
; ldd L0175 ; ALSO ICB+5
; std L0196 ; ALDL PWM ENABLE bits
; ldd L0177 ; ALSO ICB+7
; std L0198 ; ALDL FUNCT MODE ENABLE WORD
; ldd L0179 ; ALSO ICB+9
; std L019A ; ALDL DS AF
; bra LB3D1 ; BRANCH TO LB3D1 ALWAYS
;
L0192 = 0x0192 ; DISCRETE ENABLES WORD, ALDL MODE 4
;---------------------------------------------------
; b7, A/C Clutch is Controlled
; b6, EGR is Controlled
; b5, Air Switching is Controlled
; b4, Air Pump is Controlled
;
; b3, CCP is controlled
; b2, Skip Shift/TCC is Controlled
; b1, FAN 1 is Controlled
; b0,
;---------------------------------------------------
L0193 = 0x0193 ; ALDL DESCRETE STATES ALDL MODE 4
;---------------------------------------------------
; b7, A/C Clutch 1 = OFF
; b6, EGR Solenoid is ON
; b5, Air Switched is ON, 0 = Divert
; b4, Air Pump on
;
; b3, CCP on
; b2, Skip Shift/TCC is ON
; b1, Fan 1 / (CK ENG LIGHT ON 749)
; b0,
;---------------------------------------------------
L0194 = 0x0194 ; ALDL MODE 4 CONTROL WORD ALDL MODE 4
;---------------------------------------------------
; b7, (FUEL BACK UP CMD'ED)
; b6, (SPK BACK UP CMD'ED)
; b5,
; b4, CLEAR BLM & SAM MEMORY (UNCONFIRMED)
; Checks for B/U fuel and spark commanded via aldl.
; b3, 1 = SPARK BACK UP COMMANDED
; b2,
; b1, 1 = IAC OPEN/CLOSED LP CNT'L ENABLED
; b0, 1 = FUEL OPEN/CLOSED LP CNT'L ENABLED
;---------------------------------------------------
L0195 = 0x0195 ; CONTROL WORD ALDL MODE 4
;---------------------------------------------------
; b7,
; b6,
; b5, FAN 2 is Controlled
; b4, C.A.R.S. Shift Light is Controlled
;
; b3,
; b2, S.E.S. Engine Light is Controlled
; b1,
; b0, 1 = Closed Loop
;-----------------------------------------------------
L0196 = 0x0196 ; PWM ENABLE bits when ALDL MODE 4
;-----------------------------------------------------
; b7,
; b6,
; b5, 1 ??? D.C. Enable, Fan 2 ($4004, b2 turns it on)
; b4, 1 3FFC D.C. Enable, C.A.R.S. shift light
;
; b3, 1 0197 D.C. Enable, CCP Solenoid
; b2, 1 3FD8 D.C. Enable, Check Engine light
; b1,
; b0, 1 0197 D.C. Enable, EGR Solenoid
;---------------------------------------------------
L0197 = 0x0197 ; EGR & CCP PWM DUTY CYCLE ALDL MODE 4
;---------------------------------------------------
; COMMANDED EGR & CCP PWM DUTY CYCLE When in Mode 4
;---------------------------------------------------
L0198 = 0x0198 ; ALDL FUNCT MODE ENABLE WORD, ALDL MODE 4
;---------------------------------------------------
; b7,
; b6,
; b5, ADVANCE SA (BY VALUE AT L019B)
; b4, RETARD SA (BY VALUE AT L019B)
;
; b3,
; b2, MOD A/F RATIO (USE VALUE AT L019A)
; b1, MOD IAC (BY RPM AT L0199)
; b0, MOD IAC (BY STEPS AT L0199)
;---------------------------------------------------
L0199 = 0x0199 ; IAC VAL, (RPM or STEPS) ALDL MODE 4
;---------------------------------------------------
; NEW IAC VALUE WHEN IN Mode 4
;---------------------------------------------------
L019A = 0x019A ; ALDL DS A/F RATIO ALDL MODE 4
;---------------------------------------------------
; NEW A/F RATIO When in Mode 4
;---------------------------------------------------
L019B = 0x019B ; CONTROL WORD, SPK ADV ALDL MODE 4
;---------------------------------------------------
; SA modifier value When in Mode 4
;---------------------------------------------------
I still have not confirmed if the bit changes are "masked" or outright commanded and you must state explicitly the entire configuration desired to be in effect when the comman is executed.
ie: If the fan is commanded on, and other items are 00, does everything else turn off?
These will override what the code is doing during normal operation.
I also have not checked the scale factors that may be needed when adjusting the SA or AFR type items so the "value" may not be the actual result for these items.
Use with care!