Ducati.ms - The Ultimate Ducati Forum banner
  • Hey Everyone! Enter your bike HERE to be a part of this months Bike of the Month Challenge!

1 - 3 of 3 Posts

·
Registered
Joined
·
23 Posts
Discussion Starter · #1 ·
I really want to know where the lines of software that connect input pins and output pins are written.
can you help me?

The type of ECU isn't important, I just want to understand :wink2:

Thanks
 

·
Registered
Joined
·
88 Posts
Hi,

When you ask "...where the lines of software that connect input pins and output pins are written.", do you mean a) by whom/which company or b) where in the code the sub which handles the outside connections is located?

If b) the answer is that there is no mandatory place for the subs. The CPU used in the MCU uses ports for outside connections, the subs handling this can be located anywhere. The actual location is rather a decision made by the assembler.

Here's an example from a 5AM BIN. The sub does a check of the battery voltage using channel 49 of the ADC, dependent on whether the starter switch is actuated or not. So the pins used would be the voltage line and the starter input line.

ROM:0002B982 CheckVoltageADC_sub_2B982: ; CODE XREF: sub_2B55EP
ROM:0002B982 ; CheckVoltage_sub_2B94C+30P
ROM:0002B982 mov [-r0], r8
ROM:0002B984 mov r12, #49 ; Channel 49 (Battery)
ROM:0002B988 calls 1, adc_read_sub_18954 ; 10-bit value returned in R4
ROM:0002B988 ;
ROM:0002B98C mov batt_volt_raw_word_C6FE, r4 ; ADC index 49 raw value
ROM:0002B990 mov r8, Starter_state_C786 ; ;
ROM:0002B994 cmp r8, #3
ROM:0002B996 jmpr cc_Z, loc_2B99E ; if Starter_state = 3
ROM:0002B998 movb rl1, starter_op_flag_C78D ; 0 = starter relay not operated
ROM:0002B998 ; 1 = starter relay operated
ROM:0002B99C jmpr cc_Z, starter_active_2B9C0 ; if starter relay not operated


Cheers
Meinolf
 

·
Registered
Joined
·
23 Posts
Discussion Starter · #3 ·
Thanks for the answer, I was afraid I had asked a wrong question. :frown2:
So there is no real register where you can read the commands?
if I wanted, for example, to control a light that comes on when the air pressure reaches a setpoint, could it be done?
 
1 - 3 of 3 Posts
Top