Spanish Italian
22319 Users    

Free IrDA Stacks

  Download PDF version of the Article

Infrared communication is a low-cost method of wireless, point-to-point communication between two devices. Even more and more communication methods including USB, Bluetooth, and Zigbee are implemented on the microcontrollers. The legacy communication methods including IrDA still have chance and large installation base. 

Formed in 1994, Infrared Data Association (IrDA) develops standard methods for communicating over short-range infrared transmissions. It is widely deployed in variety of devices, including computers, printers, PDAs, cell phones, watches, DAQ devices and other instruments. The association still releases new profiles for IrSimple, IrRC, IrFM, and tries to promote infrared to new applications like mobile payment with simpler and faster operation.

IrDA supports SIR (115kbps), MIR (1Mbps), FIR (4Mbps), VFIR (16Mbps) and UFIR operation mode. Because the SIR mode shares the common frame definition of a common RS232/UART, it becomes the most popular mode. The basic requirement of IrPHY physical layer for IrDA in SIR mode is UART, IrDA ENDEC and IrDA transceiver. The IrDA ENDEC (encoder & decoder) converts NRZ UART signal to RZ IrDA signal and vice versa. The IrDA ENDEC used to be an independent IC, such as TOIM4232 from Telefunken. Now it becomes a trend to integrate the ENDEC into either UART block or IrDA transceiver module. ARM offers the IrDA SIR ENDEC block for PrimeCell UART core. More and more ARM based microcontrollers becomes IrDA enabled parts. And other semiconductors suppliers and IP suppliers follow ARM as well.

The following list is a small collection for IrDA (SIR) enabled devices, including standalone UART ICs and microcontrollers with IrDA mode.

  • Microchip: MCP2140 / MCP2155 / PIC24F / PIC24H / dsPIC33F
  • NXP: SC16C554 / SC16C850SV / LPC17XX (Cortex-M3) / LPC28XX (ARM7TDMI) / LPC32XX (ARM926)
  • STM: STM32F103 (Cortex-M3) / STR91x (ARM926)
  • Freescale: MC9S12E128 / ColdFire / PPC / i.MX
  • TI: MSP430F2274 / Stellaris (Cortex-M3)
  • EXAR: ST16C650A (UART with IrDA ENDEC)

BTW, some reference designs also offer the software approach for IrDA SIR mode, i.e., software IrDA ENDEC and software UART. 

IrDA stack

Linux always an important source for communication stacks including TCP/IP, Bluetooth and IrDA. Although Linux has an open source IrDA stack (Linux-IrDA project), its footprint is too big to fit into the embedded microcontrollers. The minimum requirement for Linux-IrDA project is uClinux, which runs in external DRAM and 32-bit microprocessors. The 16-bit and low-end 32-bit microcontrollers like ColdFire v1, LPC2100, LPC2200, Cortex-M0, and MSP430 can support conventional RTOS, rather than uClinux. The IrDA stack is usually a commercial product from independent software vendor, such as Sybase, EMBEDnet. There is few open source IrDA implementations for embedded applications with RTOS. 

I searched for the open source IrDA stack for several times, but I failed. Many semiconductors suppliers, including Freescale, TI, and NXP, do offer application note for IrDA for their microcontrollers. However, their application notes usually only cover IrPHY, rather than a turnkey solution for IrDA. 

Of course, you still have chance to have "free" IrDA stack from your suppliers. Agilent infrared transceiver product line, now part of Avago Technologies, offers IrDA Lite stacks (HSDL-S100 to HSDL-S900) with its IrDA transceiver for their clients only. Avago's solution offers reference implementation on Windows, 8051(no OS) and uC/OS-II on ARM7TDMI. You have to contact their sales offices first. Zilog offers a low-level framer reference design for its Encode! XP Z8F0412 with source code. The framer is an important portion of IrDA stack, but it is not a complete design. Among these semiconductor suppliers, Microchip offers a free IrDA stacks in library format (in elf and coff). As a result, we find a complete solution for IrDA with specified 16-bit platforms on PIC24F, PIC24H and dsPIC33. 

Microchip Stack for the IrDA Standard

The latest v1.02 of Microchip IrDA stack provides support for IrCOMM 3-wire raw, IrCOMM 9-wire cooked and IrOBEX protocols. The IrCOMM protocols are available in both client and server configurations, while IrOBEX protocol is available in client, server and peer configuration. Each protocol configuration combination is supported through a separate library, which is managed and configured by a PC based configuration tool (MIST.exe: Microchip IrDA Stack Tool). 

The minimum requirement for Microchip IrDA stack is an IrDA enabled UART, a timer with interrupt, RAM (from 1.1KB to 3.6KB) and ROM (from 16KB to 54KB). The RAM and ROM overhead depend on the selected working mode (client, server, peer, primary, secondary) and protocols.

The stack is delivered in library format with MPLAB C30. The user can see the source code for UART device driver and Timer interrupt handler as well as demo applications. If you don't mind using Microchip, you can download the MPLAB and start to explore your IrDA application. 

If you are trying to port Microchip stack to other microcontroller, you can refer the header files and micro definitions from Microchip, IrDA low-level framer from Zilog, Liunx-IrDA source code to roll your own project. It is a difficult job since it is as difficult as a TCP/IP stack. Of course, the programming structure is also similar with TCP/IP stack, so you can save some effort.

You also can visit some open source implementations, which have limited features. The Pico IrDA is a Yahoo group for IrDA interested people. The IrDA Lite protocol is a small and limited implementation for AVR microcontrollers. And MicroLite IrDA is a commercial IrDA, also very limited. However, people who want to develop by themselves can get started with mentioned resources.

For new profiles like IrSimple, IrRC and IrFM, please refer to IrDA web site for detail, since it may have big differences against SIR/IrCOMM.

Good Luck! Don't forget to share. 

References

iAnywhere, formerly Extended Systems, now part of Sybase
http://www.extendedsystems.com/

EMBEDnet
http://www.embednet.com/

Agilent IrDA stack (Now Avago Technologies)
http://www.avagotech.com/

Vishy Telefunken IrDA transceiver
http://www.vishay.com/ir-transceivers/

Implementing IrDA with the MSP430 ( slaa202a.pdf )
http://coecsl.ece.uiuc.edu/ge423/datasheets/MSP430Ref_Guides/irda/slaa20...

Zilog Z8 Encode! XP Z8F0412 Source Code Section
http://www.zilog.com/index.php?option=com_product&Itemid=26&mode=showPro...

Elan SC400 Windows 95/98 SIR IrDA CodeKit Software
http://www.amd.com/epd/desiging/codekits/2.series1/17.ck0017lan/28.ck001...

IrDA Lite Protocol Stack for Atmel AVR microcontroller
http://www.psh-mikro.sk/irdavr/irdavr.htm

MicroLite IrDA Protocol, commercial
http://www.irdalite.com/irda/home.html

Pico IrDA Yahoo Group, by BlauLogic
http://tech.groups.yahoo.com/group/pico_irda/

IRDA

IRDA

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Who's new

  • jwkuang
  • Nashu
  • sivajikalna
  • lxz5101
  • infological
  • raman
  • petermor
  • chichiang
  • jagadeesh427
  • rtajik

Who's online

There are currently 0 users and 41 guests online.