Difference between revisions of "Component: IrDA (EB012, MCP1250, MCP2120) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd.
 
| Matrix Ltd.
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.1 (Release)
+
| 2.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Wireless
 
| Wireless
 
|}
 
|}
 +
 +
 +
==IrDA (EB012, MCP1250, MCP2120) component==
 +
Low level routines for controlling a standard IrDA interface. Also available in the form of the EB012 IrDA E-block.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_IrDA.fcfx FC_Comp_Source_IrDA.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_IrDA.fcfx FC_Comp_Source_IrDA.fcfx]
 +
 +
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
  
==[[File:Component Icon 2bfc8781_9817_4e0c_89f3_28dac37e9a62.png|Image]] IrDA (EB012, MCP1250, MCP2120) component==
 
Low level routines for controlling a standard IrDA interface.
 
Also available in the form of the EB012 IrDA E-block.
 
  
==Examples==
 
===Transmit===
 
  
Basic example which repeatedly transmits a string of data via the IrDA interface.
 
{{Fcfile|IrDA_Tx.fcfx|IrDA Transmit}}
 
===Receive===
 
  
Basic example which waits for any incoming data and then displays the data on the LCD.
 
{{Fcfile|IrDA_Rx.fcfx|IrDA Receive}}
 
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SendChar</tt></u></span>===
 
Sends a byte character to the IrDA connection.
 
  
'''Parameters'''
 
  
:[[Variable Types|INT]] ''Char''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
+
''No detailed description exists yet for this component''
  
 +
==Examples==
  
===<span style="font-weight: normal;"><u><tt>ReceiveChar</tt></u></span>===
 
Receives byte character from the IrDA connection.
 
  
'''Parameters'''
 
  
:[[Variable Types|INT]] ''Timeout''
 
::Max amount of time in milliseconds to wait for data.
 
  
  
'''Return value'''
 
  
:[[Variable Types|INT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Initialises the UART ready for IrDA data to be sent or received,
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
==Property reference==
 
<span style="font-weight: normal;"><u>Channel</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''.
 
  
Specifies the UART peripheral used to transfer data between the IrDA interface.
 
  
<span style="font-weight: normal;"><u>Baud Rate</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''BAUD_LIST''.
 
  
Sets the communications data rate in bits per second.
+
===Transmit===
  
<span style="font-weight: normal;"><u>Interface</u></span>
+
Basic example which repeatedly transmits a string of data via the IrDA interface.
 +
{{Fcfile|IrDA_Tx.fcfx|IrDA Transmit}}
 +
===Receive===
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''INTERFACE''.
+
Basic example which waits for any incoming data and then displays the data on the LCD.
 +
{{Fcfile|IrDA_Rx.fcfx|IrDA Receive}}
  
Decides which IrDA interface IC we wish to communicate via.
 
  
<span style="font-weight: normal;"><u>Echo</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''ECHO''.
 
  
Allows any incoming data to be automatically echoed back out.
 
  
<span style="font-weight: normal;"><u>TX</u></span>
 
  
This property is of type ''Single digital pin'' and can be referenced with the variable name ''TX''.
 
  
Transmit pin
 
  
<span style="font-weight: normal;"><u>RX</u></span>
 
  
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RX''.
 
  
Receive Pin
 
  
<span style="font-weight: normal;"><u>Label</u></span>
+
==Macro reference==
  
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
===Initialise===
 +
{| 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;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Initialises the UART ready for IrDA data to be sent or received,&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
Label used to help identify the component on the panel.
 
  
<span style="font-weight: normal;"><u>Injector</u></span>
+
===ReceiveChar===
 +
{| 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;" | '''ReceiveChar'''
 +
|-
 +
| colspan="2" | Receives byte character from the IrDA connection.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | Timeout
 +
|-
 +
| colspan="2" | Max amount of time in milliseconds to wait for data.&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Injector''.
 
  
''<span style="color:red;">No additional information</span>''
+
===SendChar===
 +
{| 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;" | '''SendChar'''
 +
|-
 +
| colspan="2" | Sends a byte character to the IrDA connection.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | Char
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
 +
 
 +
 
 +
==Property reference==
 +
 
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 +
|-
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Comms Settings
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Interface
 +
|-
 +
| colspan="2" | Decides which IrDA interface IC we wish to communicate via.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Baud Options
 +
|-
 +
| colspan="2" | Baud rate option selector&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Baud Rate
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Data Bits
 +
|-
 +
| colspan="2" | Number of data bits&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Echo
 +
|-
 +
| colspan="2" | Echo selection&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | TX
 +
|-
 +
| colspan="2" | Pin to be used for Transmit data&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | RX
 +
|-
 +
| colspan="2" | Pin to be used for Receive data&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Use Flow Control
 +
|-
 +
| colspan="2" | Flow Control (Handshake) enable or disable.    On: Two I/O pins are used to control the flow of data in and out of the device.    Off: Flow control is disabled.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Scope Traces
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Console Data
 +
|-
 +
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Console Columns
 +
|-
 +
| colspan="2" | Number of characters that can be displayed on a single line of the console.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Data Source
 +
|-
 +
| colspan="2" | 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 API component on the Panel.&nbsp;
 +
|}

Latest revision as of 13:11, 7 February 2023

Author Matrix Ltd.
Version 2.0
Category Wireless


IrDA (EB012, MCP1250, MCP2120) component

Low level routines for controlling a standard IrDA interface. Also available in the form of the EB012 IrDA E-block.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Transmit

Basic example which repeatedly transmits a string of data via the IrDA interface. FC6 Icon.png IrDA Transmit

Receive

Basic example which waits for any incoming data and then displays the data on the LCD. FC6 Icon.png IrDA Receive






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Initialises the UART ready for IrDA data to be sent or received, 
Fc9-void-icon.png - VOID Return


ReceiveChar

Fc9-comp-macro.png ReceiveChar
Receives byte character from the IrDA connection. 
Fc9-s16-icon.png - INT Timeout
Max amount of time in milliseconds to wait for data. 
Fc9-s16-icon.png - INT Return


SendChar

Fc9-comp-macro.png SendChar
Sends a byte character to the IrDA connection. 
Fc9-s16-icon.png - INT Char
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Comms Settings
Fc9-type-16-icon.png Interface
Decides which IrDA interface IC we wish to communicate via. 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-conn-icon.png Connections
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-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-16-icon.png Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel. 
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-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 API component on the Panel.