C4 Tech/Performance L98 Corvette and LT1 Corvette Technical Info, Internal Engine, External Engine

ProtoType MemCal BUA 9340, 86 Vette, ScanID 9701, ResNet 16055375 and 16055376

Thread Tools
 
Search this Thread
 
Old 07-28-2023, 10:07 PM
  #1  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default ProtoType MemCal BUA 9340, 86 Vette, ScanID 9701, ResNet 16055375 and 16055376

Hi All,

I have recently manage to build and test a prototype of the MemCal for my 1986 Corvette. Instead of just copying the EPROM from my original MemCal, I decided to find the source code, correct any errors and compile it and program a new EPROM. One of the hardest things to do was recreating the ResNet (16055375 and 16055376). I will be sharing all the source code (corrected and properly formated), Schematics (ResNets), the URL of a 68HC11 simulator that will allow simulated running of the code, and any other information that may be useful. I would like this to be a resource for the 1227165 ECU and the MemCals that use ResNet 16055375 and 16055376.







The following 2 users liked this post by dldavis:
VikingTrad3r (07-29-2023), yakmastermax (07-29-2023)
Old 07-30-2023, 06:15 PM
  #2  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Attached is the source code file (txt extension) and the hex and binary files for BUA-HAC (BUA 9340). Use Notepad++ to view it. The source code was found on "scribd.com". It contained numerous errors and the formatting was horrible. I'm not sure who initially dissassembled the code and wrote the comments. They seemed to do a pretty good job. I take no credit for the initial work. I did however correct a lot of mistakes and added tabs to clean up the format to make it readable. I compiled the code using "AS11M", a 68HC11 compiler I found here: http://vigir.ee.missouri.edu/~gdesou.../sim/AS11M.EXE
This website also has a HC11 Simulator that will let you step through the code:
http://vigir.ee.missouri.edu/~gdesou.../wookie167.exe
The main website is here:
http://vigir.ee.missouri.edu/~gdesou.../downloads.htm

I actually used another simulator that seemed to work very well it is "THRsim11". I believe that you can download it for free and use it, you may also contribute some amount of money if you find it useful. I don't have the link handy, but it can easily be found with a Google search.
http://www.hc11.demon.nl/thrsim11/thrsim11.htm

I would also like to mention that I found a mistake in one of the MAF tables:

;----------------------------------------
; Mass Air Flow TABLE 2
;
; TBL = gms/Sec * 5.33
;
;----------------------------------------
LC6A8: FCB 48 ; TABLE SCALAR
LC6A9: FCB 8 ; LINE TBL
;----------------------------------------
; gms/SeC BIN VDC #/HR
;----------------------------------------
FCB 119 ; 22.3 512 1.46 172
FCB 133 ; 25.0 544 1.55 193
FCB 147 ; 27.6 576 1.65 213
FCB 163 ; 30.6 608 1.74 236
FCB 182 ; 34.1 640 1.83 264 <<<<<<<<<< This is different in BUA 86 vette ($84 or 132). This value seems correct
FCB 198 ; 37.1 672 1.92 287
FCB 217 ; 40.7 704 2.01 314
FCB 237 ; 44.5 736 2.10 343
FCB 254 ; 47.7 768 2.19 368
;----------------------------------------
;----------------------------------------

I calculated what I thought would be the correct value and also compared this to the value in BUA 1728, so I'm pretty sure the change I made is correct. Since this value changed, I had to recalculate the checksum at the beginning of the code:

;*************************************** ****************
ORG $C000
LC000: FDB $25E5 ; EPROM ID code
LC002: FDB $0979 ; Date Code
LC004: FDB $02EE ; Sequence Number
;
;LC006: FDB $9708 ; Ck Sum of Addr's $C008 - $FFFF (SUM of all bytes)
LC006: FDB $973A ; Ck Sum of Addr's $C008 - $FFFF (SUM of all bytes) C6AE B6 instead of 84
LC008: FCB $32 ; Pgm Match Byte, $32 = 1986 Prod.
; -Set $AA For bypass of Cksum
;
LC009: FCB 0 ; Num of Cyl, 8 = 0000 0000, $00


also wrote a short script in python (3.11.3) to calculate checksums on 'bin' files. I would attach the 'exe', but that filetype is not accepted here. The script is pretty short, so here it is:

import sys


