Difference between revisions of "Component: CAN (CAL) (Misc)"

From Flowcode Help
Jump to navigationJump to search
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 2.4 |- | width="20%" style="color:gray...")
 
 
(6 intermediate revisions by one other user not shown)
Line 14: Line 14:
 
==CAN component==
 
==CAN component==
 
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.
 
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_CAN.fcfx FC_Comp_Source_CAN.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_CAN.fcfx FC_Comp_Source_CAN.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 25: Line 47:
 
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].
 
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].
  
 +
==Macro reference==
  
==Downloadable macro reference==
+
===CheckRx===
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdentStd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckRx'''
 
|-
 
|-
| colspan="2" | Sets the ID to send along with the data in the next CAN message  
+
| colspan="2" | Checks to see if any messages are available for 'Buffer' specified  
 
|-
 
|-
 
|-
 
|-
Line 39: Line 61:
 
| width="90%" | Buffer
 
| width="90%" | Buffer
 
|-
 
|-
| colspan="2" | Send buffer: 0  to,2 
+
| colspan="2" | Send buffer: 0  to 1 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Hi
 
|-
 
| colspan="2" | The high byte (bits 8-15) of the ID 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Lo
 
|-
 
| colspan="2" | The low byte (bits 0-7) of the ID 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetList===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdentExd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
 
|-
 
|-
| colspan="2" | Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
+
| colspan="2" | Get the Filter List of the Named Property 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Buffer
+
| width="90%" | Name
 
|-
 
|-
| colspan="2" | Send buffer: 0  to,2 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ID3
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===GetRxData===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| colspan="2" | The high byte (bits 24-31) of the ID 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxData'''
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| colspan="2" | Returns the data byte at index from the buffer specified 
| width="90%" | ID2
 
 
|-
 
|-
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID1
+
| width="90%" | buffer
 
|-
 
|-
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
+
| colspan="2" | The index of the required buffer 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID0
+
| width="90%" | index
 
|-
 
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
+
| colspan="2" | The index of the required data byte in the buffer 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetRxDataCount===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxData'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxDataCount'''
 
|-
 
|-
| colspan="2" | Sets the CAN transmit data for the buffer specified (0, 1 or 2).  The count parameter Data_Cnt indicates the number of valid data bytes.  D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
+
| colspan="2" | Returns the number of valid data bytes in the buffer 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
+
| width="90%" | buffer
 
|-
 
|-
| colspan="2" | Send buffer: 0  to,2 
+
| colspan="2" | The index of the required buffer 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data_Cnt
 
|-
 
| colspan="2" | The number of bytes of data to add, 0 to 8 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D0
 
|-
 
| colspan="2" | Data byte 0 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D1
 
|-
 
| colspan="2" | Data byte 1 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D2
 
|-
 
| colspan="2" | Data byte 2 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D3
 
|-
 
| colspan="2" | Data byte 3 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D4
 
|-
 
| colspan="2" | Data byte 4 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D5
 
|-
 
| colspan="2" | Data byte 5 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D6
 
|-
 
| colspan="2" | Data byte 6 to add 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | D7
 
|-
 
| colspan="2" | Data byte 7 to add 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetRxIdent===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMask'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent'''
 
|-
 
|-
| colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
+
| colspan="2" | Generic function to get the received message Identifier.    
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | mask
+
| width="90%" | buffer
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | id
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 198: Line 168:
  
  
 +
===Init===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxData'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Init'''
 
|-
 
|-
| colspan="2" | Returns the data byte at index from the buffer specified 
+
| colspan="2" | Must be called at least once and after every Uninit call to enable the CAN instance  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | buffer
 
|-
 
| colspan="2" | The index of the required buffer 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | index
 
|-
 
| colspan="2" | The index of the required data byte in the buffer 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===InitRXConfig===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXMask'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXConfig'''
 
|-
 
