OFF
MIKROE-1195
30 g
Status:
IrDA 2 Click is a compact add-on board providing a cost-effective solution for sending and receiving IR serial data. This board features the MCP2120, a Microchip’s high-performance fully-static infrared encoder/decoder for the infrared transceiver module, the TFDU4101 from Vishay semiconductor. The MCP2120 encodes an asynchronous serial data stream, converting each data bit to the corresponding Infrared (IR) formatted pulse, with received IR pulses decoded back into the corresponding UART formatted serial data. The combination of the MCP2120 and TFDU4101 results in fast and stable infrared data communication covering the full IrDA range of more than 1m and speed up to 115.2 kbit/s. This Click board™ is suitable for TV and video systems, external infrared adapters, diagnostic systems, and other industrial applications.
IrDA 2 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
IrDA 2 Click is based on the MCP2120, a high-performance fully-static infrared encoder/decoder from Microchip for sending and receiving IR serial data from the infrared transceiver module, the TFDU4101 from Vishay semiconductor. This way, the MCP2120 adds IR capability to any embedded application where serial data is present. The data from a standard UART is encoded (modulated) and output as electrical pulses to the IR Transceiver. Besides, the IR Transceiver also receives and outputs as electrical pulses, which the MCP2120 decodes (demodulates) and then transmits by the UART interface. This modulation and demodulation method is performed by the latest IrDAR physical layer standard for fast infrared data communication, supporting IrDA speeds up to 115.2kbit/s.
Integrated within the TFDU4101 transceiver module are a photo pin diode, an infrared emitter (IRED), and a low-power control IC to provide a total front-end solution in a single package. This Click board™ covers the full IrDA range of more than 1m and can be enabled or disabled through the EN pin routed to the CS pin of the mikroBUS™ socket; hence, offering a switch operation to turn ON/OFF power delivery to the MCP2120. The MCP2120 will encode and decode serial data at the currently selected data rate, or baud rate. The selection can be made by positioning SMD jumpers labeled as BR SEL in an appropriate position marked as 1 or 0.
Also, the software baud rate selection is selected if all these jumpers are in a high (1) position. For any other inputs, the hardware select mode is active. This setting is latched when the MCP2120 is reset from the RST pin of the mikroBUS™ socket. After an MCP2120 reset, changing the value of the baud pins does not affect the device’s baud rate.
Software baud data rate is intended for use with systems where switching data rates must be performed frequently between the MCP2120 and the embedded host. In software baud mode, the MCP2120 differentiates between data and commands. This feature is controlled via the MOD pin routed to the AN pin of the mikroBUS™ socket. The MOD pin is used to switch between command and data modes, and when the MOD pin is in a low state, the MCP2120 is in command mode; otherwise, the MCP2120 is in data mode.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the PWR SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Type
Optical
Applications
Can be used for TV and video systems, external infrared adapters, diagnostic systems, and other industrial applications
On-board modules
MCP2120 - high-performance fully-static infrared encoder/decoder from Microchip
TFDU4101 - infrared transceiver module from Vishay semiconductor
Key Features
Low power consumption, data communication rates up to 115.2kbit/s, interfaces with IrDA compliant transciever, baud rate selection, high efficiency and performance, and more
Interface
GPIO,UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on IrDA 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1-JP3 | BR SEL | Upper | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP4 | PWR SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Operating Range | - | - | 1 | m |
Data Rate | - | - | 115.2 | kbit/s |
We provide a library for the IrDA 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for IrDA 2 Click driver.
Key functions
irda2_mode_setup
This function allows IrDA 2 click mode to be set.
irda2_pwr_setup
This function allows IrDA 2 click power mode to be set.
irda2_reset
This function executes a device reset operation.
Example Description
This example demonstrates the use of IrDA 2 click boards. The example can perform both roles, transmitter and receiver.
void application_task( void ) {
#ifdef DEMO_APP_RECEIVER_1
rx_message[ 0 ] = irda2_generic_single_receive( &irda2 );
if ( rx_message[ 0 ] != 0 ) {
log_printf( &logger, "%c", ( char ) rx_message[ 0 ] );
}
Delay_ms( 100 );
#endif
#ifdef DEMO_APP_RECEIVER_2
irda2_generic_multiple_receive( &irda2, rx_message, 'n' );
log_printf( &logger, "RECEIVED MESSAGE : " );
log_printf( &logger, "%srn", rx_message );
Delay_ms( 100 );
#endif
#ifdef DEMO_APP_TRANSMITTER_1
irda2_generic_multiple_send( &irda2, tx_message );
log_printf( &logger, "MESSAGE SENTrn" );
Delay_ms( 2000 );
#endif
#ifdef DEMO_APP_TRANSMITTER_2
idx = 0;
while ( tx_message[ idx ] != '' ) {
irda2_generic_single_send( &irda2, tx_message[ idx++ ] );
}
log_printf( &logger, "MESSAGE SENTrn" );
Delay_ms( 2000 );
#endif
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
This Click board™ is supported with mikroSDK - MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.