TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139060 times)
  2. FAT32 Library (71592 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

IrDA 3 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: Optical

Downloaded: 175 times

Not followed.

License: MIT license  

IrDA 3 Click is an intelligent IR transceiver device that can both send and receive UART commands via the IR interface. IrDA 3 Click features both the IR transceiver and the encoder/decoder IC, used to convert the UART data and send or receive it in IrDA® compatible format. IrDA 3 Click also has an onboard clock generator for the fastest possible UART performance of 115,200 bps, so it does not need an additional clock signal to be generated by the MCU.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "IrDA 3 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "IrDA 3 Click" changes.

Do you want to report abuse regarding "IrDA 3 Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


IrDA 3 Click

IrDA 3 Click is an intelligent IR transceiver device that can both send and receive UART commands via the IR interface. IrDA 3 Click features both the IR transceiver and the encoder/decoder IC, used to convert the UART data and send or receive it in IrDA® compatible format. IrDA 3 Click also has an onboard clock generator for the fastest possible UART performance of 115,200 bps, so it does not need an additional clock signal to be generated by the MCU.

irda3_click.png

Click Product page


Click library

  • Author : Jelena Milosavljevic
  • Date : Jun 2021.
  • Type : UART type

Software Support

We provide a library for the IrDA3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for IrDA3 Click driver.

Standard key functions :

  • irda3_cfg_setup Config Object Initialization function.

    void irda3_cfg_setup ( irda3_cfg_t *cfg );
  • irda3_init Initialization function.

    err_t irda3_init ( irda3_t *ctx, irda3_cfg_t *cfg );
  • irda3_default_cfg Click Default Configuration function.

    void irda3_default_cfg ( irda3_t *ctx );

Example key functions :

  • irda3_mode_setup This function allows IrDA 3 Click mode to be set.

    void irda3_mode_setup( irda3_t *ctx, irda3_mode_t state );
  • irda3_pwr_setup This function allows IrDA 3 Click power mode to be set.

    void irda3_pwr_setup( irda3_t *ctx, irda3_pwr_t state );
  • irda3_reset This function executes a device reset operation.

    void irda3_reset( irda3_t *ctx );

Example Description

This example demonstrates the use of IrDA 3 Click boards. The example can perform both roles, transmitter and receiver.

The demo application is composed of two sections :

Application Init

Initializes UART driver and all used control pins. Also clears the response buffer.

void application_init( void ) { irda3_cfg_t irda3_cfg; log_cfg_t logger_cfg;

/** 
 * Logger initialization.
 * Default baud rate: 115200
 * Default log level: LOG_LEVEL_DEBUG
 * @note If USB_UART_RX and USB_UART_TX 
 * are defined as HAL_PIN_NC, you will 
 * need to define them manually for log to work. 
 * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
 */
LOG_MAP_USB_UART( logger_cfg );
log_init( &logger, &logger_cfg );
log_printf( &logger, "***  IrDA initialization done  ***\r\n" );
log_printf( &logger, "**********************************\r\n" );

//  Click initialization.

irda3_cfg_setup( &irda3_cfg );
IRDA3_MAP_MIKROBUS( irda3_cfg, MIKROBUS_1 );
irda3_init( &irda3, &irda3_cfg );
irda3_default_cfg( &irda3 );
irda3_reset( &irda3 );

//  Clear response.

memset( rx_message, 0, sizeof( rx_message ) );

}


### Application Task

> Demonstrates the use of IrDA 3 clicks which can be used as transmitter or receiver. There are four different examples in this project. 
Uncomment one of the below macros to select which example will be executed. By default the DEMO_APP_TRANSMITTER_1 example is selected.

```c

void application_task( void ) {

#ifdef DEMO_APP_RECEIVER_1
    rx_message[ 0 ] = irda3_generic_single_receive( &irda3 );

    if ( rx_message[ 0 ] != 0 ) {
        log_printf( &logger, "%c", ( char ) rx_message[ 0 ] );
    }
    Delay_ms ( 100 );

#endif

#ifdef DEMO_APP_RECEIVER_2

    irda3_generic_multiple_receive( &irda3, rx_message, '\n' );

    log_printf( &logger, "RECEIVED MESSAGE : " );
    log_printf( &logger, "%s\r\n", rx_message );
    Delay_ms ( 100 );

#endif

#ifdef DEMO_APP_TRANSMITTER_1

    irda3_generic_multiple_send( &irda3, tx_message );

    log_printf( &logger, "MESSAGE SENT\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

#endif

#ifdef DEMO_APP_TRANSMITTER_2

    idx = 0;

    while ( tx_message[ idx ] != '\0' ) {
        irda3_generic_single_send( &irda3, tx_message[ idx++ ] );
    }

    log_printf( &logger, "MESSAGE SENT\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

#endif

}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.IrDA3

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


ALSO FROM THIS AUTHOR

4D - display click

5

4D - display click is an adapter Click board that offers a mikroBUS interface for controlling 4D Systems gen4 Series intelligent Display Modules. 4D Systems designs and manufactures a wide range of Intelligent Display Modules equipped with powerful graphics processors.

[Learn More]

Diff Press click

5

Diff Press Click is an accurate pressure sensor Click board capable of measuring differential pressure. This Click board utilizes a very precise differential pressure sensor from NXP, labeled as MPXV7007DP.

[Learn More]

Accel 17 Click

0

Accel 17 Click is a compact add-on board that contains an acceleration sensor. This board features the MXC62320MP, a low-power digital output dual-axis accelerometer fabricated on a standard, submicron CMOS process from MEMSIC.

[Learn More]