Component: IrDA (EB012, MCP1250, MCP2120) (Wireless)

From Flowcode Help
Jump to navigationJump to search


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.