def calculate_checksum(filename):
# Open the file in binary mode
with open(filename, "rb") as file:
# Read all the bytes from the file
data = file.read()

# Initialize the sum to zero
checksum = 0

# Iterate over each byte in the data starting from the 8th byte
for byte in data[7:]:
# Add the byte value to the sum
checksum += byte

# Get the lower 16 bits of the sum
checksum = checksum & 0xFFFF

return checksum


# Check if a filename is provided as a command-line argument
if len(sys.argv) < 2:
print("Please provide the filename as a command-line argument.")
sys.exit(1)

# Get the filename from the command-line argument
filename = sys.argv[1]

checksum = calculate_checksum(filename)
print(f"Checksum: {checksum:04X}")


One last thing, I should mention is that when the program is compiled, the output file (I believe it is "S19") will not fill any of the unused memory locations with zeros. If you erase an EPROM and load the S19 file and then program the EPROM, it will probably leave the unused memory locations in there erased state ("FF"). You should probably write all zeros into the programmer (locations 0000-3FFF) before loading this file and programming an EPROM. This is necessary because the checksum function expects unused locations to be zero.

I'm also attaching a "68HC11" Assembly programming Guide.


Attached Files
File Type: txt
bua-hac_asm.txt (436.9 KB, 9 views)
File Type: hex
bua-hac.hex (38.5 KB, 9 views)
File Type: bin
bua-hac.bin (16.0 KB, 2 views)
File Type: html
68HC11 Assembly.html (120.1 KB, 7 views)

Last edited by dldavis; 07-30-2023 at 06:41 PM.
Old 07-30-2023, 06:48 PM
  #3  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Here is a quick image of the ResNet that I'm working on:


Old 07-31-2023, 09:27 AM
  #4  
eutu1984
Burning Brakes
 
eutu1984's Avatar
 
Member Since: Jul 2009
Location: Ashland PA
Posts: 1,247
Received 95 Likes on 80 Posts
2021 C4 of the Year - Modified Finalist

Default

This stuff is way beyond me but I just have to ask what are you trying to simulate the engine running or the function of the ECM.
I use Tuner Pro and the only way I would be able to mildly understand is that people in the past have made the code into
a format that most people can understand.
Old 07-31-2023, 10:28 AM
  #5  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

My plan is to eventually simulate the engine running with a second ECU/Memcal that I have. So far I have the ECU, Memcal and all the Connectors to wire up a simulator. I will eventually need to figure out how to create the signals from all the sensors. I've seen that there are a few engine simulator PCBs for sell on the internet. I may just buy one of those to make it easier. After getting a simulator to work, I will be able to make changes to the code (add options, change communications, etc.) without having to actual do all the work on my car with the engine running.

I'm mainly just want to document everything, in case anyone else can use the info. Eventually, I think it will be harder and harder to find parts to keep these cars running. I was kind of surprised to see that there is virtually no information on the Internet concerning on the resistor networks. I also believe that current price of $275 for a rebuilt Memcal is a little excessive. It's also a learning experience for me.
The following users liked this post:
eutu1984 (07-31-2023)
Old 07-31-2023, 11:05 AM
  #6  
eutu1984
Burning Brakes
 
eutu1984's Avatar
 
Member Since: Jul 2009
Location: Ashland PA
Posts: 1,247
Received 95 Likes on 80 Posts
2021 C4 of the Year - Modified Finalist

Default

Originally Posted by dldavis
My plan is to eventually simulate the engine running with a second ECU/Memcal that I have. So far I have the ECU, Memcal and all the Connectors to wire up a simulator. I will eventually need to figure out how to create the signals from all the sensors. I've seen that there are a few engine simulator PCBs for sell on the internet. I may just buy one of those to make it easier. After getting a simulator to work, I will be able to make changes to the code (add options, change communications, etc.) without having to actual do all the work on my car with the engine running.

I'm mainly just want to document everything, in case anyone else can use the info. Eventually, I think it will be harder and harder to find parts to keep these cars running. I was kind of surprised to see that there is virtually no information on the Internet concerning on the resistor networks. I also believe that current price of $275 for a rebuilt Memcal is a little excessive. It's also a learning experience for me.
Hope it works out for you, I think as the older components of cars from this era get eventually the only option will be aftermarket ecu's.
Old 07-31-2023, 11:17 AM
  #7  
Tunedport90
Melting Slicks
 
