× You're looking at the old version of the wiki! As of January 2020, all pages have been migrated to the new site at: http://wiki.speeduino.com

Difference between revisions of "Secondary Serial IO interface"

From Speeduino
Jump to: navigation, search
(Created page with "== Overview == The Arduino Mega2560 version of Speeduino supports the use of Serial3 for supplemetry IO.The proposed STM32 and Teensy3.5 versions use Serial2 . On a Mega 2560...")
 
(Enable Secondary IO interface)
 
(10 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
== Settings ==
 
== Settings ==
  
* '''Enable Secondary IO interface''' - To enable use of the Secondary io interface it must be enabled in TunerStudio.
+
=== Enable Secondary IO interface ===
[[File:Ts_serial3.jpg|200px|center|]]
+
To enable use of the Secondary io interface it must be enabled in TunerStudio.
 +
 
 +
Dependant on if CAN_COMMANDS have been enabled will vary the type of dropdown menu you will see
 +
 
 +
[[File:Auxindrop_nocan.jpg|center|200px|frame|With CAN_COMMANDS disabled]]
 +
[[File:Auxindrop_withcan.jpg|center|200px|thumb|With CAN_COMMANDS enabled]]
 +
 
 +
select option "Secondary Serial IO Interface" or "CanBus/Secondary Serial IO Interface" as appropriate.
 +
 
 +
=== Secondary IO Configuration Options ===
 +
 
 +
Again dependant on if CAN_COMMANDS have been enabled will vary what options you have to enable Secondary serial.
 +
 
 +
[[File:EnableSecondarySerial_nocan.jpg|center|400px|thumb|With CAN_COMMANDS disabled]]
 +
[[File:EnableSecondarySerial_withcan.jpg|700px|center|thumb|With CAN_COMMANDS enabled]]
 +
 
 +
 
 +
* '''Enable options'''
 +
* 1. Disabled
 +
* 2. Enabled Secondary IO via Serial port
 +
* 3. Enabled Secondary IO via canbus (this option will only be available when CAN_COMMANDS are enabled
  
This will open a new window where you can switch Serial3 on and off.
 
[[File:Serial3_interface_enable.png|400px|center|]]
 
 
== How to use it ==
 
== How to use it ==
  
There is two things that the Secondary io interface is capable of  
+
Depending on if the secondary port is a simple serial port or is a canbus port there are several things that the Secondary io interface is capable of.
* 1. Broadcast the current realtime data just as is sent to TunerStudio.
+
* 1. Retreive the current realtime data in full from Speeduino just as is sent to TunerStudio.
* 2. Read in the Analog data values from 8 remote sensors.
+
* 2. Retrieve specific current realtime data from Speeduino.
 +
* 2. Read in the Analog data values from 16 remote sensors as requested by Speeduino.
 +
* 3. Acivate External Outputs(coming soon!)
  
== Broadcast realtime data ==
+
== Retrieve realtime data ==
  
To get Speeduino to send out the realtime data to your device connected on Serial3 you must send a "A" to it.
+
To get Speeduino to send out the realtime data to your device connected on a Secondary Serial IO port you must send either an "A" or an "r" to it.
It will reply with ,
+
 
 +
* '''Send an "A"'''
 +
If you send an "A" to the port it will reply with ,
  
 
"A" confirming the received instruction (sent as 0x41 in hex),
 
"A" confirming the received instruction (sent as 0x41 in hex),
  
It will now transmit a single byte in hex  ,this is the number of bytes it is about to send .This is currently 0x39 (57 in decimal).
 
  
It will then transmit the realtime data.
+
The port will then transmit ALL the realtime data.
 +
 
 +
* '''Send an "r"'''
 +
if you send an "r" to the port you must also send 6 further bytes immediately after the "r". These are the Speeduino TS canID, the r type command 0x30(48 in decimal), a 2 byte offset and a 2 byte length. the offset is the position in he realtime list you want the data returned to start from and the 2 byte length is the number of bytes you want returned. the bytes are sent LSB first .
 +
 +
The port will reply with ,
 +
 
 +
"r" confirming the received instruction (send as 0x72 in hex) ,
 +
 
 +
The port will now transmit a single byte in hex  ,this is the value of the "r" type command, confirming what was requested (this is typically 0x30).
 +
 
 +
The port will then transmit the realtime data requested starting at the byte position sent for the number of bytes length.
 +
 
 +
 
 +
* ''' The Realtime Data List'''
 +
As of 05/10/2017 the data list is as follows
 +
 
 +
BIT
 +
0  - currentStatus.secl
 +
      secl is simply a counter that increments each second
 +
 
 +
1  - currentStatus.squirt
 +
      Squirt Bitfield
 +
 
 +
2  - currentStatus.engine
 +
      Engine Status Bitfield
 +
 
 +
3  - (byte)(divu100(currentStatus.dwell))
 +
      Dwell in ms * 10
 +
 
 +
4  - lowByte(currentStatus.MAP)
 +
 
 +
5  - highByte(currentStatus.MAP)
 +
 
 +
6  - (byte)(currentStatus.IAT + CALIBRATION_TEMPERATURE_OFFSET)     
 +
      mat
 +
 
 +
7  - (byte)(currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) 
 +
      Coolant ADC
 +
 
 +
8  - currentStatus.batCorrection   
 +
      Battery voltage correction (%)
 +
 
 +
9  - currentStatus.battery10                                         
 +
      battery voltage
 +
 
 +
10 - currentStatus.O2;                                               
 +
      primary O2
  
As of 02/05/2017 the data list is as follows
+
11 - currentStatus.egoCorrection                                   
 +
      Exhaust gas correction (%)
 +
 
 +
12 - currentStatus.iatCorrection                                   
 +
      Air temperature Correction (%)
 +
 
 +
13 - currentStatus.wueCorrection                                   
 +
      Warmup enrichment (%)
 +
 
 +
14 - lowByte(currentStatus.RPM)                                     
 +
    rpm LB
 +
 
 +
15 - highByte(currentStatus.RPM)                                   
 +
      rpm HB
 +
 
 +
16 - currentStatus.TAEamount                                       
 +
      acceleration enrichment (%)
  
0 - currentStatus.secl
 
    secl is simply a counter that increments each second
 
1 - currentStatus.squirt
 
    Squirt Bitfield
 
2 - currentStatus.engine
 
    Engine Status Bitfield
 
3 - (byte)(divu100(currentStatus.dwell))
 
    Dwell in ms * 10
 
4 - (byte)(currentStatus.MAP >> 1)
 
    map value is divided by 2
 
5 - (byte)(currentStatus.IAT + CALIBRATION_TEMPERATURE_OFFSET)     
 
    mat
 
6 - (byte)(currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) 
 
    Coolant ADC
 
7 - currentStatus.tpsADC                                           
 
    TPS (Raw 0-255)
 
8 - currentStatus.battery10                                         
 
    battery voltage
 
9 - currentStatus.O2;                                               
 
    primary O2
 
10 - currentStatus.egoCorrection                                   
 
    Exhaust gas correction (%)
 
11 - currentStatus.iatCorrection                                   
 
    Air temperature Correction (%)
 
12 - currentStatus.wueCorrection                                   
 
    Warmup enrichment (%)
 
13 - lowByte(currentStatus.RPM)                                     
 
    rpm LB
 
14 - highByte(currentStatus.RPM)                                   
 
    rpm HB
 
15 - currentStatus.TAEamount                                       
 
    acceleration enrichment (%)
 
16 - currentStatus.baro                                             
 
    Barometer value
 
 
17 - currentStatus.corrections                                       
 
17 - currentStatus.corrections                                       
    Total GammaE (%)
+
      Total GammaE (%)
 +
 
 
18 - currentStatus.VE                                                 
 
18 - currentStatus.VE                                                 
    Current VE 1 (%)
+
      Current VE 1 (%)
 +
 
 
19 - currentStatus.afrTarget
 
19 - currentStatus.afrTarget
    chosen afr target
+
      chosen afr target
20 - (byte)(currentStatus.PW1 / 100)                                
+
 
    Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS
+
20 - lowByte(currentStatus.PW1);
21 - currentStatus.tpsDOT                                             
+
      Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.
    TPS DOT
+
 
22 - currentStatus.advance     
+
21 - highByte(currentStatus.PW1);
    Current spark advance
+
      Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.
23 - currentStatus.TPS                                               
+
 
    TPS (0% to 100%)
+
22 - currentStatus.tpsDOT                                             
24 - lowByte(currentStatus.loopsPerSecond)
+
      TPS DOT
    loops per second LB
+
 
25 - highByte(currentStatus.loopsPerSecond)
+
23 - currentStatus.advance     
    loops per second HB
+
      Current spark advance
26 - lowByte(currentStatus.freeRAM)
+
 
    freeRam LB
+
24 - currentStatus.TPS                                               
27 - highByte(currentStatus.freeRAM)
+
      TPS (0% to 100%)
    freeRam HB
+
 
28 = currentStatus.batCorrection   
+
25 - lowByte(currentStatus.loopsPerSecond)
    Battery voltage correction (%)<br />
+
      loops per second LB
29 = currentStatus.spark                                             
+
 
    Spark related bitfield
+
26 - highByte(currentStatus.loopsPerSecond)
30 = currentStatus.O2_2                                             
+
      loops per second HB
    Second O2
+
 
31 = lowByte(currentStatus.rpmDOT)                                   
+
27 - lowByte(currentStatus.freeRAM)
    rpmDOT must be sent as a signed integer
+
      freeRam LB
32 = highByte(currentStatus.rpmDOT)
+
 
    rpmDOT HB
+
28 - highByte(currentStatus.freeRAM)
33 = currentStatus.ethanolPct                                         
+
      freeRam HB
    Flex sensor value (or 0 if not used)
+
 
34 = currentStatus.flexCorrection                                     
+
29 - currentStatus.boostTarget
    Flex fuel correction (% above or below 100)
+
      Target boost pressure
35 = currentStatus.flexIgnCorrection                                 
+
 
    Ignition correction (Increased degrees of advance) for flex fuel
+
30 - currentStatus.boostDuty
36 = getNextError()
+
      current pwm boost dutycycle
    Error codes
+
 
37 = currentStatus.boostTarget
+
31 - currentStatus.spark                                             
    Target boost pressure
+
      Spark related bitfield
38 = currentStatus.boostDuty
+
 
    current pwm boost dutycycle
+
32 - lowByte(currentStatus.rpmDOT)                                   
39 = currentStatus.idleLoad
+
      rpmDOT must be sent as a signed integer
    idleload
+
 
40 = currentStatus.testOutputs
+
33 - highByte(currentStatus.rpmDOT)
    testoutputs bitfield
+
      rpmDOT HB
41 = lowByte(currentStatus.canin[0])
+
 
    Can input 0 LB   
+
34 - currentStatus.ethanolPct                                         
42 = highByte(currentStatus.canin[0])
+
      Flex sensor value (or 0 if not used)
    Can input 0 HB
+
 
43 = lowByte(currentStatus.canin[1])
+
35 - currentStatus.flexCorrection                                     
    Can input 1 LB
+
      Flex fuel correction (% above or below 100)
44 = highByte(currentStatus.canin[1])
+
 
    Can input 1 HB
+
36 - currentStatus.flexIgnCorrection                                 
45 = lowByte(currentStatus.canin[2])
+
      Ignition correction (Increased degrees of advance) for flex fuel
    Can input 2 LB
+
 
46 = highByte(currentStatus.canin[2])
+
37 - currentStatus.idleLoad
    Can input 2 HB
+
      idleload
47 = lowByte(currentStatus.canin[3])
+
 
    Can input 3 LB
+
38 - currentStatus.testOutputs
48 = highByte(currentStatus.canin[3])
+
      testoutputs bitfield
    Can input 3 HB
+
 
49 = lowByte(currentStatus.canin[4])
+
39 - currentStatus.O2_2                                             
    Can input 4 LB
+
      Second O2
50 = highByte(currentStatus.canin[4])
+
 
    Can input 4 HB
+
40 - currentStatus.baro                                             
51 = lowByte(currentStatus.canin[5])
+
      Barometer value
    Can input 5 LB
+
 
52 = highByte(currentStatus.canin[5])
+
41 - lowByte(currentStatus.canin[0]);
    Can input 5 HB
+
 
53 = lowByte(currentStatus.canin[6])
+
42 - highByte(currentStatus.canin[0]);
    Can input 6 LB
+
 
54 = highByte(currentStatus.canin[6])
+
43 - lowByte(currentStatus.canin[1]);
    Can input 6 HB
+
 
55 = lowByte(currentStatus.canin[7])
+
44 - highByte(currentStatus.canin[1]);
    Can input 7 LB
+
 
56 = highByte(currentStatus.canin[7])
+
45 - lowByte(currentStatus.canin[2]);
    Can input 7 HB
+
 
 +
46 - highByte(currentStatus.canin[2]);
 +
 
 +
47 - lowByte(currentStatus.canin[3]);
 +
 
 +
48 - highByte(currentStatus.canin[3]);
 +
 
 +
49 - lowByte(currentStatus.canin[4]);
 +
 
 +
50 - highByte(currentStatus.canin[4]);
 +
 
 +
51 - lowByte(currentStatus.canin[5]);
 +
 
 +
52 - highByte(currentStatus.canin[5]);
 +
 
 +
53 - lowByte(currentStatus.canin[6]);
 +
 
 +
54 - highByte(currentStatus.canin[6]);
 +
 
 +
55 - lowByte(currentStatus.canin[7]);
 +
 
 +
56 - highByte(currentStatus.canin[7]);
 +
 
 +
57 - lowByte(currentStatus.canin[8]);
 +
 
 +
58 - highByte(currentStatus.canin[8]);
 +
 
 +
59 - lowByte(currentStatus.canin[9]);
 +
 
 +
60 - highByte(currentStatus.canin[9]);
 +
 
 +
61 - lowByte(currentStatus.canin[10]);
 +
 
 +
62 - highByte(currentStatus.canin[10]);
 +
 
 +
63 - lowByte(currentStatus.canin[11]);
 +
 
 +
64 - highByte(currentStatus.canin[11]);
 +
 
 +
65 - lowByte(currentStatus.canin[12]);
 +
 
 +
66 - highByte(currentStatus.canin[12]);
 +
 
 +
67 - lowByte(currentStatus.canin[13]);
  
 +
68 - highByte(currentStatus.canin[13]);
  
== Read external analog data ==
+
69 - lowByte(currentStatus.canin[14]);
To get Speeduino to read analog data over Serial3 you must enable it. this is done in TS on an per channel basis.
 
  
[[File:Canbus_input_config.jpg|800px|center|]]
+
70 - highByte(currentStatus.canin[14]);
  
You then set the input parameter group,input start byte number and input parameter number of bytes according to the sensor being accessed.
+
71 - lowByte(currentStatus.canin[15]);
Once enabled and configured Speeduino will periodically poll for that device on Serial3
 
  
The IO on Serial3 follows a similar protocol format to that of J1939 , this makes looking up a sensors configuration details quite straight forward.
+
72 - highByte(currentStatus.canin[15]);
  
Example 1:
+
73 - currentStatus.tpsADC                                           
  Sensor type : Engine oil Temperature
+
      TPS (Raw 0-255)
  parameter group = 65262
 
  start byte = 1
 
  number of bytes = 1
 
  
Example 2:
+
74 - getNextError()
  sensor type : Engine oil pressure
+
      Error codes
  parameter group = 65263
 
  start byte = 4
 
  number of bytes = 1
 
  
Example 3:
 
  sensor type : Exhaust temperture port 1
 
  parameter group = 65187
 
  start byte = 1
 
  number of bytes = 2
 
  
Example 4:
+
== Read external analog data from a remote device ==
  sensor type : Exhaust temperature port 3
+
To get Speeduino to read analog data over Serial3 or CANBUS you must enable it. this is done in TS on an per channel basis.
  parameter group = 65263
 
  start byte = 5
 
  number of bytes = 2
 
  
 +
[[File:Canbus_input_config_new.jpg|800px|center|]]
 +
 +
You set the Source Can address(this is the address of the remote device that you wish to source the data value from.This is not used in direct Serial3 connections), input start byte number,input parameter number of bytes according to the sensor being accessed.
 +
Once enabled and configured Speeduino will periodically poll for that device on Serial3
  
 
Using Example 1 this is how to get your remote device to reply to the request from Speeduino for data.
 
Using Example 1 this is how to get your remote device to reply to the request from Speeduino for data.
  
 +
 +
===IF the remote device is connected directly to Serial3.===
 
Speeduino will send an "R"  
 
Speeduino will send an "R"  
  
Followed by the device parameter group number(this is sent in two bytes LSB first)
+
Followed by the Can input channel that the data will be placed into , and then the Can address the data is to be sourced from(this is sent in two bytes LSB first).
 +
As your remote device is connected directly to the Serial3 port then you can ignore the Can Address.
 +
 
 +
===If the remote device is connected via CANBUS.===
 +
Speeduino will issue an "R" request for the Can address selected for the Can input channel.
  
  
 
Speeduino will now await the response.
 
Speeduino will now await the response.
  
 +
===IF the remote device is connected directly to Serial3.===
 
You must first send an "G" ,
 
You must first send an "G" ,
 +
Then a '1' to flag the cmd is valid,
 +
Then the Can input channel (this is the channel number that Speeduino issued with the request.
 +
Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .
 +
 +
===If the remote device is connected via CANBUS.===
 +
The remote device upon hearing its ID requested will respond to the Speeduino(at the address that was sent in the outgoing packet) with the Can input channel and 8 bytes of data.It is recommended that the Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long, but the data can be placed in any of the data bytes(just ensure that Speeduino is configured to read those bytes in the config table above.
  
Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .
 
  
 
The value sent is readable in Tunerstudio using the CanIN gauges
 
The value sent is readable in Tunerstudio using the CanIN gauges

Latest revision as of 22:14, 27 July 2018

Overview

The Arduino Mega2560 version of Speeduino supports the use of Serial3 for supplemetry IO.The proposed STM32 and Teensy3.5 versions use Serial2 . On a Mega 2560 Serial3 can be found on the board at pins 14 and 15.The connection speed is 115200baud.

Settings

Enable Secondary IO interface

To enable use of the Secondary io interface it must be enabled in TunerStudio.

Dependant on if CAN_COMMANDS have been enabled will vary the type of dropdown menu you will see

With CAN_COMMANDS disabled
With CAN_COMMANDS enabled

select option "Secondary Serial IO Interface" or "CanBus/Secondary Serial IO Interface" as appropriate.

Secondary IO Configuration Options

Again dependant on if CAN_COMMANDS have been enabled will vary what options you have to enable Secondary serial.

With CAN_COMMANDS disabled
With CAN_COMMANDS enabled


  • Enable options
  • 1. Disabled
  • 2. Enabled Secondary IO via Serial port
  • 3. Enabled Secondary IO via canbus (this option will only be available when CAN_COMMANDS are enabled

How to use it

Depending on if the secondary port is a simple serial port or is a canbus port there are several things that the Secondary io interface is capable of.

  • 1. Retreive the current realtime data in full from Speeduino just as is sent to TunerStudio.
  • 2. Retrieve specific current realtime data from Speeduino.
  • 2. Read in the Analog data values from 16 remote sensors as requested by Speeduino.
  • 3. Acivate External Outputs(coming soon!)

Retrieve realtime data

To get Speeduino to send out the realtime data to your device connected on a Secondary Serial IO port you must send either an "A" or an "r" to it.

  • Send an "A"

If you send an "A" to the port it will reply with ,

"A" confirming the received instruction (sent as 0x41 in hex),


The port will then transmit ALL the realtime data.

  • Send an "r"

if you send an "r" to the port you must also send 6 further bytes immediately after the "r". These are the Speeduino TS canID, the r type command 0x30(48 in decimal), a 2 byte offset and a 2 byte length. the offset is the position in he realtime list you want the data returned to start from and the 2 byte length is the number of bytes you want returned. the bytes are sent LSB first .

The port will reply with ,

"r" confirming the received instruction (send as 0x72 in hex) ,

The port will now transmit a single byte in hex ,this is the value of the "r" type command, confirming what was requested (this is typically 0x30).

The port will then transmit the realtime data requested starting at the byte position sent for the number of bytes length.


  • The Realtime Data List

As of 05/10/2017 the data list is as follows

BIT 0 - currentStatus.secl

     secl is simply a counter that increments each second

1 - currentStatus.squirt

     Squirt Bitfield

2 - currentStatus.engine

     Engine Status Bitfield

3 - (byte)(divu100(currentStatus.dwell))

     Dwell in ms * 10

4 - lowByte(currentStatus.MAP)

5 - highByte(currentStatus.MAP)

6 - (byte)(currentStatus.IAT + CALIBRATION_TEMPERATURE_OFFSET)

     mat

7 - (byte)(currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET)

     Coolant ADC

8 - currentStatus.batCorrection

     Battery voltage correction (%)

9 - currentStatus.battery10

     battery voltage

10 - currentStatus.O2;

     primary O2

11 - currentStatus.egoCorrection

     Exhaust gas correction (%)

12 - currentStatus.iatCorrection

     Air temperature Correction (%)

13 - currentStatus.wueCorrection

     Warmup enrichment (%)

14 - lowByte(currentStatus.RPM)

    rpm LB

15 - highByte(currentStatus.RPM)

     rpm HB

16 - currentStatus.TAEamount

     acceleration enrichment (%)

17 - currentStatus.corrections

     Total GammaE (%)

18 - currentStatus.VE

     Current VE 1 (%)

19 - currentStatus.afrTarget

     chosen afr target

20 - lowByte(currentStatus.PW1);

     Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.

21 - highByte(currentStatus.PW1);

     Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.

22 - currentStatus.tpsDOT

     TPS DOT

23 - currentStatus.advance

     Current spark advance

24 - currentStatus.TPS

     TPS (0% to 100%)

25 - lowByte(currentStatus.loopsPerSecond)

     loops per second LB

26 - highByte(currentStatus.loopsPerSecond)

     loops per second HB

27 - lowByte(currentStatus.freeRAM)

     freeRam LB

28 - highByte(currentStatus.freeRAM)

     freeRam HB

29 - currentStatus.boostTarget

     Target boost pressure

30 - currentStatus.boostDuty

     current pwm boost dutycycle

31 - currentStatus.spark

     Spark related bitfield

32 - lowByte(currentStatus.rpmDOT)

     rpmDOT must be sent as a signed integer

33 - highByte(currentStatus.rpmDOT)

     rpmDOT HB

34 - currentStatus.ethanolPct

     Flex sensor value (or 0 if not used)

35 - currentStatus.flexCorrection

     Flex fuel correction (% above or below 100)

36 - currentStatus.flexIgnCorrection

     Ignition correction (Increased degrees of advance) for flex fuel

37 - currentStatus.idleLoad

     idleload

38 - currentStatus.testOutputs

     testoutputs bitfield

39 - currentStatus.O2_2

     Second O2

40 - currentStatus.baro

     Barometer value

41 - lowByte(currentStatus.canin[0]);

42 - highByte(currentStatus.canin[0]);

43 - lowByte(currentStatus.canin[1]);

44 - highByte(currentStatus.canin[1]);

45 - lowByte(currentStatus.canin[2]);

46 - highByte(currentStatus.canin[2]);

47 - lowByte(currentStatus.canin[3]);

48 - highByte(currentStatus.canin[3]);

49 - lowByte(currentStatus.canin[4]);

50 - highByte(currentStatus.canin[4]);

51 - lowByte(currentStatus.canin[5]);

52 - highByte(currentStatus.canin[5]);

53 - lowByte(currentStatus.canin[6]);

54 - highByte(currentStatus.canin[6]);

55 - lowByte(currentStatus.canin[7]);

56 - highByte(currentStatus.canin[7]);

57 - lowByte(currentStatus.canin[8]);

58 - highByte(currentStatus.canin[8]);

59 - lowByte(currentStatus.canin[9]);

60 - highByte(currentStatus.canin[9]);

61 - lowByte(currentStatus.canin[10]);

62 - highByte(currentStatus.canin[10]);

63 - lowByte(currentStatus.canin[11]);

64 - highByte(currentStatus.canin[11]);

65 - lowByte(currentStatus.canin[12]);

66 - highByte(currentStatus.canin[12]);

67 - lowByte(currentStatus.canin[13]);

68 - highByte(currentStatus.canin[13]);

69 - lowByte(currentStatus.canin[14]);

70 - highByte(currentStatus.canin[14]);

71 - lowByte(currentStatus.canin[15]);

72 - highByte(currentStatus.canin[15]);

73 - currentStatus.tpsADC

     TPS (Raw 0-255)

74 - getNextError()

     Error codes


Read external analog data from a remote device

To get Speeduino to read analog data over Serial3 or CANBUS you must enable it. this is done in TS on an per channel basis.

Canbus input config new.jpg

You set the Source Can address(this is the address of the remote device that you wish to source the data value from.This is not used in direct Serial3 connections), input start byte number,input parameter number of bytes according to the sensor being accessed. Once enabled and configured Speeduino will periodically poll for that device on Serial3

Using Example 1 this is how to get your remote device to reply to the request from Speeduino for data.


IF the remote device is connected directly to Serial3.

Speeduino will send an "R"

Followed by the Can input channel that the data will be placed into , and then the Can address the data is to be sourced from(this is sent in two bytes LSB first). As your remote device is connected directly to the Serial3 port then you can ignore the Can Address.

If the remote device is connected via CANBUS.

Speeduino will issue an "R" request for the Can address selected for the Can input channel.


Speeduino will now await the response.

IF the remote device is connected directly to Serial3.

You must first send an "G" , Then a '1' to flag the cmd is valid, Then the Can input channel (this is the channel number that Speeduino issued with the request. Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .

If the remote device is connected via CANBUS.

The remote device upon hearing its ID requested will respond to the Speeduino(at the address that was sent in the outgoing packet) with the Can input channel and 8 bytes of data.It is recommended that the Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long, but the data can be placed in any of the data bytes(just ensure that Speeduino is configured to read those bytes in the config table above.


The value sent is readable in Tunerstudio using the CanIN gauges