Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Circuit allows any 8051 microcontroller to speak IrDA

Contributing Author  |   ED Online ID #6374  |   September 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 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.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (186 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (173 views today)
    3) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (90 views today)
    4) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (82 views today)
    5) Science Fiction Meets Science Fact In Today's Robot Research
    (76 views today)
    ALL TOP 20



    Reader Comments

    DFSDGSDGDFG

    DOBRI -October 02, 2009

    IrDa i make project

    Anonymous -October 02, 2009

    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources