× 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

Changes

Jump to: navigation, search

Secondary Serial IO interface

611 bytes added, 3 years ago
Read external analog data
TPS (Raw 0-255)
== 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.
[[File:Canbus_input_configCanbus_input_config_new.jpg|800px|center|]]
You then set the input parameter groupSource 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 and ,input parameter number of bytes according to the sensor being accessed.
Once enabled and configured Speeduino will periodically poll for that device on Serial3
The IO on Serial3 follows a similar protocol format Using Example 1 this is how to get your remote device to reply to that of J1939 , this makes looking up a sensors configuration details quite straight forwardthe request from Speeduino for data.
Example 1:
Sensor type : Engine oil Temperature
parameter group = 65262
start byte = 1
number of bytes = 1
Example 2: sensor type : Engine oil pressure parameter group = 65263 start byte = 4 number of bytes = 1 Example 3: sensor type : Exhaust temperture port 1 parameter group IF the remote device is connected directly to Serial3.== 65187 start byte = 1 number of bytes = 2Speeduino will send an "R"
Example 4: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). sensor type : Exhaust temperature As your remote device is connected directly to the Serial3 port 3 parameter group = 65263 start byte = 5 number of bytes = 2then you can ignore the Can Address.
 Using Example 1 this is how to get your ===If the remote device to reply to the request from Speeduino for datais connected via CANBUS.===Speeduino will send issue an "R"  Followed by request for the Can address selected for the device parameter group number(this is sent in two bytes LSB first)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 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
125
edits

Navigation menu