MCP212X Developer's Daughter Board User's Guide (c) 2006 Microchip Technology Inc. DS51571B Note the following details of the code protection feature on Microchip devices: * Microchip products meet the specification contained in their particular Microchip Data Sheet. * Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. * There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. * Microchip is willing to work with the customer who is concerned about the integrity of their code. * Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as "unbreakable." Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip's code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, Mindi, MiWi, MPASM, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. (c) 2006, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona, Gresham, Oregon and Mountain View, California. The Company's quality system processes and procedures are for its PICmicro(R) 8-bit MCUs, KEELOQ(R) code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip's quality system for the design and manufacture of development systems is ISO 9001:2000 certified. DS51571B-page ii (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Table of Contents Preface ........................................................................................................................... 1 Introduction............................................................................................................ 1 Document Layout .................................................................................................. 2 Conventions Used in this Guide ............................................................................ 3 Recommended Reading........................................................................................ 4 The Microchip Web Site ........................................................................................ 5 Customer Support ................................................................................................. 5 Document Revision History ................................................................................... 5 Chapter 1. Product Overview ....................................................................................... 7 1.1 Introduction ..................................................................................................... 7 1.2 What is the MCP212X Developer's Daughter Board? .................................... 7 1.3 What the MCP212X Developer's Daughter Board Kit Includes ...................... 8 Chapter 2. Installation and Operation ......................................................................... 9 2.1 Introduction ..................................................................................................... 9 2.2 Features ....................................................................................................... 10 2.3 Getting Started ............................................................................................. 11 2.4 Making a Demo System ............................................................................... 16 2.5 MCP212X Developer's Daughter Board Description .................................... 18 Appendix A. Schematic and Layouts ........................................................................ 21 A.1 Introduction .................................................................................................. 21 A.2 Schematics and PCB Layout ....................................................................... 21 A.3 Board Schematic - Page 1 ........................................................................ 22 A.4 Board Schematic - Page 2 ........................................................................ 23 A.5 Board Layout - Component Layer ............................................................. 24 A.6 Board Layout - Top Layer .......................................................................... 25 A.7 Board Layout - Bottom Layer .................................................................... 26 Appendix B. Bill Of Materials (BOM) ......................................................................... 27 Appendix C. Board Testing ........................................................................................ 29 C.1 What is Tested ............................................................................................. 29 C.2 What is NOT Tested .................................................................................... 29 Appendix D. Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board ................................................ 31 D.1 demonstration using two PICDEMTM HPC Explorer Demo Boards ............. 31 (c) 2006 Microchip Technology Inc. DS51571B-page iii MCP212X Developer's Daughter Board User's Guide Appendix E. Using the MCP212X Developer's Daughter Board with the PICDEMTM FS USB Demo Board ...........................................................37 E.1 Demonstration with the PICDEM FS USB Demo Board .............................. 37 Appendix F. Configuring the HyperTerminal(R) Program ..........................................41 F.1 Configuring the Hyperterminal(R) Program .................................................... 41 Worldwide Sales and Service .....................................................................................46 DS51571B-page iv (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a "DS" number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is "DSXXXXXA", where "XXXXX" is the document number and "A" is the revision level of the document. INTRODUCTION This chapter contains general information that will be useful to know before using the MCP212X Developer's Daughter Board. Items discussed in this chapter include: * * * * * * Document Layout Conventions Used in this Guide Recommended Reading The Microchip Web Site Customer Support Document Revision History (c) 2006 Microchip Technology Inc. DS51571B-page 1 MCP212X Developer's Daughter Board User's Guide DOCUMENT LAYOUT This document describes how to use the MCP212X Developer's Daughter Board. The manual layout is as follows: * Chapter 1. "Product Overview" - Important information about the MCP212X Developer's Daughter Board. * Chapter 2. "Installation and Operation" - Includes a detailed description of each function, as well as instructions on how to get started with this daughter board. * Appendix A. "Schematic and Layouts" - Shows the schematic and layout diagrams for the MCP212X Developer's Daughter Board. * Appendix B. "Bill Of Materials (BOM)" - Lists the parts used to build the MCP212X Developer's Daughter Board. * Appendix C. "Board Testing" - Discusses the testing of the MCP212X Developer's Daughter Board in several configurations. * Appendix D. "Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board" - Shows how the MCP212X Developer's Daughter Board can be demonstrated using the PICDEMTM HPC Explorer Demo Board. * Appendix E. "Using the MCP212X Developer's Daughter Board with the PICDEMTM FS USB Demo Board" - Shows how the MCP212X Developer's Daughter Board can be demonstrated using the PICDEMTM FS USB Demo Board. * Appendix F. "Configuring the HyperTerminal(R) Program" - Shows the configuration of the HyperTerminal program used to demonstrate the MCP212X Developer's Daughter Board system. DS51571B-page 2 (c) 2006 Microchip Technology Inc. Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Represents Examples Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB(R) IDE User's Guide ...is the only compiler... the Output window the Settings dialog select Enable Programmer "Save project before build" A dialog button A tab A number in verilog format, where N is the total number of digits, R is the radix and n is a digit. A key on the keyboard Click OK Click the Power tab 4`b0010, 2`hF1 Italic Courier New Sample source code Filenames File paths Keywords Command-line options Bit values Constants A variable argument Square brackets [ ] Optional arguments Curly brackets and pipe character: { | } Ellipses... Choice of mutually exclusive arguments; an OR selection Replaces repeated text #define START autoexec.bat c:\mcc18\h _asm, _endasm, static -Opa+, -Opa0, 1 0xFF, `A' file.o, where file can be any valid filename mcc18 [options] file [options] errorlevel {0|1} Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N`Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents code supplied by user (c) 2006 Microchip Technology Inc. File>Save Press , var_name [, var_name...] void main (void) { ... } DS51571B-page 3 MCP212X Developer's Daughter Board User's Guide RECOMMENDED READING This user's guide describes how to use the MCP212X Developer's Daughter Board. The following Microchip documents are available and recommended as supplemental reference resources. MCP2122 Data Sheet (DS21894) This data sheet provides detailed information regarding the MCP2122 device. MCP2120 Data Sheet (DS21618) This data sheet provides detailed information regarding the MCP2120 device. AN946, "Interfacing the MCP2122 to Host Controller" (DS00946) This application note discusses the interface between a Host Controller and the MCP2122 device. TB073, "Selecting a MCP21XX Device for IrDA(R) Applications" (DS91073) This technical brief discusses the selection of the MCP21XX devices for IrDA(R) standard applications. AN756, "Using the MCP2120 for Infrared Communications" (DS00756) This application note discusses the encoding/decoding function of the MCP2120 as specified in the physical layer component of the IrDA(R) standard. AN923, "Using the MCP2120 Developer's Board for "IR Sniffing" (DS00923) This application note discusses how one can use the MCP2120 Developer's Board for "IR Sniffing". This technique can assist in the debugging of an IrDA(R) standard system. The following documents may be useful, depending on which PICDEMTM demo board you are using with the MCP212X Developer's Daughter Board. PIC18F8722 Family Data Sheet (DS39646) This data sheet provides detailed information regarding the PIC18F8722 device. This device is used on the PICDEMTM HPC Explorer Demo Board (DM183022). PICDEMTM 2 Plus Demo Board User's Guide (DS51275) This user's guide provides detailed information regarding the PICDEMTM 2 Plus Board (DM163022). PIC16F87XA Family Data Sheet (DS39582) This data sheet provides detailed information regarding the PIC16F87XA device. This device is used on the PICDEMTM 2 Plus Demo Board (DM163022). PICDEMTM FS USB Demonstration Board User's Guide (DS51526) This user's guide provides detailed information regarding the PICDEMTM Full-Speed USB Demo Board (DM163025). PIC18F4550 Data Sheet (DS39632) This data sheet provides detailed information regarding the PIC18F4550 device. This device is used on the PICDEMTM Full-Speed USB Demo Board (DM163025). PICDEMTM LCD Demo Board User's Guide (DS51536) This user's guide provides detailed information regarding the PICDEMTM LCD Demo Board (DM163028). PIC18F8490 Data Sheet (DS39629) This data sheet provides detailed information regarding the PIC18F8490 device. This device is used on the PICDEMTM LCD Demo Board (DM163028). DS51571B-page 4 (c) 2006 Microchip Technology Inc. Preface THE MICROCHIP WEB SITE Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: * Product Support - Data sheets and errata, application notes and sample programs, design resources, user's guides and hardware support documents, latest software releases and archived software * General Technical Support - Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing * Business of Microchip - Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: * * * * * Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Development Systems Information Line Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com DOCUMENT REVISION HISTORY Revision B (July 2006) * Add disclaimer to Bill of Materials regarding RoHS-Compliant part numbers. Revision A (August 2005) * Initial Release of this Document. (c) 2006 Microchip Technology Inc. DS51571B-page 5 MCP212X Developer's Daughter Board User's Guide NOTES: DS51571B-page 6 (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Chapter 1. Product Overview 1.1 INTRODUCTION This chapter provides an overview of the MCP212X Developer's Daughter Board and covers the following topics: * What is the MCP212X Developer's Daughter Board? * What the MCP212X Developer's Daughter Board kit includes 1.2 WHAT IS THE MCP212X DEVELOPER'S DAUGHTER BOARD? The MCP212X Developer's Daughter Board is used to evaluate and demonstrate the MCP2122 or MCP2120 IrDA(R) Standard Encoder/Decoder device. This allows the system designer to implement a low-cost, wireless IR port in any application providing support for IrDA standard bit encoding/decoding. The MCP212X Developer's Daughter Board is designed to interface to several of the "new" low-cost PICmicro(R) microcontroller-based demonstration (demo) boards, or to be interfaced into your application. Multiple header interfaces are available that allow support for the many different PICDEMTM Demo Boards, as well as being easily jumpered into systems for development purposes. Table 1-1 shows some of the PICDEM demo boards that are supported. Depending on the features of the PICmicro Microcontroller Unit (MCU) and the selected demo board, the MCP2122 TX and RX signals can either be connected (jumpered) directly to the RS-232 line driver or to the PICmicro MCU's RX and TX signals. The PICmicro MCU could process that data and then send it out of the UART. PICDEMTM DEMO BOARD SUPPORT (1) TABLE 1-1: Name Order Number TX/RX Signals to (3) Host Controller Header(s) (R) Literature # (PICmicro MCU) Host Used RS-232 Supported Controller PICDEMTM HPC Explorer Board (2) DM183022 DS51540 PIC18F8722 J1, J2 Y Y PICDEMTM LCD DM163028 DS51536 PIC18F8490 J1, J2 Y Y PICDEMTM Full-Speed USB DM163025 DS51526 PIC18F4550 J3 Y N/A PICDEMTM 2 Plus DM163022 DS51275 PIC16F877, PIC18F452 J3 Y N N/A -- -- HD1 Y -- User Embedded System Note 1: 2: 3: Other boards may also be supported. Please refer to the MCP212X Developer's Daughter Board and desired PICDEMTM Demo Board documentation to determine if the boards you are using are supported. For proper orientation of the daugter board to the PICDEMTM demo board, Revision 5 of the PICDEMTM HPC Explorer Board is recommended. Revision 4 will function, but the direction of the optical transceiver will be facing the same side as the serial port connector. The MCP212X Developer's Daughter Board allows the MCP212X TX and RX signals to be routed to different header connections. This may allow the system to support multiple configurations, such as being either connected to the PICmicro(R) MCU USART or to the RS-232 driver (allows the MCP212X to directly communicate via the DB-9 connector). (c) 2006 Microchip Technology Inc. DS51571B-page 7 MCP212X Developer's Daughter Board User's Guide 1.3 WHAT THE MCP212X DEVELOPER'S DAUGHTER BOARD KIT INCLUDES This MCP212X Developer's Daughter Board Kit includes: * The MCP212X Developer's Daughter Board (with MCP2122 installed) * A MCP2120 sample device * MCP212X Developer's Daughter Board User's Guide (Electronic version on CD-ROM) * PICDEMTM HPC Explorer Board firmware (on CD-ROM) * PICDEMTM USB Board firmware (on CD-ROM) * Analog and Interface Products Demonstration Boards CD-ROM (DS21912) DS51571B-page 8 (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Chapter 2. Installation and Operation 2.1 INTRODUCTION This chapter discusses the operation of the MCP212X Developer's Daughter Board and how it can be used in conjunction with some of Microchip's low-cost PICDEMTM Demo Boards or easily connected to your system. When the MCP212X Developer's Daughter Board is used in conjunction with one of the low-cost PICDEMTM Demo Boards, it demonstrates the implementation of an embedded system with an IrDA(R) standard physical layer interface (encoder/decoder). A second encoder/decoder system is required to demonstrate system operation. The Host UART interface includes only the TX and RX signals. A discussion of the Host UART interface is given in the following application note: * AN946, "Interfacing the MCP2122 to the Host Controller" (DS00946) (c) 2006 Microchip Technology Inc. DS51571B-page 9 MCP212X Developer's Daughter Board User's Guide 2.2 FEATURES The MCP212X Developer's Daughter Board has the following features: * Dual Header to connect to: - PICDEMTM HPC Explorer Demo Board - PICDEMTM LCD Demo Board * Header to connect to: - PICDEMTM Full-Speed USB Demo Board - PICDEMTM 2 Plus Demo Board * Header to easily connect to the user's embedded system * Installed optical transceiver circuit using: - Vishay(R) TFDU 4300 * Footprint for optional optical transceiver circuits using: - Vishay TFDU 4100 - Agilent(R) HSDL 3000 * Jumpers to select connection point (header) for the following signals: - TX - RX - 16XCLK * Jumpers to "swap" TX and RX so that the MCP2120 can directly communicate over the PICDEMTM HPC Explorer Board's DB-9 connector * Jumpers which can be used by the PICDEM demo board firmware program to determine the mode of operation * 8-pin DIP socket for the installation of the MCP2122 * 14-pin DIP socket for the installation of the MCP2120 * MCP2120's crystal is socketed to allow ease of crystal selection TABLE 2-1: PICmicro(R) MCU Demo Board Name Part # PICDEMTM DEMO BOARD SUPPORT PICmicro(R) MCU MCU MCP2122 User's Interface RX/TX direct Comment Guide Lit. # to PC access to DB9 PICDEMTM HPC DM183022 PIC18F8722 Explorer UART Yes DS51540 MCU firmware could support: * MCP2122 MCU * MCP2122 PC (UART) * MCP2122 MCU PC (UART) PICDEMTM LCD DM163028 PIC18F8490 UART Yes DS51536 MCU firmware could support: * MCP2122 MCU * MCP2122 PC (UART) * MCP2122 MCU PC (UART) DB-9 does not have CTS signal PICDEMTM DM163025 PIC18F4550 Full-Speed USB USB -- DS51526 MCU firmware could support: * MCP2122 MCU * MCP2122 MCU PC (USB) UART -- DS51275 MCU firmware could support: * MCP2122 MCU PICDEMTM 2 Plus DS51571B-page 10 DM163022 PIC16F877/ PIC18F452 (c) 2006 Microchip Technology Inc. Installation and Operation 2.3 GETTING STARTED This section presents an overview of the following system blocks: * The MCP212X Developer's Daughter Board Hardware * The MCP212X Developer's Daughter Board Firmware 2.3.1 The MCP212X Developer's Daughter Board Hardware Overview The major components for the MCP212X Developer's Daughter Board are: 1. 2. 3. 4. 5. 6. 7. 8. 9. MCP2122 device (U4). MCP2120 device socket (U1). Optical transceiver (U5 - Vishay TFDU 4300). Headers H1 and H2. Header H3. Header HD1. Jumpers to route the TX, RX and 16XCLK signals. Jumpers to select the baud rate and mode. Footprint for two different optional optical transceiver circuits (Vishay TFDU 4100 and Agilent HSDL 3000). 10. MCP2120 crystal (Y2). The MCP212X Developer's Daughter Board is assembled and tested to allow for the evaluation and demonstration of the MCP2122 or MCP2120 features. A schematic of the circuit, as well as the corresponding PCB layout, is shown in Appendix A. "Schematic and Layouts". Appendix B. "Bill Of Materials (BOM)" shows two tables; the first is the components that are installed, while the second lists the optional components that are not installed. The component layout floor plan is shown in Figure 2-1. (c) 2006 Microchip Technology Inc. DS51571B-page 11 MCP212X Developer's Daughter Board User's Guide FIGURE 2-1: DS51571B-page 12 MCP212X DEVELOPER'S DAUGHTER BOARD COMPONENT FLOOR PLAN (c) 2006 Microchip Technology Inc. Installation and Operation 2.3.2 Jumper Settings Figure 2-2 shows the component layout for the MCP212X Developer's Daughter Board and the operation of the JMP1/JP6, JMP2 and JMP3/JP7 jumpers. These jumpers determine the connections between the MCP2120's RX, TX and 16XCLK signals, as well as the header's RX, TX and 16XCLK signals. FIGURE 2-2: JMP1/JP6, JMP2 AND JMP3/JP7 CONFIGURATIONS 16XCLK Source 16XCLK is from the J1-RC2 pin 16XCLK is from the J3-RC2 pin or J3-16X (c) 2006 Microchip Technology Inc. JMP1/JP6 (RX) Selections JMP3/JP7 (TX) Selections RX to H1-RC7 (RXD) TX to H1-RC6 (TXD) RX to H2-RG2 (RX2), RX to H3-RC7 (RXD), and RX to H3-RX TX to H2-RG1 (TX2), TX to H3-RC6 (TXD), and TX to H3-TX RX to H1-RC6 (TXD) (DB-9 to PC) TX to H1-RC7 (RXD) (DB-9 to PC) DS51571B-page 13 MCP212X Developer's Daughter Board User's Guide Figure 2-3 shows the component layout for the MCP212X Developer's Daughter Board and the operation of the JP1, JP2, JP3 and JP4 jumpers. When the jumper is open, the signal is pulled high. When the jumper is shorted, the signal is pulled to ground. JP1 is connected to the header's RA0 signal, JP2 is connected to the header's RA1 signal, JP3 is connected to the header's RC0 signal and JP4 is connected to the header's RC1 signal. These signals are also connected to the MCP2120's BAUD and MODE pins. FIGURE 2-3: JP1, JP2, JP3 AND JP4 CONFIGURATIONS Baud Rate Selection JP1 JP2 JP3 9600 Baud 57600 Baud 19200 Baud 115200 Baud 38400 Baud DS51571B-page 14 Mode Selection (1) MCP212X communicates with DB-9 (PC) MCP212X communicates with PIC18F8722 Note 1: All Other Settings Not Defined This is the firmware operation for 00063 HPC.asm when used w/ the PICDEMTM HPC Explorer Demo Board. (c) 2006 Microchip Technology Inc. Installation and Operation A description of the MCP212X Developer's Daughter Board jumpers is given in Table 2-2. TABLE 2-2: Jumper # JUMPER DESCRIPTIONS AND SETTINGS Description Comment JP1A:JP2A To connect TXIR/RXIR of MCP2122 to TXD/RXD of U5 (HSDL 3000) S = TXIR/RXIR connected to TXD/RXD O = TXIR/RXIR Not connected to TXD/RXD By default not installed. JP1B:JP2B To connect TXIR/RXIR of MCP2122 to TXD/RXD of U5 (TFDU 4100) S = TXIR/RXIR connected to TXD/RXD O = TXIR/RXIR Not connected to TXD/RXD By default not installed. JP1C:JP2C To connect TXIR/RXIR of MCP2122 to TXD/RXD of U5 (TFDU 4300) S = TXIR/RXIR connected to TXD/RXD O = TXIR/RXIR Not connected to TXD/RXD JP1 Hardware control of Header RA0 signal and MCP2120 BAUD0 signal S = Signal Connected to VSS O = Signal Connected to VDD JP2 Hardware control of Header RA1 signal and MCP2120 BAUD1 signal S = Signal Connected to VSS O = Signal Connected to VDD JP3 Hardware control of Header RC0 signal and MCP2120 BAUD2 signal S = Signal Connected to VSS O = Signal Connected to VDD JP4 Hardware control of Header RC1 signal and MCP2120 MODE signal S = Signal Connected to VSS O = Signal Connected to VDD JP5 Hardware control of Header RA3 signal and MCP2120 EN signal S = Signal Connected to VSS O = Signal Connected to VDD By default not installed. PCB traces short these jumpers (bottom of PCB) JMP1 Connects MCP2120 RX signal to either Header 1's RX signal or Header 2/Header 3 RX signals Note 1 JP6 Connects MCP2120 RX signal to Header 1's TX signal Used when the MCP2120 communicates directly from the DB-9 connector. (Note 1) JMP2 Connects MCP2120 16XCLK signal to either Header 1's 16XCLK signal or to Header 2/Header 3's 16XCLK signals JMP3 Connects MCP2120 TX signal to Header 1's TX signal or Header 2/Header 3 TX signals Note 2 JP7 Connects MCP2120 TX signal to Header 1's RX signal Used when the MCP2120 communicates directly from the DB-9 connector. (Note 2) Legend: S = Jumper is shorted (Closed) O = Jumper is Open Note 1: The MCP2120's RX signal is either connected via JMP1 or JP6 (but not both at the same time). 2: The MCP2120's TX signal is either connected via JMP3 or JP7 (but not both at the same time). (c) 2006 Microchip Technology Inc. DS51571B-page 15 MCP212X Developer's Daughter Board User's Guide 2.4 MAKING A DEMO SYSTEM The MCP212X Developer's Daughter Board requires a clock source and either a Host Controller or a UART circuit. To demonstrate the board, the easiest method is to use one of the compatible PICDEMTM Demo Boards. A good choice is the PICDEMTM HPC Explorer Demo Board. This allows the MCP2120 device to interface to either: * PIC18F8722's EUSART1 * PIC18F8722's EUSART2 * PICDEMTM HPC Explorer Demo Board's DB-9 connector (MAX3232C) Additional instructions for performing a demo using the PICDEMTM HPC Explorer Demo Board are shown in Appendix D. "Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board". Appendix E. "Using the MCP212X Developer's Daughter Board with the PICDEMTM FS USB Demo Board" supplies instructions for performing a demo using the PICDEMTM FS USB Demo Board. Appendix F. "Configuring the HyperTerminal(R) Program" may be useful for configuring the HyperTerminal program on the PC. System Requirements Table 2-3 shows the requirements for a system that can be used to demonstrate the MCP212X Developer's Daughter Board. System Setup The system setup requires a PC with two serial communication ports (UARTs) and HyperTerminal, the system application program. Two PICDEMTM HPC Explorer Demo Boards and two MCP212X Daughter Boards are then needed. Note: The MCP2122 may be installed in U4, or the MCP2120 may be installed in U1. However, these devices should not be installed at the same time. Figure 2-4 shows a system block diagram. TABLE 2-3: Qty Hardware SYSTEM HARDWARE REQUIREMENTS Purpose 1 PC with 2 serial ports The PC will "talk" to each PICDEMTM HPC Explorer Demo Board (Encoder/Decoder board) via the serial port and an instance of the HyperTerminal(R) program. For consistency, COM 1 will be used to talk to the "System #1" PICDEMTM HPC Explorer Demo Board. Com 2 will be used to communicate to the "System #2" PICDEMTM HPC Explorer Demo Board. 2 Serial Cables To connect the PC serial ports to each PICDEMTM HPC Explorer Demo Board's serial port. 2 PICDEMTM HPC Explorer Boards The MCP212X Developer's Daughter Board will be installed into this board for testing. 2 MCP2120 Daughter Boards 2 2 PICDEMTM HPC Explorer Demo Used to power each of the PICDEMTM HPC Explorer Demo Boards. Board Power Supplies (9V DC) DS51571B-page 16 This board will be used to communicate with the system under test. (c) 2006 Microchip Technology Inc. Installation and Operation FIGURE 2-4: SYSTEM BLOCK DIAGRAM HyperTerminal(R) Program Window A (Com 1) HyperTerminal Program Window B (Com 2) (1) Note 1: Only required if data is communicated with the PC. Some program modes "respond" to received data (data not sent to PC). 2.4.1 Com 1 System #1 PICDEMTM HPC Explorer Demo Board plus MCP212X Daughter Boards Com 2 (1) System #2 PICDEMTM HPC Explorer Demo Board plus MCP212X Daughter Boards The PICDEMTM Demo Board Firmware Overview Two firmware programs are supplied with this board. 00063 - HPC.asm is for the PICDEMTM HPC Explorer Demo Board, while 00063 - FS USB.asm is for the PICDEMTM FS USB Demo Board. The PICDEMTM HPC Explorer Demo Board supports two modes of operation: the Direct-to-PC and Echo modes. In Direct-to-PC mode, the data byte communicates between the MCP2120 and the PICDEMTM HPC Explorer Demo Board's DB-9 connector (does not communicate with the PIC18F8722). The PIC18F8722 is only used for the 16XCLK signal (for the specified baud rate). In Echo mode, the data byte that is received is "echoed" in the opposite case (lowercase uppercase and uppercase lowercase). The PICDEMTM FS USB Demo Board only supports Echo mode. The source code for these programs are available for download from the Microchip web site (www.microchip.com), as well as being available on the CD-ROM supplied with the MCP212X Developer's Daughter Board. To use these programs, it is required that the MPLAB(R) IDE be installed on a computer and that one of Microchip's development tools are available to program the board (such as MPLAB(R) ICD 2). (c) 2006 Microchip Technology Inc. DS51571B-page 17 MCP212X Developer's Daughter Board User's Guide 2.5 MCP212X DEVELOPER'S DAUGHTER BOARD DESCRIPTION The following sections describe each element of this daughter board in further detail. 2.5.1 Power The MCP212X Developer's Daughter Board is powered by a 5V supply. This voltage supply may be sourced via the PCB headers. When the device is used in conjunction with the appropriate PICDEMTM Demo Board, the power is supplied via the connector interface. If the MCP212X Developer's Daughter Board is jumpered into an application circuit via the HD1 connector, the device power supply must be brought over as well. 2.5.2 MCP212X IrDA(R) Standard Encoder/Decoder Device This demo board highlights the MCP2122 device (U4) and MCP2120 device (U1) to demonstrate the implementation of an IR port in an embedded system application. The MCP2120 device handles the encoding/decoding of the UART/IR bit stream. Further Host Controller interface information is available in the device documentation: * MCP2122 Data Sheet, "Infrared Encoder/Decoder" (DS21894) * MCP2120 Data Sheet, "Infrared Encoder/Decoder" (DS21618) * AN946, "Interfacing the MCP2122 to the Host Controller" (DS00946) 2.5.2.1 MCP2122 OPERATION The MCP2122 (U4) implements an IrDA standard encoder/decoder. The baud rate is determined by the frequency of the 16XCLK input. The key signals for the MCP2122-to-microcontroller (Host UART) interface are shown in Table 2-4. The key signals for the MCP2122-to-IR transceiver circuit are shown in Table 2-5. TABLE 2-4: Pin Name TX MCP2122 HOST UART INTERFACE PINS Pin Pin Number Type (PDIP) Buffer Type Description TTL Asynchronous receive; from Host Controller UART 2 I RX 3 O -- 16XCLK 1 I TTL Legend: TTL = TTL compatible input I = Input TABLE 2-5: Asynchronous transmit; to Host Controller UART 16 x Clock ST = Schmitt Trigger input with CMOS levels O = Output MCP2122 IR INTERFACE PINS Pin Number (PDIP) Pin Type Buffer Type TXIR 2 O -- Asynchronous transmit to IrDA(R) standard transceiver RXIR 3 I ST Asynchronous receive from infrared transceiver Pin Name Legend: A = Analog I = Input Description P = Power O = Output In addition to the signals described in Table 2-4 and Table 2-5, the MCP2120 RESET input is connected to the RESET output of the Host Controller. DS51571B-page 18 (c) 2006 Microchip Technology Inc. Installation and Operation 2.5.2.2 MCP2120 OPERATION The MCP2120 (U1) implements an IrDA standard encoder/decoder. The baud rate is determined by the device frequency and the state of the BAUD2:BAUD0 pins. The MCP2120 also has a Software Baud Rate mode which controls the baud rate via the Host Controller software. The key signals for the MCP2120-to-microcontroller (Host UART) interface are shown in Table 2-6. The key signals for the MCP2120-to-IR transceiver circuit are shown in Table 2-7. TABLE 2-6: Pin Name MCP2120 HOST UART INTERFACE PINS Pin Pin Number Type (PDIP) Buffer Type Description TX 12 I TTL RX 11 O -- Asynchronous transmit; to Host Controller UART BAUD0 10 I TTL BAUD1 9 I TTL BAUD2:BAUD0 specifies the Baud rate of the device, or if the device operates in Software Baud Rate mode BAUD3 8 I TTL MODE 7 I TTL Legend: TTL = TTL compatible input I = Input TABLE 2-7: Asynchronous receive; from Host Controller UART Selects the device mode (Data/Command) for Software Baud Rate operation ST = Schmitt Trigger input with CMOS levels O = Output MCP2120 IR INTERFACE PINS Pin Number (PDIP) Pin Type Buffer Type TXIR 6 O -- Asynchronous transmit to IrDA(R) standard transceiver RXIR 5 I ST Asynchronous receive from an infrared transceiver Pin Name Legend: A = Analog I = Input Description P = Power O = Output In addition to the signals described in Table 2-6 and Table 2-7, the MCP2120 RESET input is connected to the RESET output of the Host Controller. The EN input can be either hard-wired or controlled by the Host Controller. (c) 2006 Microchip Technology Inc. DS51571B-page 19 MCP212X Developer's Daughter Board User's Guide 2.5.3 IR Transceiver Circuit The IR transceiver circuit uses a Vishay(R) TFDU 4300 integrated optical transceiver. Footprints for an optional optical transceiver are implemented. These footprints are for the Vishay TFDU 4100 and the Agilent(R) HSDL-3000. Jumpers are used to allow all three implementations to be installed, but with only one connected to the MCP2120 TXIR and RXIR pins. 2.5.4 Signal Header To allow easy access to many of the system signals, a header (HD1) was placed on one of the edges of the board. This allows the signals from the MCP2120 to be easily accessed and connected into an existing application for initial development or proof-of-concept. FIGURE 2-5: 14-PIN SIGNAL INTERFACE HEADER HD1 RXIR TXIR NC 16XCLK TX RX RESET RA3 RA1 RA0 RC1 RC0 VDD VSS HD1 DS51571B-page 20 (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix A. Schematic and Layouts A.1 INTRODUCTION This appendix contains the following schematics and layouts for the MCP212X Developer's Daughter Board: * * * * * A.2 Board Schematic - Headers and Jumpers Board Schematic - Circuitry Board - Component Layer Board - Top Layer Board - Bottom Layer SCHEMATICS AND PCB LAYOUT The layer order is shown in Figure A-1. FIGURE A-1: LAYER ORDER Top Layer Bottom Layer (c) 2006 Microchip Technology Inc. DS51571B-page 21 MCP212X Developer's Daughter Board User's Guide A.3 BOARD SCHEMATIC - PAGE 1 M PICDEMTM 2+ PICtailTM Daughter Board PICtailTM Daughter Board DS51571B-page 22 (c) 2006 Microchip Technology Inc. Schematic and Layouts BOARD SCHEMATIC - PAGE 2 (c) 2006 Microchip Technology Inc. 8 9 BAUD2 7 MODE 10 BAUD1 6 TXIR RX 11 BAUD0 5 RXIR 4 R E SE T 13 TX 12 EN 3 OSC2 2 OSC1/CLKI 1 VDD VSS 14 M A.4 DS51571B-page 23 MCP212X Developer's Daughter Board User's Guide A.5 BOARD LAYOUT - COMPONENT LAYER DS51571B-page 24 (c) 2006 Microchip Technology Inc. Schematic and Layouts A.6 BOARD LAYOUT - TOP LAYER (c) 2006 Microchip Technology Inc. DS51571B-page 25 MCP212X Developer's Daughter Board User's Guide A.7 BOARD LAYOUT - BOTTOM LAYER DS51571B-page 26 (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix B. Bill Of Materials (BOM) The MCP212X Developer's Daughter Board allows the MCP2120 or MCP2122 device to be evaluated. The board also allows the customer to evaluate the operation of one of three optical tranceiver devices. Table B-1 shows the components that are installed in the MCP212X Developer's Daughter Board PCB, while Table B-2 shows the components that are NOT installed on the MCP212X Developer's Daughter Board PCB. TABLE B-1: Qty BOM - COMPONENTS INSTALLED Reference Description Manufacturer Part Number 4 C1, C2, C11, C13 0.1 F (SMT) Panasonic(R) 2 C3, C4 18 pF (SMT) Yageo America 0805CG180J9B200 2 C10, C12 4.7 F/16V (SMT) Panasonic - ECG ECS-T1AY475R 1 H1, H3 2x14 Male connector Header Jameco Valuepro 2012-254-2X14SG 1 H2 2x10 Male connector Header Jameco Valuepro 7000-2X10SG 1 HD1 1x14 Male connector Header Jameco Valuepro 7000-1x14SG 3 JMP1, JMP2, JMP3 1x3 Jumper Stakes (Male) Jameco Valuepro 7000-1x3SG 7 JP1, JP2, JP3, JP4, 1x2 Jumper Stakes (Male) JP5, JP6, JP7 Jameco Valuepro 7000-1x2SG 2 R1, R3 10 k (SMT) Panasonic - ECG ERJ-6ENF1002V 4 R5, R6, R7, R18 100 k (SMT) Panasonic - ECG ERJ-6ENF1003V 1 R12 47 (SMT) Panasonic - ECG ERJ-6ENF47R5V 1 U1 14-pin DIP Socket Microchip Technology Inc. 1 U4 8-pin DIP Socket Jameco Valuepro 6100-14 MCP2122 (provided) Jameco Valuepro 6100-8 1 U5 TFDU-4300 Microchip Technology Inc. 2 Y1 Crystal Sockets pin Manufacturing Corp 0667-0-15-01-30-27-10-0 7.3728 MHz Crystal (Through hole) CTS Frequency Controls MP073 1 1 - ECG 1 -- PCB 105-00063 (R2 or greater) Microchip Technology Inc. 8 -- Jumper Shunt (used on JP1, JP2, JP3, JP4, JP5, JP6, JP7 and JMP2) Jameco Valuepro Note 1: ECJ-2VB1C104K 2012JH The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. (c) 2006 Microchip Technology Inc. DS51571B-page 27 MCP212X Developer's Daughter Board User's Guide TABLE B-2: Qty 0 BOM - OPTIONAL COMPONENTS, NOT INSTALLED Reference C6 Description Manufacturer Part Number 0.47 F (SMT) 0 C7 6.8 F Tantalium (SMT) 0 C8 4.7 F/16V (SMT) 0 C9 0.1 F (SMT) 0 JP1A, JP1B, JP1C, 1x2 Jumper Stakes (Male) JP2A, JP2B, JP2C 0 R8 6.8 (SMT) 0 R9 14 (SMT) Panasonic - ECG ECJ-2VB1C104K Jameco Valuepro 7000-1x2SG 0 R10 47 (SMT) 0 R11 0 (SMT) 1 U1 MCP2120 (In the Sample Pack) Microchip Technology Inc. MCP2120-I/P 0 U2 HSDL-3000 Agilent(R) HSDL-3000 (R) TFDU-4100 0 U3 TFDU-4100 Vishay 0 -- Jumper Shunt (used on JP1A and JP2A, or JP1B and JP2B, or JP1C and JP2C) Jameco Valuepro DS51571B-page 28 2012JH (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix C. Board Testing The MCP212X Developer's Daughter Board can be used in multiple configurations. Only a subset of these configurations will be tested. The tests were performed at 9600 baud. Other baud rates were not tested. TABLE C-1: MCP212X DEVELOPER'S DAUGHTER BOARD TESTED CONFIGURATIONS JP3:JP2:JP1 JP4 JP5 JMP1/JP6 JMP3/JP7 JMP2 (MCP212x RX (MCP212x TX Comment (16XCLK) Destination) Destination) S:S:S O S 2-3 2-3 (JMP1) 2-3 (JMP3) 9600 baud, MCP2122 to PIC18F8772 UART2 on Header 2 (Echo mode) S:S:S S S 2-3 S (JP6) S (JP7) 9600 baud, MCP2122 to DB9 (PC) on Header 1 Legend: O = Jumper is "Open" S = Jumper is "Shorted" 1-2 = Pin 1 is shorted to Pin 2 (of 3 pin header) 2-3 = Pin 2 is shorted to Pin 3 (of 3 pin header) C.1 WHAT IS TESTED The following portions of the board are tested: * * * * * * * * C.2 MCP2122 TFDU-4300 and circuitry Header 1 - TXD and RXD signals Header 1 - 16XCLK signal Header 2 - TX2 and RX2 signals JP4 JP6 JP7 WHAT IS NOT TESTED The following portions of the board are NOT tested: * * * * * * * * * MCP2120 and crystal circuitry TFDU-4100 and circuitry HSDL-3000 and circuitry Header 3 JP1, JP2, JP3 and JP5 JMP2 (P1 - P2) JMP1 (P1 - P2) JMP3 (P1 - P2) Header HD1 (c) 2006 Microchip Technology Inc. DS51571B-page 29 MCP212X Developer's Daughter Board User's Guide NOTES: DS51571B-page 30 (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix D. Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board D.1 DEMONSTRATION USING TWO PICDEMTM HPC EXPLORER DEMO BOARDS To perform a demonstration of the MCP212X Developer's Daughter Board, two systems are needed. Each system is a MCP212X Developer's Daughter Board (MCP212XEV-DB) plus the PICDEMTM HPC Explorer Demo Board (DM183022). Figure D-1 shows a block diagram of the demonstation system. FIGURE D-1: SYSTEM BLOCK DIAGRAM HyperTerminal(R) Program Window A (Com 1) HyperTerminal Program Window B (Com 2) Com 1 System #1 PICDEMTM HPC Explorer Demo Board plus MCP212X Developer's Daughter Boards Com 2 System #2 PICDEMTM HPC Explorer Demo Board plus MCP212X Developer's Daughter Boards The firmware for these demos is available on the Microchip web site, as well as on the AIPD Evaluation Board CD-ROM. The filename is 00063 - HPC.asm. This code must be programmed into the PICDEMTM HPC Explorer Demo Board's PIC18F8722 for demo operation. This code supports two demos. The demo executed is dependent on the state of the JP4 jumper. Note: (c) 2006 Microchip Technology Inc. Other PICDEMTM Demo Boards may be used, but appropriate firmware needs to be installed to demonstrate the system. DS51571B-page 31 MCP212X Developer's Daughter Board User's Guide The crystal frequency of the PICDEMTM Demo Board determines the error rates for the EUSART baud rates, as well as the 16XCLK generation (for the MCP2122). So for the PICDEMTM HPC Explorer Demo Board, the default crystal is 10 MHz (does have a 4x PLL). Therefore, the 16XCLK frequency for 115200 baud has an error outside usable limits for IrDA(R) standard communication for both 10 MHz and 40 MHz operation (see Table D-1). The demo will be limited to 9600 baud. Table D-2 shows the SPBRG values for the EUSART at the same crystal frequencies. PR VALUES FOR PWM(1) TABLE D-1: Desired Baud Rate 9600 @ 40 MHz(2) 16XCLK 153,600 @ 20 MHz(2) @ 14.759 MHz(2) @ 10 MHz(2) PR(3) %Error PR(3) %Error PR(3) %Error PR(3) %Error 64 -0.16% 32 1.36% 23 0% 15 -1.73% 19200 307,200 32 1.36% 15 -1.73% 11 0% 7 -1.73% 38400 614,400 15 -1.73% 7 -1.73% 5 0% 3 -1.73% 57600 921,600 10 1.36% 4 -8.51% 3 0% 2 9.58% 115200 1,843,200 4 -8.51% 2 -35.6% 1 0% 1 32.18% Note 1: Shaded values indicate a % error that is larger than should be used. 2: The following shows the PICDEMTM Demo Board device frequencies: PICDEMTM HPC Explorer Demo Board has a 10 MHz crystal installed (4xPLL -> 40 MHz). PICDEMTM FS USB Demo Board has a 20 MHz crystal installed. PICDEMTM 2 Plus Demo Board has a 4 MHz crystal installed. PICDEMTM LCD has a socket for an external canned oscillator (also has an internal 8 MHz RC). 3: CCP Duty Cycle should be approximately 50% of the PR value. SPBRG VALUES FOR EUSART(1) TABLE D-2: Desired Baud Rate @ 40 MHz(2) @ 20 MHz(2) @ 14.759 MHz(2) @ 10 MHz(2) SPBRG(3) %Error SPBRG(3) %Error SPBRG(3) %Error SPBRG(3) %Error 9600 225 -1.73% 129 -0.16% 95 0% 64 -0.16% 19200 129 -0.16% 64 -0.16% 47 0% 32 1.36% 38400 64 -0.16% 32 1.36% 23 0% 15 -1.73% 57600 42 -0.94% 21 1.36% 15 0% 10 1.36% 115200 21 1.36% 10 1.36% 7 0% 4 -8.51% Note 1: Shaded values indicate a % error that is larger than should be used. 2: The following shows the PICDEMTM Demo Board device frequencies: PICDEMTM HPC Explorer Demo Board has a 10 MHz crystal installed (4xPLL -> 40 MHz). PICDEMTM FS USB Demo Board has a 20 MHz crystal installed. PICDEMTM 2 Plus Demo Board has a 4 MHz crystal installed. PICDEMTM LCD has a socket for an external canned oscillator (also has an internal 8 MHz RC). 3: SYNC = 0, BRGH = 1, BRG16 = 0. DS51571B-page 32 (c) 2006 Microchip Technology Inc. Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board D.1.1 Demo #1 Operation In Demo #1, the MCP212X Developer's Daughter Board will communicate directly to the PICDEMTM HPC Explorer Demo Board's DB-9 connector (and then to the PC). The PICDEMTM HPC Explorer Demo Board is used to determine the communication baud rate (9600) via the JP3, JP2 and JP1 jumper states. Given this state, the PICmicro(R) MCU can then supply the 16XCLK frequency to the MCP2122. Power is supplied over the J1 and J2 interface headers. Jumper JP4 is used to select which demonstration program to run. Figure D-2 shows the jumper configuration for Demo #1. FIGURE D-2: DEMO #1 CONFIGURATION (c) 2006 Microchip Technology Inc. DS51571B-page 33 MCP212X Developer's Daughter Board User's Guide Table D-3 shows the steps for Demo #1 operation. TABLE D-3: DEMO #1 STEPS Step Action Result 1 -- 2 3 4 5 6 7 8 9 10 11 12 13 14 Place both devices on a flat surface about 25 cm (10") apart, with the IR ports facing each other. On the System #1 Unit: The jumpers must be configured as in Figure D-3. On the System #1 Unit: Apply power to the unit via the 9V power supply. On the System #1 Unit: Connect the PC serial port cable that is connected to COM1. On the System #2 Unit: Insert the MCP212X Developer's Daughter Board into the PICDEMTM HPC Explorer Demo Board. Ensure that the jumpers are configured as in Figure D-2. On the System #2 Unit: Apply power to the unit via the 9V power supply. On the System #2 Unit: Connect the PC serial port cable that is connected to COM2. On the System #1 Unit: Depress and release Switch 2 (S2 - MCLR). On the System #2 Unit: Depress and release Switch 2 (S2 - MCLR). On the PC: Open the HyperTerminal(R) program window for COM 1. Ensure that the window indicates that the HyperTerminal program is connected. On the PC: In the HyperTerminal program COM1 window, type alpha-numeric characters (such as "123456 asdfg"). -- On the System #1 Unit: The green power LED (D) will turn on. -- Test unit will echo the received Alpha character (changing the case; upper to lower and lower to upper). On the System #2 Unit: The green power LED (D) will turn on. -- -- -- -- On the PC: In the HyperTerminal program COM 2 window, the same characters should be displayed ("123456 asdfg"). On the PC: On the PC: In the HyperTerminal program COM2 window, depress In the HyperTerminal program COM 1 window, the the Return key and type alpha-numeric characters same characters should be displayed ("7890 hjkl;") on (such as "7890 hjkl;"). the line below the "123456 asdfg" characters. On the System #2 Unit: -- Power-down the board and remove the tested MCP212x Daughter Board. Go to Step #5 -- DS51571B-page 34 (c) 2006 Microchip Technology Inc. Using the MCP212X Developer's Daughter Board with the PICDEMTM HPC Explorer Demo Board D.1.2 Demo #2 Operation In Demo #2, the System 2 unit will echo any alpha character received, changing the case of the character (lowercase to uppercase/uppercase to lowercase). The System 1 unit is connected to the PC, while the System 2 unit is not connected, though it still needs to be powered. The PICDEMTM HPC Explorer Demo Board is used to determine the communication baud rate (9600) via the JP3, JP2 and JP1 jumper states. Given this state, the PICmicro(R) MCU can then supply the 16XCLK frequency to the MCP2122. Power is supplied over the J1 and J2 interface headers. Jumper JP4 is used to select which demo program to run. Figure D-3 shows the jumper configuration for Demo #2. Table D-3 shows the steps for Demo #2. FIGURE D-3: DEMO #2 CONFIGURATION (c) 2006 Microchip Technology Inc. DS51571B-page 35 MCP212X Developer's Daughter Board User's Guide TABLE D-4: DEMO #2 STEPS Step Action Result 1 -- 2 3 4 5 6 7 8 9 10 11 12 13 Place both devices on a flat surface about 25 cm (10") apart, and with the IR ports facing each other. On the System #1 Unit: The jumpers must be configured as in Figure D-3. On the System #1 Unit: Apply power to the unit via the 9V power supply. On the System #1 Unit: Connect the PC serial port cable that is connected to COM1. On the System #2 Unit: Insert the MCP212X Developer's Daughter Board into the PICDEMTM HPC Explorer Demo Board. Ensure that the jumpers are configured as in Figure D-2. On the System #2 Unit: Apply power to the unit via the 9V power supply. On the System #1 Unit: Depress and release Switch 2 (S2 - MCLR). On the System #2 Unit: Depress and release Switch 2 (S2 - MCLR). On the PC: Open the HyperTerminal(R) program window for COM 1. Ensure that the window indicates that the HyperTerminal program is connected On the PC: In the HyperTerminal program window, type an "a". On the PC: Type some additional alpha characters into the HyperTerminal program window. On the System #2 Unit: Power down the board and remove the tested MCP212X Developer's Daughter Board. Go to Step #5 DS51571B-page 36 -- On the System #1 Unit: The green power LED (D) will turn on. -- Test unit will echo the received Alpha character (changing the case; uppercase to lowercase and lowercase to uppercase) On the System #2 Unit: The green power LED (D) will turn on. -- -- -- On the PC: The HyperTerminal window will display an "aA". On the PC: The typed alpha character will echo where the case has changed; lowercase -> uppercase and uppercase -> lowercase. -- -- (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix E. Using the MCP212X Developer's Daughter Board with the PICDEMTM FS USB Demo Board E.1 DEMONSTRATION WITH THE PICDEM FS USB DEMO BOARD To perform a demonstration of the MCP212X, two systems are needed. One system will operate as an encoder/decoder passing information to the PC. This system may be either the: * MCP212X Developer's Daughter Board (MCP212XEV-DB) plus the PICDEMTM HPC Explorer Demo Board (DM183022) or * MCP2120 Developer's Board (DM163008) The second system is a MCP212X Developer's Daughter Board (MCP212XEV-DB) plus the PICDEMTM FS USB Demo Board (DM163025). This system operates in a stand-alone mode and will "echo" the characters it receives (changing the case of the received alpha character). Figure E-1 shows a block diagram of the demonstration system. FIGURE E-1: SYSTEM BLOCK DIAGRAM HyperTerminal(R) Program Window A (Com 1) Com 1 System #1 PICDEMTM HPC Explorer Demo Board + MCP212X Developer's Daughter Boards System #2 PICDEMTM FS USB Demo Board + MCP212X Developer's Daughter Boards The firmware for these demos is available on the Microchip web site, as well as on the AIPD Evaluation Board CD-ROM. The file name is 00063 - FS USB.asm. This code must be programmed into the PICDEMTM FS USB Demo Board's PIC18F4550 for demo operation. This code requires the JP4 jumper to be in the documented state. Note: (c) 2006 Microchip Technology Inc. Other PICDEMTM Demo Boards may be used, but appropriate firmware needs to be installed to demonstrate the system. DS51571B-page 37 MCP212X Developer's Daughter Board User's Guide The crystal frequency of the PICDEMTM Demo Board determines the error rates for the EUSART baud rates, as well as the 16XCLK generation (for the MCP2122). So, for the PICDEMTM FS USB Demo Board, the default crystal is 20 MHz. The 16XCLK frequency for 115200 and 57600 baud has an error outside usable limits for IrDA(R) standard communication for 20 MHz operation (see Table E-1). Therefore, the demo will be limited to 9600 baud. Table E-2 shows the SPBRG values for the EUSART at the same crystal frequencies. PR VALUES FOR PWM(1) TABLE E-1: Desired Baud Rate 9600 @ 40 MHz(2) 16XCLK 153,600 @ 20 MHz(2) @ 14.759 MHz(2) @ 10 MHz(2) PR(3) %Error PR(3) %Error PR(3) %Error PR(3) %Error 64 -0.16% 32 1.36% 23 0% 15 -1.73% 19200 307,200 32 1.36% 15 -1.73% 11 0% 7 -1.73% 38400 614,400 15 -1.73% 7 -1.73% 5 0% 3 -1.73% 57600 921,600 10 1.36% 4 -8.51% 3 0% 2 9.58% 115200 1,843,200 4 -8.51% 2 -35.6% 1 0% 1 32.18% Note 1: Shaded values indicate a % error that is larger then should be used. 2: The following shows the PICDEMTM Demo Board device frequencies: PICDEMTM HPC Explorer Demo Board has a 10 MHz crystal installed (4xPLL -> 40 MHz), PICDEMTM FS USB Demo Board has a 20 MHz crystal installed, PICDEMTM 2 Plus Demo Board has a 4 MHz crystal installed, PICDEMTM LCD has a socket for an external canned oscillator (also has an internal 8 MHz RC). 3: CCP duty cycle should be approximately 50% of the PR value. SPBRG VALUES FOR EUSART(1) TABLE E-2: Desired Baud Rate @ 40 MHz(2) @ 20 MHz(2) @ 14.759 MHz(2) @ 10 MHz(2) SPBRG(3) %Error SPBRG(3) %Error SPBRG(3) %Error SPBRG(3) %Error 9600 225 -1.73% 129 -0.16% 95 0% 64 -0.16% 19200 129 -0.16% 64 -0.16% 47 0% 32 1.36% 38400 64 -0.16% 32 1.36% 23 0% 15 -1.73% 57600 42 -0.94% 21 1.36% 15 0% 10 1.36% 115200 21 1.36% 10 1.36% 7 0% 4 -8.51% Note 1: Shaded values indicate a % error that is larger then should be used. 2: The following shows the PICDEMTM Demo Board device frequencies: PICDEMTM HPC Explorer Demo Board has a 10 MHz crystal installed (4xPLL -> 40 MHz), PICDEMTM FS USB Demo Board has a 20 MHz crystal installed, PICDEMTM 2 Plus Demo Board has a 4 MHz crystal installed, PICDEMTM LCD has a socket for an external canned oscillator (also has an internal 8 MHz RC). 3: SYNC = 0, BRGH = 1, BRG16 = 0. DS51571B-page 38 (c) 2006 Microchip Technology Inc. Using the MCP212X Developer's Daughter Board with the PICDEMTM FS USB Demo Board E.1.1 Demo #1 Operation In Demo #1, the System 2 unit will echo any alpha character received, changing the case of the character (lowercase to uppercase/uppercase to lowercase). The System 1 unit is connected to the PC, while the System 2 unit is not connected, though it still needs to be powered. The PICDEMTM FS USB Demo Board is used to determine the communication baud rate (9600) via the JP3, JP2 and JP1 jumper states. Given this state, the PICmicro(R) MCU can then supply the 16XCLK frequency to the MCP2122. Power is supplied over the J3 interface header. Jumper JP4 is used to select which demo program to run. Figure E-2 shows the jumper configuration for Demo #1. Table E-3 shows the steps for Demo #1. FIGURE E-2: TABLE E-3: DEMO #1 CONFIGURATION DEMO #1 TEST STEPS Step Action 1 Result Place both devices on a flat surface about 25 cm (10") -- apart, with the IR ports facing each other. (c) 2006 Microchip Technology Inc. DS51571B-page 39 MCP212X Developer's Daughter Board User's Guide TABLE E-3: DEMO #1 TEST STEPS Step Action Result 2 -- 3 4 5 6 7 8 9 10 On the System #1 Unit: The jumpers must be configured as in Figure E-2. On the System #1 Unit: Apply power to the unit via the 9V power supply. On the System #1 Unit: Connect the PC serial port cable that is connected to COM1. On the System #2: Insert the MCP212X Developer's Daughter Board into the PICDEMTM HPC Explorer Demo Board. Ensure that the jumpers are configured as shown in Figure E-2. On the System #2: Apply power to the unit via the 9V power supply. On the System #1 Unit: Depress and release Switch 2 (S2 - MCLR). On the System #2: Depress and release Switch 2 (S2 - MCLR). On the PC: Open the HyperTerminal(R) program window for COM 1. Ensure that the window indicates that the HyperTerminal program is connected. On the PC: In the HyperTerminal program window, type an "a". 11 On the PC: Type some additional alpha characters in the HyperTerminal program window. 12 On the System #2: Power down the board and remove the tested MCP212X Developer's Daughter Board. Go to Step #5 13 DS51571B-page 40 On the System #1 Unit: The green power LED (D) will turn on. -- System #2 will echo the received alpha character (changing the case; uppercase to lowercase and lowercase to uppercase). On the System #2: The green power LED (D) will turn on. -- -- -- On the PC: The HyperTerminal program window will display an "aA". On the PC: The typed alpha character will echo where the case has changed; lowercase -> uppercase and uppercase -> lowercase. -- -- (c) 2006 Microchip Technology Inc. MCP212X DEVELOPER'S DAUGHTER BOARD USER'S GUIDE Appendix F. Configuring the HyperTerminal(R) Program F.1 CONFIGURING THE HyperTerminal(R) PROGRAM To ensure that the PC is able to communicate to the PICDEMTM HPC Explorer Demo Board, the HyperTerminal program must be properly configured. This section describes the configuration that the HyperTerminal program should be in. The screen-shots shown in Figure F-1 through Figure F-6 show the settings of the HyperTerminal program in the Windows(R) operating system. You should save each configuration of the HyperTerminal program in order to easily distinguish which HyperTerminal program window is "tacking" with which PICDEMTM HPC Explorer Board. After opening the HyperTerminal program window, select Call -> Disconnect. In the lower-left corner, the HyperTerminal program window will indicate "Disconnected". Next, in the HyperTerminal program window, select File -> Properties. The window in Figure F-2 is shown. Ensure that the appropriate COM port is selected for both the "Golden" unit and the "Testing" unit. Then select the Configure button. FIGURE F-1: (c) 2006 Microchip Technology Inc. HyperTerminal(R) PROGRAM MAIN WINDOW DS51571B-page 41 MCP212X Developer's Daughter Board User's Guide FIGURE F-2: HyperTerminal(R) PROGRAM PROPERTIES CONNECT TO WINDOW This will open up the Port Settings window. The port settings should be configured as shown in Figure F-3. After configuring the port settings, select OK. The Figure F-2 window will be shown. Select the Settings tab. FIGURE F-3: DS51571B-page 42 HyperTerminal(R) PROGRAM PROPERTIES CONFIGURATION WINDOW (c) 2006 Microchip Technology Inc. Configuring the HyperTerminal(R) Program The window will now look as shown in Figure F-4. Ensure that your settings match the settings shown. Select the ASCII Setup button. This will open the ASCII Setup window (Figure F-5). FIGURE F-4: HyperTerminal(R) PROGRAM PROPERTIES SETTINGS WINDOW Ensure that your settings match the settings shown. Select the OK button. The window in Figure F-4 will again be shown. Select the Input Translation button. This will open the Translation Button window (Figure F-6). Click OK and close each window. After these "property" windows are closed, you may wish to save each configuration with a name that you can remember (one for COM1 and the other for COM2). FIGURE F-5: (c) 2006 Microchip Technology Inc. HyperTerminal(R) PROGRAM ASCII SETUP WINDOW DS51571B-page 43 MCP212X Developer's Daughter Board User's Guide FIGURE F-6: DS51571B-page 44 HyperTerminal(R) PROGRAM INPUT TRANSLATION WINDOW (c) 2006 Microchip Technology Inc. Configuring the HyperTerminal(R) Program NOTES: (c) 2006 Microchip Technology Inc. DS51571B-page 45 WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Habour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 India - Bangalore Tel: 91-80-4182-8400 Fax: 91-80-4182-8422 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Austria - Wels Tel: 43-7242-2244-3910 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Atlanta Alpharetta, GA Tel: 770-640-0034 Fax: 770-640-0307 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8676-6200 Fax: 86-28-8676-6599 Korea - Gumi Tel: 82-54-473-4301 Fax: 82-54-473-4302 China - Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 Malaysia - Penang Tel: 60-4-646-8870 Fax: 60-4-646-5086 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Taiwan - Hsin Chu Tel: 886-3-572-9526 Fax: 886-3-572-6459 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 China - Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 China - Xian Tel: 86-29-8833-7250 Fax: 86-29-8833-7256 07/21/06 DS51571B-page 46 (c) 2006 Microchip Technology Inc. Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Microchip: MCP212XEV-DB