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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(XML import)
 
(7 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
|-
 
|-
 
| width="20%" style="color: gray;" | Version
 
| width="20%" style="color: gray;" | Version
| 1.1
+
| 2.0 (Release)
 
|-
 
|-
 
| width="20%" style="color: gray;" | Category
 
| width="20%" style="color: gray;" | Category
Line 15: Line 15:
  
  
==[[Media:Component Icon 2bfc8781_9817_4e0c_89f3_28dac37e9a62.png|Image]] IrDA (EB012, MCP1250, MCP2120) component==
+
==[[File:Component Icon 2bfc8781_9817_4e0c_89f3_28dac37e9a62.png|Image]] IrDA (EB012, MCP1250, MCP2120) component==
 
Low level routines for controlling a standard IrDA interface.
 
Low level routines for controlling a standard IrDA interface.
 
Also available in the form of the EB012 IrDA E-block.
 
Also available in the form of the EB012 IrDA E-block.
  
 
==Examples==
 
==Examples==
''<span style="color:red;">No additional examples</span>''
+
===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==
 
==Downloadable macro reference==
  
 
===<span style="font-weight: normal;"><u><tt>SendChar</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>SendChar</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Sends a byte character to the IrDA connection.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 41: Line 45:
  
 
===<span style="font-weight: normal;"><u><tt>ReceiveChar</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>ReceiveChar</tt></u></span>===
''<span style="color:red;">No additional information</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'''
  
:[[Variable Types|INT]] ''Timeout''
+
:''This macro has no parameters''
  
  
 
'''Return value'''
 
'''Return value'''
  
:[[Variable Types|INT]]
+
:''This call does not return a value''
  
  
Line 62: Line 78:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Channel</u></span>
+
<span style="font-weight: normal;"><u>Interface</u></span>
 +
 
 +
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 ''CHANNEL''.
+
Decides which IrDA interface IC we wish to communicate via.
  
''<span style="color:red;">No additional information</span>''
+
<span style="font-weight: normal;"><u>Baud Options</u></span>
  
 +
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::BAUD_LIST''.
  
 +
Baud rate option selector
  
 
<span style="font-weight: normal;"><u>Baud Rate</u></span>
 
<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''.
+
This property is of type ''Signed integer'' and can be referenced with the variable name ''cal_uart::BAUD''.
  
 
''<span style="color:red;">No additional information</span>''
 
''<span style="color:red;">No additional information</span>''
Line 78: Line 98:
  
  
<span style="font-weight: normal;"><u>INTERFACE</u></span>
+
<span style="font-weight: normal;"><u>Data Bits</u></span>
  
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 ''cal_uart::DBITS''.
 +
 
 +
Number of data bits
  
''<span style="color:red;">No additional information</span>''
+
<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 ''cal_uart::ECHO''.
  
 +
Echo selection
  
<span style="font-weight: normal;"><u>Echo</u></span>
+
<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 ''ECHO''.
+
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::CHANNEL''.
  
''<span style="color:red;">No additional information</span>''
+
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.
  
 
<span style="font-weight: normal;"><u>TX</u></span>
 
<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''.
+
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_uart::TX''.
 +
 
 +
Pin to be used for Transmit data
  
''<span style="color:red;">No additional information</span>''
+
<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 ''cal_uart::RX''.
  
 +
Pin to be used for Receive data
  
<span style="font-weight: normal;"><u>RX</u></span>
+
<span style="font-weight: normal;"><u>Use Flow Control</u></span>
  
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RX''.
+
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::FLOWEN''.
  
''<span style="color:red;">No additional information</span>''
+
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.
  
 
<span style="font-weight: normal;"><u>Label</u></span>
 
<span style="font-weight: normal;"><u>Label</u></span>
Line 114: Line 146:
 
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
 
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
  
''<span style="color:red;">No additional information</span>''
+
Label used to help identify the component on the panel.
 +
 
 +
<span style="font-weight: normal;"><u>Scope Traces</u></span>
 +
 
 +
This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ScopeTraces''.
 +
 
 +
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.
 +
 
 +
<span style="font-weight: normal;"><u>Console Data</u></span>
 +
 
 +
This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ConsoleData''.
 +
 
 +
Selects if the console data is automatically generated or not
 +
 
 +
<span style="font-weight: normal;"><u>Console Columns</u></span>
 +
 
 +
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''cal_uart::ConsoleColumns''.
 +
 
 +
Number of characters that can be displayed on a single line of the console.
 +
 
 +
<span style="font-weight: normal;"><u>Data Source</u></span>
 +
 
 +
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::DataSource''.
 +
 
 +
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
 +
 
 +
    Injector - Routes the communication data via a data injector component on the Panel.

Latest revision as of 10:31, 9 May 2018


Author Matrix Ltd.
Version 2.0 (Release)
Category Wireless


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. 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

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

INT


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

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.

Baud Options

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::BAUD_LIST.

Baud rate option selector

Baud Rate

This property is of type Signed integer and can be referenced with the variable name cal_uart::BAUD.

No additional information


Data Bits

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::DBITS.

Number of data bits

Echo

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::ECHO.

Echo selection

Channel

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::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.

TX

This property is of type Single digital pin and can be referenced with the variable name cal_uart::TX.

Pin to be used for Transmit data

RX

This property is of type Single digital pin and can be referenced with the variable name cal_uart::RX.

Pin to be used for Receive data

Use Flow Control

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::FLOWEN.

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.

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.

Scope Traces

This property is of type True or false and can be referenced with the variable name cal_uart::ScopeTraces.

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.

Console Data

This property is of type True or false and can be referenced with the variable name cal_uart::ConsoleData.

Selects if the console data is automatically generated or not

Console Columns

This property is of type Unsigned integer and can be referenced with the variable name cal_uart::ConsoleColumns.

Number of characters that can be displayed on a single line of the console.

Data Source

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::DataSource.

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 
   Injector - Routes the communication data via a data injector component on the Panel.