|-
| colspan="2" | Initialization setting for RX Mask 
+
| colspan="2" | Initialization setting for RX Buffer Config 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
+
| width="90%" | Buffer
 
|-
 
|-
| colspan="2" | Mask Number (0 or 1) 
+
| colspan="2" | Buffer Number (0 or 1) 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Value
 
| width="90%" | Value
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Config data byte 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBuffer'''
 
|-
 
| colspan="2" | Sends the contents of the buffer previously filled with Set_TX_... calls  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | Send buffer: 0  to,2 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 262: Line 206:
  
  
 +
===InitRXFilter===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 285: Line 230:
  
  
 +
===InitRXMask===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxDataCount'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXMask'''
 
|-
 
|-
| colspan="2" | Returns the number of valid data bytes in the buffer 
+
| colspan="2" | Initialization setting for RX Mask 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
+
| width="90%" | Mask
 
|-
 
|-
| colspan="2" | The index of the required buffer 
+
| colspan="2" | Mask Number (0 or 1) 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Value
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Init'''
 
|-
 
| colspan="2" | Must be called at least once and after every Uninit call to enable the CAN instance  
 
 
|-
 
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 316: Line 254:
  
  
 +
===InitTXBuffer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 349: Line 288:
  
  
 +
===SendBuffer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskStd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBuffer'''
 
|-
 
|-
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
+
| colspan="2" | Sends the contents of the buffer previously filled with Set_TX_... calls  
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
+
| width="90%" | Buffer
 +
|-
 +
| colspan="2" | Send buffer: 0  to,2 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===SetRxFilter===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilter'''
 +
|-
 +
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
 
|-
 
|-
| colspan="2" | Mask number 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Hi
+
| width="90%" | filter
 
|-
 
|-
| colspan="2" | The high byte (bits 8-15) of the ID 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Lo
+
| width="90%" | id
 
|-
 
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
+
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 377: Line 331:
  
  
 +
===SetRxFilterExd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskExd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterExd'''
 
|-
 
|-
 
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
 
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
Line 386: Line 341:
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
+
| width="90%" | Filter
 
|-
 
|-
| colspan="2" | Mask 0 or 1 
+
| colspan="2" | Send filter: 0 to 3 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
Line 415: Line 370:
  
  
 +
===SetRxFilterStd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterStd'''
 +
|-
 +
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
 +
|-
 
|-
 
|-
| colspan="2" | Set the Value of the Named property 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Filter
 
|-
 
|-
 +
| colspan="2" | Filter number 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
+
| width="90%" | Hi
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The high byte (bits 8-15) of the ID 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | Lo
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The low byte (bits 0-7) of the ID 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 438: Line 399:
  
  
 +
===SetRxMask===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilter'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMask'''
 
|-
 
|-
 
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
 
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
Line 447: Line 409:
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | filter
+
| width="90%" | mask
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
Line 461: Line 423:
  
  
 +
===SetRxMaskExd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdent'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskExd'''
 +
|-
 +
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mask
 +
|-
 +
| colspan="2" | Mask 0 or 1 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ID3
 +
|-
 +
| colspan="2" | The high byte (bits 24-31) of the ID 
 
|-
 
|-
| colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ID2
 
|-
 
|-
 +
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
+
| width="90%" | ID1
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | id
+
| width="90%" | ID0
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The low byte (bits 0-7) of the ID 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 484: Line 462:
  
  
 +
===SetRxMaskStd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckRx'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskStd'''
 +
|-
 +
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mask
 +
|-
 +
| colspan="2" | Mask number 
 
|-
 
|-
| colspan="2" | Checks to see if any messages are available for 'Buffer' specified  
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Hi
 
|-
 
|-
 +
| colspan="2" | The high byte (bits 8-15) of the ID 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
+
| width="90%" | Lo
 
|-
 
|-
| colspan="2" | Send buffer: 0 to 1 
+
| colspan="2" | The low byte (bits 0-7) of the ID 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetTxData===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXConfig'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxData'''
 
