TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139560 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47607 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42551 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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 4 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: Optical

Downloaded: 133 times

Not followed.

License: MIT license  

IrDA 4 Click is a compact add-on board that provides a cost-effective solution for sending and receiving IR serial data. This board features the TFBS4650, an infrared transceiver from Vishay Semiconductors. The transceiver includes a PIN photodiode, an infrared emitter, and a low-power integral circuit and complies with the IrDA physical layer specification.

No Abuse Reported

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

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

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

  • Information
  • Comments (0)

mikroSDK Library Blog


IrDA 4 Click

IrDA 4 Click is a compact add-on board that provides a cost-effective solution for sending and receiving IR serial data. This board features the TFBS4650, an infrared transceiver from Vishay Semiconductors. The transceiver includes a PIN photodiode, an infrared emitter, and a low-power integral circuit and complies with the IrDA physical layer specification.

irda4_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Apr 2023.
  • Type : UART type

Software Support

We provide a library for the IrDA 4 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 IrDA 4 Click driver.

Standard key functions :

  • irda4_cfg_setup Config Object Initialization function.

    void irda4_cfg_setup ( irda4_cfg_t *cfg );
  • irda4_init Initialization function.

    err_t irda4_init ( irda4_t *ctx, irda4_cfg_t *cfg );

Example key functions :

  • irda4_generic_write IrDA 4 data writing function.

    err_t irda4_generic_write ( irda4_t *ctx, uint8_t *data_in, uint16_t len );
  • irda4_generic_read IrDA 4 data reading function.

    err_t irda4_generic_read ( irda4_t *ctx, uint8_t *data_out, uint16_t len );
  • irda_hw_reset IrDA 4 hardware reset function.

    void irda_hw_reset ( irda4_t *ctx );

Example Description

This example demonstrates the use of IrDA 4 Click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and disables the transmitter shutdown.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    irda4_cfg_t irda4_cfg;  /**< Click config object. */

    /** 
     * 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( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    irda4_cfg_setup( &irda4_cfg );
    IRDA4_MAP_MIKROBUS( irda4_cfg, MIKROBUS_1 );
    if ( UART_ERROR == irda4_init( &irda4, &irda4_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    irda4_set_tx_shutdown( &irda4, IRDA4_SHUTDOWN_DISABLED );

    log_info( &logger, " Application Task " );
}

Application Task

Demonstrates the use of IrDA 4 clicks which can be used as transmitter or receiver.

  • TRANSMITTER : Device is sending tx_message data.
  • RECEIVER : Device is reading a message that is being transmitted and logs it on the UART terminal.
void application_task ( void ) 
{
#if defined( DEMO_APP_TRANSMITTER )
    for ( uint8_t n_cnt = 0; n_cnt < 8; n_cnt++ )
    {
        irda4_generic_write( &irda4, &tx_message[ n_cnt ], 1 );
        Delay_ms ( 500 );
    }
    log_printf( &logger, "Message sent \r\n" );
#else
    if ( 1 == irda4_generic_read( &irda4, &rx_message, 1 ) )
    {
        log_printf( &logger, "%c", rx_message );
    }
#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.IrDA4

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

Buck 12 click

5

Buck 12 Click is a high-efficiency step-down converter which provides 3.3V on its output, derived from the connected power supply voltage, in the range from 4.2V to 18V.

[Learn More]

Flash 2 Click

0

Flash 2 Click features a 64 Mbit Flash memory IC, manufactured by using the proprietary high-performance CMOS Super-Flash® technology, which allows the Flash 2 Click to withstand up to 100,000 write cycles, with the data retention period of 100 years, which is considerably longer than any other memory module of this type. The flash memory IC used on this Click board™ features Serial Flash Discoverable Parameters (SFDP) mode, used to retrieve the advanced information from the device, such as the operating characteristics, structure and vendor specified information, memory size, operating voltage, timing information, and more.

[Learn More]

FreeRTOS V9.0.0 MikroC Examples

15

These examples demonstrate the usage of FreeRTOS V9.0.0 in MikroC PRO for ARM, MikroC PRO for dsPIC and MikroC PRO for PIC32.

[Learn More]