IrDa 3 Click Board
IrDa 3 Click Board
The IrDA 3 Click Board™ is an intelligent IR transceiver device that can send and receive UART commands via the IR interface. The IrDA 3 Click Board™ 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 Board™ 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.
Software Support
We provide a library for the IrDA 3 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
The library contains functions that perform UART reading and writing.
Key functions:
void irda3_writeByte(uint8_t input);
- Function writes (sends) one byte to the UART RX buffer
uint8_t irda3_readByte();
- Function reads (receives) one byte from the UART RX buffer
uint8_t irda3_byteReady();
- Function checks state of the RX buffer (new data is placed in)
void irda3_reset();
- Function resets the and sets back in normal operating mode
Example Description
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes click driver.
- Application Task - Checks if new data byte has been received in the RX buffer (ready for reading), and if ready than reads one byte from the RX buffer. In second case application task writes message data via UART and IR interface.
void applicationTask() { uint8_t tmp; uint8_t rdyFlag; // RECEIVER - UART polling #ifdef __RX__ rdyFlag = irda3_byteReady(); if (1 == rdyFlag) { tmp = irda3_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } #endif // TRANSMITER - TX each 2 sec #ifdef __TX__ for (tmp = 0; tmp < 9; tmp++) { irda3_writeByte( MESSAGE_DATA[tmp] ); mikrobus_logWrite( "MESSAGE SENT", _LOG_LINE ); } Delay_ms(2000); #endif }
The full application code, and ready to use projects can be found on our LibStock page.
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This click board is supported with mikroSDK - MikroElektronika 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.
IrDa 3 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.