One section of code that was trouble, now think I understand it (?)
In the late cars (96/7) there is an additional chip in the knock section. I have long struggled to understand the function. There was a connection from TPU pin 11 through the ribbon that drives an inverter made up from transistors&resistors. WHY? To start with, it seems like the chip is likely a pre-amp and/or perhaps an analog switch. Since it has a VCC of 10v, a regular inverter won't work. They used a transistor and three resistors to both level shift and invert. The updated schematic I posted the other day shows this.
I have been looking at the knock filter code for a bit and speculated (with myself) that a curious section might be involved with this line. Here is that code...
Code:
9438 12 4E 02 0B BRSET @$4E,$02,$9447 ; TOGGLE
943C 14 4E 02 BSET @$4E,$02 ;
943F CC 00 00 LDD #$0000 ;
9442 FD 14 CE STD $14CE ; TIO SHARED RAM
9445 20 09 BRA $9450 ;
9447 5F CLRB ;
9448 86 40 LDAA #$40 ;
944A FD 14 CE STD $14CE ; TIO SHARED RAM
944D 15 4E 02 BCLR @$4E,$02 ;
9450 39 RTS ;
I wrote more code to test and TPU pin 11 is controlled by $14CE BIT 14. It is this bit that is input to the inverter and sets the level of the pre-amp input (pin 9).
I believe that where two knock sensors are used this code is used to toggle between the sensors. The @$4E,$02 branch just toggles back and forth each time it is called. The $14CE location of the TPU seems to have no other function.
The pre-amp/switch just connects a different input to the knock filter when the line is changed.
-Tom
Bookmarks