Notices
ECU Flash

[Dev/Disassembly] A/D Converter Lookup

Thread Tools
 
Search this Thread
 
Old Dec 28, 2009 | 10:49 PM
  #1  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
[Dev/Disassembly] A/D Converter Lookup

I want to start a more in-depth conversation about the analog channels used by the ECU. I may be wrong on all of this, so please feel free to correct it. Everything seemed to line up pretty well and made sense.

Looking through the hardware manual, I see the A/D converters are referenced as FFFFF800-FFFFF816 and FFFFF820-FFFFF826 and then there are some related control addresses. It looks like the ECU only looks at FFFFF800 for the actual analog to digital conversion. I assume this means that the A/D converter just cycles between each analog multiplex channel and then the result is read out through only one channel? Reading the manual, this seems to correlate with what the manual calls "single mode" conversion?


Sub_A7FC seems to be the sub-routine that handles the majority of the A/D look ups. The routine calls up an A/D channel with a number (0x1 - 0xE) and then lists the RAM address that the data will be written too. There are two other sub-routines (sub_9a2c and sub_9a4a) that reference the sub_B4D6 listed below. There seems to be slight overlap, as sub_9A2C and sub_A7FC both doa look up for ADC07 and ADC09.

Sub_B4D6 is then called. This routine is pretty unclear to me, maybe somebody can better explain it. It references FFFFF72D in multiple locations, which according to the manual is the "Port H Data Register". Is this the analog multiplexer?

sub_B576 or sub_B6A8 gets called, which appears to be the actual A/D converter lookup. I believe the difference between the two subs is what A/D is actually used? The processor seems to have 2 A/D converters, not sure why? A/D0 handles multiplex channels 1-12 and A/D1 handles multiplex channels 13-16. The value from here appears to be written to the RAM addresses from sub_A7FC.

Going through Sub-A7FC and looking at the RAM address/MUT table, I put together a short list of raw data channels. All of the raw data from the A/D channels can be accessed through the stock MUT table.



If this is correct, than we have channels 4 (with SD Patch and Baro locked), 7, 8, 10 (with mrfred Rear O2 patch), 11 (MAP sensor typically used), 12, 13, 14 (or 3 if used for MAT on SD) available for logging purposes. At least, on the chip. It would be interesting to open up an ECU and see if anything is hooked to some of these pins.
Attached Thumbnails [Dev/Disassembly] A/D Converter Lookup-adc-channels.jpg  

Last edited by 03whitegsr; Dec 28, 2009 at 11:27 PM.
Reply
Old Dec 29, 2009 | 12:42 PM
  #2  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
Sorry if the topic seems oddly placed or overly simple. I spent several hours last night trying to figure this out and was stoked to get it to some extent. Anyway, I started the thread because I wanted to get some additional data logging capabilities.

It looks like most of the inputs are available at the ECU connector.
Fuel Tank Level - Pin 46
Fuel Tank Pressure - Pin 61
Intake Air Temp - Pin 72
Manifold Differential Pressure - Pin 73
Sub Fuel Level - Pin 74 (ADC_15???)
Fuel Temperature Sensor - Pin 77
Barometric Pressure - Pin 85

The last two are for what appears to be bank 2 O2 sensors. I've seen it mentioned a few times that the code in the ECU is likely carried over between models. Is there a Mitsubishi that has a V6 and uses the same ECU connector layout and the SH7052 processor?
Reply
Old Dec 29, 2009 | 02:09 PM
  #3  
Ceddy's Avatar
Evolving Member
 
Joined: Apr 2008
Posts: 265
Likes: 1
From: Reading, PA
There are multiple ADC Lookup routines because some sensors need to be updated more often.

The big ADC routine is called in the Main Loop, ~100 times/sec.

The smaller routine is called by the CAS routine, 4 times per revolution. (Gives higher resolution at higher RPMs)


All the 4-cylinder Mitsu ecu code is kinda 6-cylinder capable. There is code remnants for the extra two O2 sensors, and other miscellaneous stuff. I think late model Eclipses have the same plug lay out and are V6.


Edit:

If you need binary inputs(on/off), there are a few that are normally used by a Automatic Transmission, that you can use.

For Evo5/6 the ADC sensor layout is here -> http://ceddy.us/?page_id=203

Last edited by Ceddy; Dec 29, 2009 at 02:17 PM.
Reply
Old Dec 29, 2009 | 03:26 PM
  #4  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
Is there an external processor system that controls the knock sensor?

I've always heard the knock sensor looks not only at amplitude of the knock signal but also phase with respect to the crank position and the frequency of the signal.

It doesn't seem like the ADC would really have the capability to pull all that off while sampling the other channels and I'm just wondering if the knock channel is just a voltage from an external processor that is a function of the other information? It seems like the transfer could all be done digitally though too if there was another processor?
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
mrfred
ECU Flash
496
Sep 14, 2022 07:08 PM
mrfred
ECU Flash
441
Aug 1, 2022 06:05 AM
logic
ECU Flash
78
Nov 8, 2018 04:17 AM
CDrinkH2O
ECU Flash
1
Jul 19, 2014 01:18 PM
acamus
ECU Flash
22
Dec 14, 2012 10:34 PM




All times are GMT -7. The time now is 06:08 AM.