Component: LIN Slave (Comms: Interface)

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


LIN Slave component

Low level routines for controlling the LIN bus (1.3 / 2.0) slave interface.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Initialises the device ready for communications from the master. Puts the bus into the Wake state driving the CS pin high. 
Fc9-void-icon.png - VOID Return


ListenForMessages

Fc9-comp-macro.png ListenForMessages
Listens for messages with Timeout and returns the state. Returns 255 for timeout, 254 for CRC error and 0 for none matching ID received. Returns 1-8 for a valid ID received. 
Fc9-u8-icon.png - BYTE Timeout
timeout in milliseconds to wait for incoming message, 255=Wait Forever 
Fc9-u8-icon.png - BYTE Return


PowerDown

Fc9-comp-macro.png PowerDown
Puts the bus into the Powered Down state driving the CS pin low. 
Fc9-void-icon.png - VOID Return


ReadData

Fc9-comp-macro.png ReadData
Get the Message data automatically received from a specific message as part of the ListenForMessages macro. 
Fc9-u8-icon.png - BYTE Message
Message index to be read. Range: 1 - Num Messages 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


ReadDataCount

Fc9-comp-macro.png ReadDataCount
Return the data count size for Message 
Fc9-u8-icon.png - BYTE Message
Range: 1 - Num Messages 
Fc9-u8-icon.png - BYTE Return


SetData

Fc9-comp-macro.png SetData
Set the Message data to be automatically sent for a specific message as part of the ListenForMessages macro. 
Fc9-u8-icon.png - BYTE Message
Message index to write. Range: 1 - Num Messages 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


WakeUp

Fc9-comp-macro.png WakeUp
Puts the bus into the Wake state driving the CS pin high. 
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-16-icon.png Messages
Number of messages the firmware is designed to listen for 
Fc9-type-16-icon.png Checksum Type
 
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-5-icon.png CS pin
LIN bus chip select pin  
Fc9-conn-icon.png MESSAGE1
Fc9-type-14-icon.png ID
Message identifier to listen for 
Fc9-type-16-icon.png BYTES
Number of bytes to expent in the packet 
Fc9-type-16-icon.png TX_RX
Data direction for packet 
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.