Component: LIN Master (Comms: Interface)

From Flowcode Help
Jump to navigationJump to search
Author MatrixTSL
Version 1.2
Category Comms: Interface


LIN Master component

Low level routines for controlling a LIN master (1.3 & 2.0) interface.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_LinMasterV2.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_LinMasterV2.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Initialise the component 
Fc9-void-icon.png - VOID Return


PowerDown

Fc9-comp-macro.png PowerDown
Power Down the device 
Fc9-void-icon.png - VOID Return


SendMessageRxData

Fc9-comp-macro.png SendMessageRxData
Sends message with specified identifier and awaits a reply from a slave. Returns the number of data bytes received, 254 for a timeout or 255 for a checksum error. 
Fc9-u8-icon.png - BYTE Identifier
6-Bit ID field, Range: 0x00 to 0x3F 
Fc9-u8-icon.png - BYTE ChecksumType
0=Classic (LIN 1.3), 1=Enhanced (LIN 2.0) 
Fc9-u8-icon.png - BYTE ResponseCount
Number of bytes to receive from the slave, Range: 0 to 8 
Fc9-u8-icon.png - BYTE ResponseData
Data array to pass the received data 
Fc9-u8-icon.png - BYTE Return


SendMessageTxData

Fc9-comp-macro.png SendMessageTxData
Sends a message to the slave along with data 
Fc9-u8-icon.png - BYTE Identifier
6-Bit ID field, Range: 0x00 to 0x3F 
Fc9-u8-icon.png - BYTE ChecksumType
0=Classic (LIN 1.3), 1=Enhanced (LIN 2.0) 
Fc9-u8-icon.png - BYTE DataCount
Number of data bytes to transmit to the slave, Range: 0 to 8 
Fc9-u8-icon.png - BYTE Data
Data array to send to the slave 
Fc9-void-icon.png - VOID Return


UpdateBaud

Fc9-comp-macro.png UpdateBaud
Changes the UART Baud rate. 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200, 8=250000 
Fc9-u8-icon.png - BYTE new_baud
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200, 8=250000 
Fc9-void-icon.png - VOID Return


WakeUp

Fc9-comp-macro.png WakeUp
Wake Up the device 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Bus Options
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-type-21-icon.png Receive Timeout
The number of milliseconds to wait for incoming data to be received from the slave. 
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-16-icon.png TX Remap Pin
Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png RX Remap Pin
Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
Fc9-type-5-icon.png CS
LIN bus chip select pin 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png Console Format
Controls if the data is shown as a log with time and date stamps or just as raw data 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel.