Ctn wrote:Has anyone found an address for the knock sensor for the 7790?
I've been working on the S13 SR code base for a while now and decided to go after this. The raw knock voltage appears to come in as a 16-bit value in 4212. I found a block of code where the 8 ADC's are loaded into sequential (16-bit) registers starting at 4204. Then, I removed the 7790 chip and started back probing the PCB. According to Calum's Memory.txt file, 4204 should be the MAF sensor. Sure enough, the first ADC went to the MAF sensor pin. From there I found that knock goes to the last ADC.
Just so you know, a there is a significant amount of analog filtering and conditioning on the knock signal. See all those SOIC-16 packages and weird resistor packs? From what I can tell, that's nearly all knock related.
I watched 4212 and 4213 in NDS and it appears to be knock related. I was getting MSB's of 01 and 02 during idle and cruise with 03 readings under boost at 8psi. I really need to patch the consult stream and log it as I really can't be staring into the passenger seat when I'm running high boost, where the chances of knocking are greater.
There is a nice block of code following a write to 4212 which I can only assume is the knock count generation. It also appears to be using a block of lookup tables. I'm assuming that maps knock counts to degrees of timing retard. I'm familiar with java and C++, but I'm super slow at reading through assembly. I just need to spend more time with this. I was actually hoping that someone could take this info and figure something out!
For completeness, here's the rest of the raw ADC registers on a E5 SR20DET ECU. This should be the same on B13/S13KA stuff.
4204 = MAF
4206 = Coolant
4208 = Battery
420A = O2
420C = TPS
420E = Rear Pot (diagnostics)
4210 = grounded at the chip
4212 = knock sensor
-Chris @ RS Enthalpy