Difference between revisions of "Component: IrDA (EB012, MCP1250, MCP2120) (Wireless)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {| style="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 |
− | | 2.0 | + | | 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== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ''No detailed description exists yet for this component'' | ||
− | == | + | ==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}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ==Macro reference== | |
− | + | ===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, | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | + | ===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. | ||
+ | |- | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | + | ===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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | ||
+ | | width="90%" | Char | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | + | ==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 | |
− | Number of characters that can be displayed on a single line of the console. | + | |- |
− | + | |- | |
− | + | | 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. | |
− | Simulation data source used to allow the component to connect to various remote devices | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Baud Options | |
− | + | |- | |
− | + | | colspan="2" | Baud rate option selector | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
+ | | width="90%" | Baud Rate | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Data Bits | ||
+ | |- | ||
+ | | colspan="2" | Number of data bits | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Echo | ||
+ | |- | ||
+ | | colspan="2" | Echo selection | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | TX | ||
+ | |- | ||
+ | | colspan="2" | Pin to be used for Transmit data | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | RX | ||
+ | |- | ||
+ | | colspan="2" | Pin to be used for Receive data | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | 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 | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | | 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. | ||
+ | |} |
Latest revision as of 13:11, 7 February 2023
Author | Matrix Ltd. |
Version | 2.0 |
Category | Wireless |
Contents
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. IrDA Transmit
Receive
Basic example which waits for any incoming data and then displays the data on the LCD. IrDA Receive
Macro reference
Initialise
Initialise | |
Initialises the UART ready for IrDA data to be sent or received, | |
- VOID | Return |
ReceiveChar
ReceiveChar | |
Receives byte character from the IrDA connection. | |
- INT | Timeout |
Max amount of time in milliseconds to wait for data. | |
- INT | Return |
SendChar
SendChar | |
Sends a byte character to the IrDA connection. | |
- INT | Char |
- VOID | Return |