Tunedport90's Avatar
 
Member Since: Aug 2011
Posts: 2,370
Received 129 Likes on 115 Posts

Default

You can easily make v6 memcals work with cylinder select jumper. These are worth that much ?


this works as a ecm
tester. I built one years ago

http://www.jbperf.com/JimStim/index.html
The following users liked this post:
mjsusa1 (08-03-2023)
Old 08-01-2023, 09:18 AM
  #8  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Tunedport90,
Thanks for the info.


Below is how I made the Resnets. The tables below each schematic are the values measured on my original Resnets. All values are in Kilohms.

I tested the Memcal in Limp mode by running the car with the EPROM removed. I did not extensively test it, but it seemed to start and idle pretty good. It ran around 900 RPM with the SES light on constantly.



Last edited by dldavis; 08-01-2023 at 09:26 AM.
Old 08-01-2023, 09:55 AM
  #9  
Tunedport90
Melting Slicks
 
Tunedport90's Avatar
 
Member Since: Aug 2011
Posts: 2,370
Received 129 Likes on 115 Posts

Default

Very cool, I have seen the breakdown before on thirdgen.org not sure if it’s the same as yours.
would be cool to remake a board like this with a flash chip. This is for a 165 with a 4cyl netress. But maybe I can convert to a v8 netress


The following users liked this post:
eutu1984 (08-01-2023)
Old 08-02-2023, 09:54 AM
  #10  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Tunedport90,

I like the design of that board. I was thinking of doing something like that. Can you give me the part number for the flash chip on that board?



I used LTSpice to try and figure out the Resistor Networks. I found that if I used a constant current source of 1ma, I could use the voltage reading to indicate the resistance between any two points in the network. So for instance, if I wanted to measure the resistance between pins 5 and 6, I would connect pin 6 to ground and pin 5 to the current source and run the simulation. The voltage on the output of the current source represents the resistance.

I was able to tweak the values to get all the resistance readings relatively close to the measured readings on my memcal. It's not perfect, but it is apparently close enough that the car runs fine in limp mode. These resistor networks are probably not exactly how the originals were configured, but it seems to makes no difference as long as the measured values are very close. One problem with using this method to create the network is that each change to a particular resistor will affect all the other resistance readings. Therefore there is a lot of back and forth on selecting the values and there are trade offs where two resistance values inversely affect each other. I think if I continued tweeking the values I could probably get them to all be with in 5% of the original measured values. With the currently selected resistors, some of the measurements are only within 10% of the original measured values (measurements from pin 14 to pins 6, 7, 8 seem to be the most out of tolerance).

I'm attaching the LTSpice files (as a zip file), if anyone is interested.

The image below has some notes explaining the values written on the schematic and is an example of how to measure the resistance between pins 5 and 6.


Attached Files
File Type: zip
LTSpice NetRes files.zip (1.9 KB, 2 views)
Old 08-02-2023, 10:51 AM
  #11  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Here is the schematic of a generic Netres that I plan to make. I believe that this configuration will allow me to configure a resnet any way that I want by using a combination of resistors, uninstalled resistors and 0 ohm resistors.
The Image on the right is the configuration for the 16055375 resnet (J1 - J7 correspond to pins 1 - 7; J10 - J16 correspond to pins 8 - 14)


Last edited by dldavis; 08-02-2023 at 11:03 AM.
Old 08-02-2023, 11:09 AM
  #12  
Tunedport90
Melting Slicks
 
Tunedport90's Avatar
 
Member Since: Aug 2011
Posts: 2,370
Received 129 Likes on 115 Posts

Default


Looks like a OTP chip a dip and sst27sf512 would be a better option
The following users liked this post:
dldavis (08-02-2023)
Old 08-02-2023, 12:06 PM
  #13  
dldavis
Heel & Toe
Thread Starter
 
dldavis's Avatar
 
Member Since: Jun 2023
Location: Broken Arrow, Ok
Posts: 19
Received 3 Likes on 2 Posts
Default

Great, thanks

Get notified of new replies

To ProtoType MemCal BUA 9340, 86 Vette, ScanID 9701, ResNet 16055375 and 16055376




Quick Reply: ProtoType MemCal BUA 9340, 86 Vette, ScanID 9701, ResNet 16055375 and 16055376



All times are GMT -4. The time now is 06:01 PM.