MCP2120/22 Developer’s Board User’s Guide © 2009 Microchip Technology Inc.
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.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Table of Contents Preface ........................................................................................................................... 1 Introduction............................................................................................................ 1 Document Layout .................................................................................................. 2 Conventions Used in this Guide ...............................................
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page iv © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S 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.
MCP2120/22 Developer’s Board User’s Guide DOCUMENT LAYOUT This document describes how to use the MCP2120/22 Developer’s Board. The manual layout is as follows: • Chapter 1. “Product Overview” – Important information about the MCP2120/22 Developer’s Board. • Chapter 2. “Installation and Operation” – Includes instructions on how to get started with this user’s guide and a description of the user’s guide. • Appendix A.
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® IDE User’s Guide ...is the only compiler...
MCP2120/22 Developer’s Board User’s Guide RECOMMENDED READING This user's guide describes how to use MCP2120/22 Developer’s Board. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. MCP2120 Data Sheet, “Infrared Encoder/Decoder”, DS21618 MCP2122 Data Sheet, “Infrared Encoder/Decoder”, DS21894 These data sheets provide detailed information regarding the MCP2120 and MCP2122 product families.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Chapter 1. Product Overview 1.1 INTRODUCTION AND HIGHLIGHTS This chapter provides an overview of the MCP2120/22 Developer’s Boards’ features, the system configurations that they can be used in and the system requirements for the tutorials. Items discussed in this chapter are: • • • • 1.
MCP2120/22 Developer’s Board User’s Guide 1.3 MCP2120/22 DEVELOPER’S BOARD FEATURES The MCP2120/22 Developer’s Board has five functional blocks. These are: • • • • • Power Host Microcontroller MCP212X Device (MCP2120 or MCP2122) Optical Transceiver circuitry RS-232 circuitry/interface The MCP2120/22 Developer’s Board power can come from either the USB connection or the power test points. The USB power is regulated to 3.3V, due to requirements from the PIC18F65J50.
Product Overview The MCP2120/22 Developer’s Board, as shown in Figure 1-1, has the following hardware features: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Mini USB connector (for powering the board). Onboard +3.3V regulator for powering PIC18F65J50. Hooks for an external regulated DC supply. Jumper to issolate PIC18F65J50 power signal from the rest of board power. This allows the board to operate at voltages higher than 3.3V.
MCP2120/22 Developer’s Board User’s Guide FIGURE 1-1: MCP2120/22 DEVELOPER’S BOARD HARDWARE 11 12 14 2 13 BOARD EDGE 1 7 8 4 17 5 15 9 DS51842A-page 8 3 16 6 18 10 © 2009 Microchip Technology Inc.
Product Overview 1.3.1 Selecting Clock Source, Power Source, and Optical Transceiver Interface Jumper Descriptions Figure 1-2 shows the jumpers used to control the clock source, the power source, and the optical transceiver used. Jumper JP1 connects the generated clock signal from the PIC18F65J50’s ECCP1 pin to the MCP2120’s OSC2 pin. This allows the board not to need the MCP2120’s crystal circuitry. Jumper JP2 connects the board’s two power planes.
MCP2120/22 Developer’s Board User’s Guide FIGURE 1-3: MCP2120/22 CONTROL SIGNALS BOARD EDGE This jumper selects the source of the MCP2120/22’s MODE signal This jumper selects the source of the MCP2120/22’s Reset signal JMP7 JMP5 MODE signal driven from DB-9 interface MODE signal driven from PIC18’s RB1 pin DS51842A-page 10 MCP2120/22 RST signal driven from DB-9 interface MCP2120/22 RST signal driven from PIC18’s RB0 pin © 2009 Microchip Technology Inc.
Product Overview 1.3.2 Host UART Interface Connection Jumper Descriptions Figure 1-4 shows the five jumpers used to control the connection of the MCP2120/22’s Host UART signals.
MCP2120/22 Developer’s Board User’s Guide 1.3.3 Firmware Program Jumper Descriptions for MCP2122 Figure 1-5 shows the MCP2122 JMP6 program setting for the MCP2120/22 board. FIGURE 1-5: MCP2122 JMP6 FIRMWARE OPERATION BOARD EDGE Jumper to specify operation of PIC18F65J50 firmware JMP6 0 1 2 3 4 5 Device: MCP2122 6 7 N.A.
Product Overview 1.3.4 Firmware Program Jumper Descriptions for MCP2120 Figure 1-5 shows the MCP2120 JMP6 program setting for the MCP2120/22 DM board. FIGURE 1-6: MCP2120 JMP6 FIRMWARE OPERATION BOARD EDGE Jumper to specify operation of PIC18F65J50 firmware JMP6 0 1 2 3 4 5 6 7 Device: MCP2120 Baud Rate Program Clock Source 9600 Baud Reserved Crystal (7.
MCP2120/22 Developer’s Board User’s Guide 1.4 PC REQUIREMENTS The PC used has four main requirements. These are: 1. 2. 3. 4. Standard serial port USB port (to power the MCP2120/22 Developer’s Board) Terminal emulation program (such as HyperTerminal) IrDA standard driver installed, which treats the IR port as a virtual serial port A non-legacy-free Intel® compatible model with Windows Operating System (OS) would meet these requirements.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Chapter 2. Installation and Operation 2.1 INTRODUCTION To demonstrate the operation of the MCP2120/22 Developer’s Board, a second Encoder/Decoder board (MCP212XDM, MCP212XEV-DB plus PICDem Board, or the MCP2120 Developer’s Board from the MCP2120/50 Developer’s Kit (DM163008)) is required. The MCP2120/22 Developer’s Board default firmware program can be used with either the MCP2122 (default device) or the MCP2120.
MCP2120/22 Developer’s Board User’s Guide 2.2 THE DEMO SYSTEM The demo system setup requires two encoder/decoders. This can be two MCP2120/22 Developer’s Boards or one MCP2120/22 Developer’s Board and another encoder/decoder device (such as an USB to IR port dongle with appropriate drivers). The MCP2120/22 Developer’s Board can be powered by one of two sources: • The USB sourced power • The Power supply test points For the demo descriptions, the board will be powered via USB.
Installation and Operation TABLE 2-2: MODE 7 3 X 1 1 0 0 0 MCP2122 AND MCP2120 BAUD RATE SELECTION MCP2122 Baud MCP2120 Comment Baud 1 1 1 1,843,200 115,200 Note 1 Designed for use with MCP2122 only 1 1 0 921,600 57,600 Note 1 Designed for use with MCP2122 only 1 0 1 460,800 28,800 Note 1 Designed for use with MCP2122 only 100 — Reserved Note 1 Designed for use with MCP2122 only 011 — Reserved Note 1 Designed for use with MCP2122 only 0 1 0 614,400 38,400 Note 1 Designed for use w
MCP2120/22 Developer’s Board User’s Guide TABLE 2-3: MCP212XDM FIRMWARE PROGRAM SELECTION MODE Program Comment 1 Generate Clock only (determined by RD0:RD2) MCP2122 uses PIC 16XCLK 0 No Clock Generation MCP2120 uses Crystal Generate Clock only (determined by RD0:RD2) MCP2122 uses PIC 16XCLK Generate Clock only (@ 3.
Installation and Operation 2.2.1.3 FIRMWARE OPERATION - No Clock Generation The PIC firmware reads the state of the RD7 and RD3 signals. If the signals indicate that the device is the MCP2120 and to use a crystal as the clock source, then the PIC will control the state of the MCP2120’s MODE2:0 pins based on the state of the RD2:0 signals. This mode requires that the MCP2122’s TX and RX signals are directly connected to the MAX3238 compatible device. 2.2.1.
MCP2120/22 Developer’s Board User’s Guide 2.3 MCP212XDM DEMOS A description of the demos, including step-by-step instructions are shown in this section. 2.3.1 Demo #1 Operation - Direct IR / UART (DB-9) Mode In Demo #1, the MCP2120/22 Developer’s Board #2 will take any data that is received from the IR interface and send it directly out the UART interface to the PC’s serial port. Any data that is received from the UART interface will be directly sent out the IR interface.
Installation and Operation FIGURE 2-2: DEMO #1 CONFIGURATION - DIRECT TO UART (DB-9) MODE BOARD EDGE DB-9 Connector Note: © 2009 Microchip Technology Inc. Data Flow IR Transceivers This is the board configuration shipped to customers.
MCP2120/22 Developer’s Board User’s Guide TABLE 2-4: DEMO #1 STEPS - DIRECT TO UART (DB-9) Step Action Result 1 Place the two MCP2120/22 Developer’s Boards on a flat — surface about 25 cm (10 inches) apart, and with the IR ports facing each other. 2 On the MCP2120/22 Developer’s Boards: Ensure that the jumpers are configured as in Figure 2-2. — 3 On the MCP2120/22 Developer’s Boards: Apply power to each unit via the USB connector.
Installation and Operation 2.3.2 Demo #2 Operation - Echo Character Received (Change Case) In Demo #2, the MCP2120/22 Developer’s Board #2 will echo the alpha character received on the IR interface after changing its case (“a” → “A” and “A” → “a”). This demo shows the MCP212X device in an embedded application. Figure 2-3 shows the system setup for this test, while Figure 2-4 shows the jumper configuration for the MCP2120/22 board. Lastly, Table 2-5 shows the steps for Demo #2 operation.
MCP2120/22 Developer’s Board User’s Guide FIGURE 2-4: DEMO #2 CONFIGURATION - ECHO CHARACTER RECEIVED MODE BOARD EDGE PIC18F65J50 These jumpers can be in this configuration or removed. Da ta ow Fl IR Transceivers DS51842A-page 24 © 2009 Microchip Technology Inc.
Installation and Operation TABLE 2-5: DEMO #2 STEPS - ECHO CHARACTER RECEIVED Step Action Result 1 Place the two MCP2120/22 Developer’s Boards on a flat — surface about 25 cm (10 inches) apart, and with the IR ports facing each other. 2 On the MCP2120/22 Developer’s Board #1: Ensure that the jumpers are configured as in Figure 2-2. — 3 On the MCP2120/22 Developer’s Board #2: Ensure that the jumpers are configured as in Figure 2-4. Jumpers shown in green are not required and can be left open.
MCP2120/22 Developer’s Board User’s Guide 2.3.3 Demo #3 Operation - Data Stream Mode In Demo #3, once the MCP2120/22 Developer’s Board # 2 receives a data byte from the IR interface, the PIC will stream a continuously repeated table (Figure E-1:) through the IR port. This demo shows the MCP212X device in an embedded application. Figure 2-5 shows the system setup for this test, while Figure 2-6 shows the jumper configuration for the MCP2120/22 board. Lastly, Table 2-6 shows the steps for Demo #3 operation.
Installation and Operation FIGURE 2-6: DEMO #3 CONFIGURATION - DATA STREAM MODE BOARD EDGE PIC18F65J50 These jumpers can be in this configuration or removed. Da ta ow Fl IR Transceivers © 2009 Microchip Technology Inc.
MCP2120/22 Developer’s Board User’s Guide TABLE 2-6: DEMO #3 STEPS - DATA STREAM Step Action Result 1 Place the two MCP2120/22 Developer’s Boards on a flat — surface about 25 cm (10 inches) apart, and with the IR ports facing each other. 2 On the MCP2120/22 Developer’s Board #1: Ensure that the jumpers are configured as in Figure 2-2. — 3 On the MCP2120/22 Developer’s Board #2: Ensure that the jumpers are configured as in Figure 2-6. Jumpers shown in green are not required and can be left open.
Installation and Operation 2.3.4 Demo #4 Operation - Pass Through Mode In Demo #4, the MCP2120/22 Developer’s Board #2 will take any data that is received from the IR interface and send it out the UART interface (after passing through the PIC) to the PC’s serial port. Any data that is received from the UART interface will be sent out the IR interface (after passing through the PIC). This shows the MCP2120/22 encoding and decoding data between the IR port and the Host UART port.
MCP2120/22 Developer’s Board User’s Guide FIGURE 2-8: DEMO #4 CONFIGURATION - PASS THROUGH MODE BOARD EDGE PIC18F65J50 RX1 ta Da TX1 ow RX2 Fl DS51842A-page 30 ta DB-9 Connector Da Fl ow TX2 IR Transceivers © 2009 Microchip Technology Inc.
Installation and Operation TABLE 2-7: DEMO #4 STEPS - PASS THROUGH Step Action Result 1 Place the two MCP2120/22 Developer’s Boards on a flat — surface about 25 cm (10 inches) apart, and with the IR ports facing each other. 2 On the MCP2120/22 Developer’s Board #1: Ensure that the jumpers are configured as in Figure 2-2. — 3 On the MCP2120/22 Developer’s Board #2: Ensure that the jumpers are configured as in Figure 2-8.
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page 32 © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix A. Schematic and Layouts 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 schematics and board layouts may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. A.
M A.2 DS51842A-page 34 VDD 1 12 TX 11 RX OSC2 3 7 MODE OSC1/CLKI 2 8 9 BAUD2 RXIR 5 10 BAUD1 BAUD0 TXIR 6 EN 13 14 VSS RESET 4 VDD 1 12 TX 11 RX OSC2 3 7 MODE OSC1/CLKI 2 8 9 BAUD2 RXIR 5 10 BAUD1 TXIR 6 BAUD0 EN 13 14 VSS RESET 4 MCP2120/22 Developer’s Board User’s Guide BOARD - SCHEMATIC © 2009 Microchip Technology Inc.
Schematic and Layouts A.3 BOARD - TOP SILK AND PADS BOARD EDGE © 2009 Microchip Technology Inc.
MCP2120/22 Developer’s Board User’s Guide A.4 BOARD - TOP LAYER PLUS SILK AND PADS BOARD EDGE DS51842A-page 36 © 2009 Microchip Technology Inc.
Schematic and Layouts A.5 BOARD - BOTTOM LAYER © 2009 Microchip Technology Inc.
MCP2120/22 Developer’s Board User’s Guide A.6 BOARD - POWER LAYER DS51842A-page 38 © 2009 Microchip Technology Inc.
Schematic and Layouts A.7 BOARD - GROUND LAYER © 2009 Microchip Technology Inc.
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page 40 © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix B. Bill Of Materials (BOM) 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 the Bill Of Materials may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. The MCP2120/22 Developer’s Board allows the MCP2120/22 device to be evaluated.
MCP2120/22 Developer’s Board User’s Guide TABLE B-1: Qty BILL OF MATERIALS (BOM) (CONTINUED) Reference 1 JMP6 4 Description CONN HEADER 2x8 (16 POS) .100" VERT GOLD Manufacturer ® Part Number ® Molex /Waldom Electronics Corp 10-89-1161 JP1, JP2, CONN HEADER 2POS .
Bill Of Materials (BOM) TABLE B-2: Qty 0 0 TABLE OF CONTENTS (BOM) – PCB COMPONENTS NOT INSTALLED Reference C4 C5 Description Manufacturer Part Number CAP .47UF 16V CERAMIC X7R 080 Panasonic - ECG ECJ-2YB1C474K AP TANTALUM 6.8UF 16V 20% SMD Nichicon® F931C685MAA Corporation 0 C6 CAP 4.7UF 16V CERAMIC F 0805 Panasonic - ECG ECJ-2FF1C475Z 0 C7 CAP .
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page 44 © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix C. Board Testing C.1 WHAT IS TESTED The MCP2120/22 Developer’s Board can be used in multiple configurations. Only a subset of these configurations will be tested. The following portions of the board are tested: • • • • • • • • • • • • • • C.2 MCP2122 TFDU-4300 (U5) and circuitry (JP1C1, JP2C1) USB Power circuitry DB-9 Interface and circuitry ICSP Header (J2) Y1 circuitry (14.
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page 46 © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix D. Configuring the HyperTerminal® Program D.1 CONFIGURING THE HyperTerminal® PROGRAM To ensure that the PC is able to communicate to the PICDEM™ HPC Explorer Demo Board, the HyperTerminal program must be properly configured. This section describes the configuration that the HyperTerminal program should be in. The screenshots shown in Figure D-1 through Figure D-6 show the settings of the HyperTerminal program in the Windows® operating system.
MCP2120/22 Developer’s Board User’s Guide FIGURE D-2: HyperTerminal® PROGRAM PROPERTIES CONNECT TO WINDOW This will open up the Port Settings window. The port settings should be configured as shown in Figure D-3 with the “Bits per second” selected with 115200. After configuring the port settings, select OK. The Figure D-2 window will be shown. Select the Settings tab. FIGURE D-3: DS51842A-page 48 HyperTerminal® PROGRAM PROPERTIES CONFIGURATION WINDOW © 2009 Microchip Technology Inc.
Configuring the HyperTerminal® Program The window will now look as shown in Figure D-4. Ensure that your settings match the settings shown. Select the ASCII Setup button. This will open the ASCII Setup window (Figure D-5). FIGURE D-4: HyperTerminal® PROGRAM PROPERTIES SETTINGS WINDOW Ensure that your settings match the settings shown. Select the OK button. The window in Figure D-4 will again be shown. Select the Input Translation button. This will open the Translation Button window (Figure D-6).
MCP2120/22 Developer’s Board User’s Guide FIGURE D-6: DS51842A-page 50 HyperTerminal® PROGRAM INPUT TRANSLATION WINDOW © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix E.
MCP2120/22 Developer’s Board User’s Guide NOTES: DS51842A-page 52 © 2009 Microchip Technology Inc.
MCP2120/22 DEVELOPER’S BOARD USER’S GUIDE Appendix F. Programming the MCP212XDM Note: The MCP212XDM is shipped with the default demonstration firmware programmed into the PIC18F65J50. The user may reprogram the PIC18F65J50 with their application firmware or the supplied demo firmware. The programming will require the following items: • • • • 1 PC USB port for programming 1 MPLAB ICD 2 module (with USB cable) 1 RJ-11 to ICSP Adapter (AC164110) “.HEX” file to program into device (00239 - CLKGen.
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.