Ports Input & Output
Ports
Output
P1DR
Bits 0,1 -> ISC
Bit 3 -> EGR
Bit 5 -> Unused on DSM
P2DR
Bit 0 -> Front O2 Heater
Bit 1 -> Rear O2 Heater
Bit 2 -> Front O2 Heater(Secondary) Unused on DSM
Bit 3 -> Rear O2 Heater(Secondary) Unused on DSM
PADR
Bit 1 -> WasteGate Solenoid
Bit 2 -> Purge Solenoid
Notes
An Ad-Hoc system is used for PWM output.
A 0 to 48 counter is used, with Port bits switched on or off depending on the counter.
48 would equal 100% DC, 24 = 50% DC, 12 = 25% DC, 0 = 0% DC.
Input
PBDR
Bits 0,1,2,3,4 -> Multiplexed Binary Input bits
Notes
PBDR Bits 0-4 are used for binary input
PCDR Bits 0 and 1 control a multiplexer, that switch four different 5-bit inputs to PBDR.
These four 5-bit groups are loaded to RAM addresses:
F1EA
F1EB
F1EC
F1ED
PWM3
The Boost Gauge, unlike other PWM outputs, use the H8s on board PWM.
The Boost Gauge duty cycle is load to REG PWM3_DTR.