MSP430C112 IrDA SIR Encoder/Decoder - TI. · PDF fileAppendix A presents applicable IrDA...

download MSP430C112 IrDA SIR Encoder/Decoder - TI. · PDF fileAppendix A presents applicable IrDA software. 1 Introduction ... the use of the MSP430x112 as an IrDA-encoder/decoder based on

If you can't read please download the document

Transcript of MSP430C112 IrDA SIR Encoder/Decoder - TI. · PDF fileAppendix A presents applicable IrDA...

  • March 1999 Mixed Signal Products

    ApplicationReport

    SLAA044

  • IMPORTANT NOTICE

    Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinueany product or service without notice, and advise customers to obtain the latest version of relevant informationto verify, before placing orders, that information being relied on is current and complete. All products are soldsubject to the terms and conditions of sale supplied at the time of order acknowledgement, including thosepertaining to warranty, patent infringement, and limitation of liability.

    TI warrants performance of its semiconductor products to the specifications applicable at the time of sale inaccordance with TIs standard warranty. Testing and other quality control techniques are utilized to the extentTI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarilyperformed, except those mandated by government requirements.

    CERTAIN APPLICATIONS USING SEMICONDUCTOR PRODUCTS MAY INVOLVE POTENTIAL RISKS OFDEATH, PERSONAL INJURY, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE (CRITICALAPPLICATIONS). TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, AUTHORIZED, ORWARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT DEVICES OR SYSTEMS OR OTHERCRITICAL APPLICATIONS. INCLUSION OF TI PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TOBE FULLY AT THE CUSTOMERS RISK.

    In order to minimize risks associated with the customers applications, adequate design and operatingsafeguards must be provided by the customer to minimize inherent or procedural hazards.

    TI assumes no liability for applications assistance or customer product design. TI does not warrant or representthat any license, either express or implied, is granted under any patent right, copyright, mask work right, or otherintellectual property right of TI covering or relating to any combination, machine, or process in which suchsemiconductor products or services might be or are used. TIs publication of information regarding any thirdpartys products or services does not constitute TIs approval, warranty or endorsement thereof.

    Copyright 1999, Texas Instruments Incorporated

  • iii MSP430 IrDA SIR Encoder/Decoder

    Contents1 Introduction 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2 The IrDA Serial Infrared Physical Layer Specification 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3 The MSP430x112 Low-End Ultra-Low Power Microcontroller 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4 MSP430x112 IrDA SIR Encoder/Decoder 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Module Overview 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 MSP430x112 Software 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.2.1 General 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 IrDA-SIR Encoder (TX) 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 IrDA-SIR Decoder (RX) 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.3 Installation 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Data Rate Selection 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 User Interface 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5 Schematic 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6 Conclusion 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7 References 13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Appendix A A Software Listing A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • Figures

    iv SLAA044

    List of Figures1 IrDA and UART Frames 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Block Diagram of the IrDA Module 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Timer_A Usage During RS232/IrDA Conversion 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Timer_A Usage During IrDA/RS232 Conversion 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 IrDA Initialization Message 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 IrDA Initialization Acknowledge Receiver 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Schematic IrDA Module 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    List of Tables1 IrDA Signaling Rate and Pulse Duration Specification 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Data Rate Settings 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 1

    MSP430 IrDA SIR Encoder/Decoder

    Juergen Mayer

    ABSTRACTThis report gives a short overview on the use of the MSP430x112 as an IrDA SIRencoder/decoder. The hardware is discussed, including a block diagram and an IrDAmodule schematic diagram. The next sections deal with programming and user interfaceissues. Appendix A presents applicable IrDA software.

    1 IntroductionInfrared data transmissions recent popularity has been fueled by the need toexchange data between portable and fixed equipment. Furthermore, the arrivalof the Infrared Data Association (IrDA) working standard offers a practical andcost-efficient protocol for data communications.

    The MSP430 is a powerful microcontroller capable of handling both the targetapplication and the IrDA serial infrared protocol. Its affordability, its 16-bitarchitecture, and its low-power consumption, makes this technology possible inmedium and high-speed data transmission applications where cost issues areimportant or battery-powered equipment is required. This document describesthe use of the MSP430x112 as an IrDA-encoder/decoder based on the IrDAdemo board.

    The IrDA transceiver module can be used for serial data communication betweentwo PCs via the RS232. Each PC requires only a standard RS232 port and someconventional terminal software such as the Hyperterminal, which is provided byWindows 3.11, Windows95, or WindowsNT.

    The same basic code can be used on other applications of the MSP430 family,including liquid-crystal display drivers, analog-to-digital converters, andhardware multipliers.

  • The IrDA Serial Infrared Physical Layer Specification

    2 SLAA044

    2 The IrDA Serial Infrared Physical Layer Specification

    The IrDA physical layer specification is intended to define a half-duplex infraredcommunication link for exchanging data over a distance of up to 1 m. The fullstandard includes data rates up to 4 Mbit/s. However, in this note we cover onlydata rates between 2.4 kbit/s and 115.2 kbit/s.

    An IrDA serial infrared interface must operate at a minimum of 9.6 kbit/s, withhigher data rates optional. The signaling rate and pulse duration specificationsare listed in Table 1.

    Table 1. IrDA Signaling Rate and Pulse Duration Specification

    DATA RATE BIT TIME IrDA PULSEDURATION MINIMUM

    IrDA PULSEDURATION NOMINAL

    IrDA PULSEDURATION MAXIMUM

    2.4 kbit/s 416 s 1.41 s 78.13 s 88.55 s

    9.6 kbit/s 104 s 1.41 s 19.53 s 22.13 s

    19.2 kbit/s 52.0 s 1.41 s 9.77 s 11.07 s

    38.4 kbit/s 26.0 s 1.41 s 4.88 s 5.96 s

    57.6 kbit/s 17.3 s 1.41 s 3.26 s 4.34 s

    115.2 kbit/s 8.68 s 1.41 s 1.63 s 2.23 s

    The minimum pulse duration is the same for data rates up to 115.2 kbit/s. Thereason is that the IrDA physical layer specification allows two kinds of pulsemodulations: 3/16 of a bit duration pulse, or a minimum pulse duration of 1.63 sminus a 0.22 s tolerance.

    With the transmission speed limited to 115.2kbit/s, there is no need to transmita serial infrared interaction pulse (SIP) which would guarantee nondisruptivecompatibility with slower infrared (IR) systems. This leads to a very simplestructure of the IrDA frame for data rates up to 115.2 kbit/s.

    For data rates up to 115.2 kbit/s, the electrical signal to the encoder/decoder unitis a serial bit stream. A logical 0 in the bit stream is represented by an IR puls