Circuit allows any 8051 microcontroller to speak IrDA

Sept. 2, 1997
With the circuit design described here, any derivative of the 8051 microcontroller can communicate using the serial-infrared (SIR) format established by the Infrared Data Association (IrDA). Communication is a two-stage process in which the...

With the circuit design described here, any derivative of the 8051 microcontroller can communicate using the serial-infrared (SIR) format established by the Infrared Data Association (IrDA). Communication is a two-stage process in which the microcontroller first transmits via a “bit-banged” SPI serial interface to a tiny UART (IC1). The UART then formats the message in IrDA mode.

Note that the UART included in many 8051 derivatives isn’t IrDAcompatible, and can’t easily be made as such. The circuit shown, however, can easily be added to an existing 8051 system with a minimum of cost, power, and software overhead.

IC1 includes an IrDA timing mode in addition to the conventional UART timing modes (see the figure). It’s capable of 115 kbaud, but in this case the optical components shown limit the data rate to 4800 baud. The components are inexpensive, though, and most IrDA devices support data rates as low as 2400 baud. If necessary, the maximum 115 kbaud is easily attainable with high-quality optical components such as the HP-1000 IrDA module. Most IR LEDs and photodiodes are acceptable for this application, but to avoid being swamped by visible light, the photodiode should include a filter. If necessary, you can place an external ambient-light filter in front of an unfiltered photodiode.

The operating voltage can range from 2.7 V to 6 V, subject to limitations imposed by the 8051. Power-supply current is about 1 mA for IC1, plus 1 mA per megahertz for most variants of the 8051. Timing for the SPI interface isn’t critical. The UART performs all real-time processing, so the processor clock can have any reasonable frequency. Unlike most system clocks, this one doesn’t require time and temperature stability.

In the MAX3100-8051 driver code, the subroutine UTLK provides driver support for the MAX3100 (see the listing). This code translates from IrDA to RS-232 and back (for demonstration and test purposes), using the 8051’s internal UART to talk on the RS-232 side.

The circuit offers other advantages over the alternatives. One such alternative is to write a software routine for IrDA UARTs at low data rates, but the software is tricky. It uses up to 100% of the CPU’s attention when active, and is impractical above 2400 baud. You also can generate IrDA timing with discrete logic or a PAL, but that approach is expensive, powerhungry, and requires an external baud generator for the clock source.

Sponsored Recommendations

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Use Rugged Multiband Antennas to Solve the Mobile Connectivity Challenge

March 27, 2024
Selecting and using antennas for mobile applications requires attention to electrical, mechanical, and environmental characteristics: TE modules can help.

Voltage- and Current-Mode Control for PWM Signal Generation in DC-to-DC Switching Regulators

March 27, 2024
Learn voltage- and current-mode control technique for PWM-signal generation in switching-voltage regulators and where each application is best suited.

Highly Integrated 20A Digital Power Module for High Current Applications

March 20, 2024
Renesas latest power module delivers the highest efficiency (up to 94% peak) and fast time-to-market solution in an extremely small footprint. The RRM12120 is ideal for space...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!