|-
 
|-
| colspan="2" | Initialization setting for RX Buffer Config 
+
| colspan="2" | Sets the CAN transmit data for the buffer specified (0, 1 or 2).  The count parameter Data_Cnt indicates the number of valid data bytes.  D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
 
|-
 
|-
 
|-
 
|-
Line 513: Line 503:
 
| width="90%" | Buffer
 
| width="90%" | Buffer
 
|-
 
|-
| colspan="2" | Buffer Number (0 or 1) 
+
| colspan="2" | Send buffer: 0 to,2 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data_Cnt
 +
|-
 +
| colspan="2" | The number of bytes of data to add, 0 to 8 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D0
 +
|-
 +
| colspan="2" | Data byte 0 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D1
 +
|-
 +
| colspan="2" | Data byte 1 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D2
 +
|-
 +
| colspan="2" | Data byte 2 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D3
 +
|-
 +
| colspan="2" | Data byte 3 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D4
 +
|-
 +
| colspan="2" | Data byte 4 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D5
 +
|-
 +
| colspan="2" | Data byte 5 to add 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D6
 +
|-
 +
| colspan="2" | Data byte 6 to add 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | D7
 
|-
 
|-
| colspan="2" | Config data byte 
+
| colspan="2" | Data byte 7 to add 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 525: Line 555:
  
  
 +
===SetTxIdent===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdent'''
 +
|-
 +
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | buffer
 
|-
 
|-
| colspan="2" | Uninitialises the CAN, freeing its connections for general use  
+
| colspan="2" |  
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 +
| width="90%" | id
 +
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 538: Line 579:
  
  
 +
===SetTxIdentExd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdentExd'''
 +
|-
 +
| colspan="2" | Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
 +
|-
 
|-
 
|-
| colspan="2" | Get the Filter List of the Named Property 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Buffer
 
|-
 
|-
 +
| colspan="2" | Send buffer: 0  to,2 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
+
| width="90%" | ID3
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The high byte (bits 24-31) of the ID 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | ID2
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent'''
 
 
|-
 
|-
| colspan="2" | Generic function to get the received message Identifier.    
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ID1
 
|-
 
|-
 +
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
+
| width="90%" | ID0
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The low byte (bits 0-7) of the ID 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetTxIdentStd===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterStd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdentStd'''
 
|-
 
|-
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
+
| colspan="2" | Sets the ID to send along with the data in the next CAN message  
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Filter
+
| width="90%" | Buffer
 
|-
 
|-
| colspan="2" | Filter number 
+
| colspan="2" | Send buffer: 0  to,2 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
Line 602: Line 647:
  
  
 +
===SetValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterExd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
 
|-
 
|-
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
+
| colspan="2" | Set the Value of the Named property 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filter
+
| width="90%" | Name
 
|-
 
