Difference between revisions of "Component: IrDA (EB012, MCP1250, MCP2120) (Wireless)"
(XML import) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | |||
{| width="50%" | {| width="50%" | ||
|- | |- | ||
Line 5: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1.1 | + | | 1.1 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 18: | Line 20: | ||
==Examples== | ==Examples== | ||
− | |||
===Transmit=== | ===Transmit=== | ||
Basic example which repeatedly transmits a string of data via the IrDA interface. | Basic example which repeatedly transmits a string of data via the IrDA interface. | ||
− | |||
{{Fcfile|IrDA_Tx.fcfx|IrDA Transmit}} | {{Fcfile|IrDA_Tx.fcfx|IrDA Transmit}} | ||
− | |||
− | |||
===Receive=== | ===Receive=== | ||
Basic example which waits for any incoming data and then displays the data on the LCD. | Basic example which waits for any incoming data and then displays the data on the LCD. | ||
− | |||
{{Fcfile|IrDA_Rx.fcfx|IrDA Receive}} | {{Fcfile|IrDA_Rx.fcfx|IrDA Receive}} | ||
Line 35: | Line 32: | ||
===<span style="font-weight: normal;"><u><tt>SendChar</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>SendChar</tt></u></span>=== | ||
− | + | Sends a byte character to the IrDA connection. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
Line 50: | Line 45: | ||
===<span style="font-weight: normal;"><u><tt>ReceiveChar</tt></u></span>=== | ===<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''' | '''Parameters''' | ||
− | : | + | :''This macro has no parameters'' |
'''Return value''' | '''Return value''' | ||
− | : | + | :''This call does not return a value'' |
Line 75: | Line 82: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''. | 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> | <span style="font-weight: normal;"><u>Baud Rate</u></span> | ||
Line 83: | Line 88: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''BAUD_LIST''. | 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. | |
− | + | <span style="font-weight: normal;"><u>Interface</u></span> | |
− | |||
− | <span style="font-weight: normal;"><u> | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''INTERFACE''. | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''INTERFACE''. | ||
− | + | Decides which IrDA interface IC we wish to communicate via. | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Echo</u></span> | <span style="font-weight: normal;"><u>Echo</u></span> | ||
Line 99: | Line 100: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''ECHO''. | 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> | <span style="font-weight: normal;"><u>TX</u></span> | ||
Line 107: | Line 106: | ||
This property is of type ''Single digital pin'' and can be referenced with the variable name ''TX''. | 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> | <span style="font-weight: normal;"><u>RX</u></span> | ||
Line 115: | Line 112: | ||
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RX''. | 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> | ||
+ | This property is of type ''Line of text'' and can be referenced with the variable name ''label''. | ||
+ | |||
+ | Label used to help identify the component on the panel. | ||
− | <span style="font-weight: normal;"><u> | + | <span style="font-weight: normal;"><u>Injector</u></span> |
− | This property is of type '' | + | 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>'' | ''<span style="color:red;">No additional information</span>'' |
Latest revision as of 17:59, 18 March 2016
Author | Matrix Ltd. |
Version | 1.1 (Release) |
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.
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
Downloadable macro reference
SendChar
Sends a byte character to the IrDA connection.
Parameters
- INT Char
Return value
- This call does not return a value
ReceiveChar
Receives byte character from the IrDA connection.
Parameters
- INT Timeout
- Max amount of time in milliseconds to wait for data.
Return value
Initialise
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
Channel
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.
Baud Rate
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.
Interface
This property is of type Fixed list of ints and can be referenced with the variable name INTERFACE.
Decides which IrDA interface IC we wish to communicate via.
Echo
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.
TX
This property is of type Single digital pin and can be referenced with the variable name TX.
Transmit pin
RX
This property is of type Single digital pin and can be referenced with the variable name RX.
Receive Pin
Label
This property is of type Line of text and can be referenced with the variable name label.
Label used to help identify the component on the panel.
Injector
This property is of type Fixed list of ints and can be referenced with the variable name Injector.
No additional information