|-
| colspan="2" | Send filter: 0  to 3 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ID3
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" | The high byte (bits 24-31) of the ID 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | ID2
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===Uninit===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninit'''
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| colspan="2" | Uninitialises the CAN, freeing its connections for general use  
| width="90%" | ID1
 
 
|-
 
|-
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID0
 
|-
 
| colspan="2" | The low byte (bits 0-7) of the ID 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 714: Line 757:
 
|-
 
|-
 
| colspan="2" | selects the CAN ID type 
 
| colspan="2" | selects the CAN ID type 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | TX Buffer 0
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 764: Line 811:
 
|-
 
|-
 
| colspan="2" | Data byte 7 
 
| colspan="2" | Data byte 7 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | TX Buffer 1
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 814: Line 865:
 
|-
 
|-
 
| colspan="2" | Data byte 7 
 
| colspan="2" | Data byte 7 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | TX Buffer 2
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 864: Line 919:
 
|-
 
|-
 
| colspan="2" | Data byte 7 
 
| colspan="2" | Data byte 7 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RX Buffer 0
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 884: Line 943:
 
|-
 
|-
 
| colspan="2" | Value for Filter 1 
 
| colspan="2" | Value for Filter 1 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RX Buffer 1
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 914: Line 977:
 
|-
 
|-
 
| colspan="2" | Value for Filter 5 
 
| colspan="2" | Value for Filter 5 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

Latest revision as of 10:25, 24 February 2023

Author Matrix TSL
Version 2.4
Category Misc


CAN component

CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to build a component using a CAL component Using CAL Components.

Macro reference

CheckRx

Fc9-comp-macro.png CheckRx
Checks to see if any messages are available for 'Buffer' specified  
Fc9-u8-icon.png - BYTE Buffer
Send buffer: 0 to 1 
Fc9-u8-icon.png - BYTE Return


GetList

Fc9-comp-macro.png GetList
Get the Filter List of the Named Property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


GetRxData

Fc9-comp-macro.png GetRxData
Returns the data byte at index from the buffer specified 
Fc9-u8-icon.png - BYTE buffer
The index of the required buffer 
Fc9-u8-icon.png - BYTE index
The index of the required data byte in the buffer 
Fc9-u8-icon.png - BYTE Return


GetRxDataCount

Fc9-comp-macro.png GetRxDataCount
Returns the number of valid data bytes in the buffer 
Fc9-u8-icon.png - BYTE buffer
The index of the required buffer 
Fc9-u8-icon.png - BYTE Return


GetRxIdent

Fc9-comp-macro.png GetRxIdent
Generic function to get the received message Identifier.  
Fc9-u8-icon.png - BYTE buffer
 
Fc9-u32-icon.png - ULONG Return


GetValue

Fc9-comp-macro.png GetValue
Get the Value of the Named property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Init

Fc9-comp-macro.png Init
Must be called at least once and after every Uninit call to enable the CAN instance  
Fc9-void-icon.png - VOID Return


InitRXConfig

Fc9-comp-macro.png InitRXConfig
Initialization setting for RX Buffer Config 
Fc9-u8-icon.png - BYTE Buffer
Buffer Number (0 or 1) 
Fc9-u8-icon.png - BYTE Value
Config data byte 
Fc9-void-icon.png - VOID Return


InitRXFilter

Fc9-comp-macro.png InitRXFilter
Initialization setting for RX Filter 
Fc9-u8-icon.png - BYTE Filter
 
Fc9-u32-icon.png - ULONG Value
 
Fc9-void-icon.png - VOID Return


InitRXMask

Fc9-comp-macro.png InitRXMask
Initialization setting for RX Mask 
Fc9-u8-icon.png - BYTE Mask
Mask Number (0 or 1) 
Fc9-u32-icon.png - ULONG Value
 
Fc9-void-icon.png - VOID Return


InitTXBuffer

Fc9-comp-macro.png InitTXBuffer
Initialization settings for TX Buffers 
Fc9-u8-icon.png - BYTE Buffer
TX Buffer ID = 0,1 or 2 
Fc9-u32-icon.png - ULONG ID
CAN Address 
Fc9-u8-icon.png - BYTE Length
Number of bytes to send 
Fc9-string-icon.png - STRING Data
Data Array (of Length bytes) 
Fc9-void-icon.png - VOID Return


SendBuffer

Fc9-comp-macro.png SendBuffer
Sends the contents of the buffer previously filled with Set_TX_... calls  
Fc9-u8-icon.png - BYTE Buffer
Send buffer: 0 to,2 
Fc9-void-icon.png - VOID Return


SetRxFilter

Fc9-comp-macro.png SetRxFilter
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
Fc9-u8-icon.png - BYTE filter
 
Fc9-u32-icon.png - ULONG id
 
Fc9-void-icon.png - VOID Return


SetRxFilterExd

Fc9-comp-macro.png SetRxFilterExd
Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
Fc9-u8-icon.png - BYTE Filter
Send filter: 0 to 3 
Fc9-u8-icon.png - BYTE ID3
The high byte (bits 24-31) of the ID 
Fc9-u8-icon.png - BYTE ID2
The mid-high byte (bits 16-23) of the ID 
Fc9-u8-icon.png - BYTE ID1
The mid-low byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE ID0
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetRxFilterStd

Fc9-comp-macro.png SetRxFilterStd
Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter  
Fc9-u8-icon.png - BYTE Filter
Filter number 
Fc9-u8-icon.png - BYTE Hi
The high byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE Lo
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetRxMask

Fc9-comp-macro.png SetRxMask
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
Fc9-u8-icon.png - BYTE mask
 
Fc9-u32-icon.png - ULONG id
 
Fc9-void-icon.png - VOID Return


SetRxMaskExd

Fc9-comp-macro.png SetRxMaskExd
Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
Fc9-u8-icon.png - BYTE Mask
Mask 0 or 1 
Fc9-u8-icon.png - BYTE ID3
The high byte (bits 24-31) of the ID 
Fc9-u8-icon.png - BYTE ID2
The mid-high byte (bits 16-23) of the ID 
Fc9-u8-icon.png - BYTE ID1
The mid-low byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE ID0
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetRxMaskStd

Fc9-comp-macro.png SetRxMaskStd
Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter  
Fc9-u8-icon.png - BYTE Mask
Mask number 
Fc9-u8-icon.png - BYTE Hi
The high byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE Lo
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetTxData

Fc9-comp-macro.png SetTxData
Sets the CAN transmit data for the buffer specified (0, 1 or 2). The count parameter Data_Cnt indicates the number of valid data bytes. D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
Fc9-u8-icon.png - BYTE Buffer
Send buffer: 0 to,2 
Fc9-u8-icon.png - BYTE Data_Cnt
The number of bytes of data to add, 0 to 8 
Fc9-u8-icon.png - BYTE D0
Data byte 0 to add 
Fc9-u8-icon.png - BYTE D1
Data byte 1 to add 
Fc9-u8-icon.png - BYTE D2
Data byte 2 to add 
Fc9-u8-icon.png - BYTE D3
Data byte 3 to add 
Fc9-u8-icon.png - BYTE D4
Data byte 4 to add 
Fc9-u8-icon.png - BYTE D5
Data byte 5 to add 
Fc9-u8-icon.png - BYTE D6
Data byte 6 to add 
Fc9-u8-icon.png - BYTE D7
Data byte 7 to add 
Fc9-void-icon.png - VOID Return


SetTxIdent

Fc9-comp-macro.png SetTxIdent
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
Fc9-u8-icon.png - BYTE buffer
 
Fc9-u32-icon.png - ULONG id
 
Fc9-void-icon.png - VOID Return


SetTxIdentExd

Fc9-comp-macro.png SetTxIdentExd
Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
Fc9-u8-icon.png - BYTE Buffer
Send buffer: 0 to,2 
Fc9-u8-icon.png - BYTE ID3
The high byte (bits 24-31) of the ID 
Fc9-u8-icon.png - BYTE ID2
The mid-high byte (bits 16-23) of the ID 
Fc9-u8-icon.png - BYTE ID1
The mid-low byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE ID0
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetTxIdentStd

Fc9-comp-macro.png SetTxIdentStd
Sets the ID to send along with the data in the next CAN message  
Fc9-u8-icon.png - BYTE Buffer
Send buffer: 0 to,2 
Fc9-u8-icon.png - BYTE Hi
The high byte (bits 8-15) of the ID 
Fc9-u8-icon.png - BYTE Lo
The low byte (bits 0-7) of the ID 
Fc9-void-icon.png - VOID Return


SetValue

Fc9-comp-macro.png SetValue
Set the Value of the Named property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Value
 
Fc9-void-icon.png - VOID Return


Uninit

Fc9-comp-macro.png Uninit
Uninitialises the CAN, freeing its connections for general use  
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Channel
Selects the CAN channel to be used 
Fc9-type-5-icon.png TX Pin
 
Fc9-type-5-icon.png RX Pin
 
Fc9-type-16-icon.png TX Remap
 
Fc9-type-16-icon.png RX Remap
 
Fc9-type-16-icon.png Bus Rate
selects the Bus Rate (KHz) 
Fc9-type-16-icon.png Sample Point
selects the Sample Point for bit reading 
Fc9-type-16-icon.png SJW
Synchronization Jump Width adjusts the bit clock by 1 to 4 TQ periods 
Fc9-type-14-icon.png Fosc
 
Fc9-type-14-icon.png BRGCON1
 
Fc9-type-14-icon.png BRGCON2
 
Fc9-type-14-icon.png BRGCON3
 
Fc9-type-16-icon.png ID Type
selects the CAN ID type 
Fc9-conn-icon.png TX Buffer 0
Fc9-type-14-icon.png Message ID
CAN Message ID for Transmit Buffer 0 
Fc9-type-14-icon.png Length
Number of valid data bytes in the message 
Fc9-type-14-icon.png D0
Data byte 0 
Fc9-type-14-icon.png D1
Data byte 1 
Fc9-type-14-icon.png D2
Data byte 2 
Fc9-type-14-icon.png D3
Data byte 3 
Fc9-type-14-icon.png D4
Data byte 4 
Fc9-type-14-icon.png D5
Data byte 5 
Fc9-type-14-icon.png D6
Data byte 6 
Fc9-type-14-icon.png D7
Data byte 7 
Fc9-conn-icon.png TX Buffer 1
Fc9-type-14-icon.png Message ID
CAN Message ID for Transmit Buffer 1 
Fc9-type-14-icon.png Length
Number of valid data bytes in the message 
Fc9-type-14-icon.png D0
Data byte 0 
Fc9-type-14-icon.png D1
Data byte 1 
Fc9-type-14-icon.png D2
Data byte 2 
Fc9-type-14-icon.png D3
Data byte 3 
Fc9-type-14-icon.png D4
Data byte 4 
Fc9-type-14-icon.png D5
Data byte 5 
Fc9-type-14-icon.png D6
Data byte 6 
Fc9-type-14-icon.png D7
Data byte 7 
Fc9-conn-icon.png TX Buffer 2
Fc9-type-14-icon.png Message ID
CAN Message ID for Transmit Buffer 2 
Fc9-type-14-icon.png Length
Number of valid data bytes in the message 
Fc9-type-14-icon.png D0
Data byte 0 
Fc9-type-14-icon.png D1
Data byte 1 
Fc9-type-14-icon.png D2
Data byte 2 
Fc9-type-14-icon.png D3
Data byte 3 
Fc9-type-14-icon.png D4
Data byte 4 
Fc9-type-14-icon.png D5
Data byte 5 
Fc9-type-14-icon.png D6
Data byte 6 
Fc9-type-14-icon.png D7
Data byte 7 
Fc9-conn-icon.png RX Buffer 0
Fc9-type-16-icon.png Settings
Filter setting for Receive Buffer 0 
Fc9-type-14-icon.png Mask
Value for Receive Mask 0 
Fc9-type-14-icon.png Filter 0
Value for Filter 0 
Fc9-type-14-icon.png Filter 1
Value for Filter 1 
Fc9-conn-icon.png RX Buffer 1
Fc9-type-16-icon.png Settings
Filter setting for Receive Buffer 1 
Fc9-type-14-icon.png Mask
Value for Receive Mask 1 
Fc9-type-14-icon.png Filter 2
Value for Filter 2 
Fc9-type-14-icon.png Filter 3
Value for Filter 3 
Fc9-type-14-icon.png Filter 4
Value for Filter 4 
Fc9-type-14-icon.png Filter 5
Value for Filter 5