Page 2
PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel and Total Endurance 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.
6. Sample kit (one MCP2120 device and one MCP2150 device) – not shown. Each kit comes with one MCP2120 device and one MCP2150 device. This allows a prototype system to be developed that can be used with an MCP2120 Developer’s Board or an MCP2150 Developer’s Board.
Page 6
MCP2120/MCP2150 Developer’s Kit User’s Guide FIGURE 1-1: MCP2120/MCP2150 DEVELOPER’S KIT Items discussed in this chapter include: • About This Guide • Recommended Reading • The Microchip Web Site • Customer Support 2004 Microchip Technology Inc. DS51246A-page 2...
Page 7
PICDEM 2 User’s Guide (DS30374). The manual layout is as follows: • Chapter 1: Getting Started – This chapter gives an overview of the MCP2120 and MCP2150 Developer’s Boards, the hardware features of each Developer’s Board, the system configurations that can be used to demonstrate the MCP2120 and MCP2150 devices, and the PC requirements.
Page 8
MCP2120/MCP2150 Developer’s Kit User’s Guide Conventions Used in this Guide This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Represents Examples Arial font: ® Italic characters Referenced books MPLAB IDE User’s Guide Emphasized text ...is the only compiler... Initial caps...
Page 9
ICE User’s Guide (DS51159) ® MPLAB ICD User’s Guide (DS51184) AN756, “Using the MCP2120 for Infrared Communication” (DS00756) ® AN758, “Using the MCP2150 to Add IrDA Standard Wireless Connectivity” (DS00758) TB046, “Connecting the MCP2150 to the Psion Operating System” (DS91046) ®...
Page 10
MCP2120/MCP2150 Developer’s Kit User’s Guide 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.
• PC Requirements DEVELOPER BOARD FEATURES 1.3.1 MCP2120 Developer’s Board Features The MCP2120 Developer’s Board, as shown in Figure 1-1, has the following hardware features: 1. On-board +5V regulator for direct input from 9V, 750 mA AC/DC wall adapter or 9V battery.
Page 13
Selecting UART Source and Optical Transceiver Interface Figure 1-2 shows two pairs of jumpers used to route signals to and from the MCP2120. Jumpers J1 and J4 are used to determine the source of the signals used by the UART interface.
Page 14
Note 1: An external clock is recommended for frequencies below 2 MHz. For frequencies above 7.5 MHz, the TXIR pulse width (MCP2120 Data Sheet, Electrical Specification, parameter IR121) will be shorter than the minimum pulse width of 1.6 ms in the IrDA standard specification.
Page 15
1.3.4 UART Mode Figure 1-4 shows the jumper which determines if the MCP2120 Developer’s Board is to be used in Hardware Baud operation, or Software Baud operation. When in Software Baud operation, an additional signal is required, Request To Send (RTS), which is used to drive the RESET pin low to cause a change of baud rate to occur.
Page 16
MCP2120/MCP2150 Developer’s Kit User’s Guide 1.3.5 Disabling the MCP2120 Figure 1-5 shows the jumper, JP4, which will enable or disable the MCP2120 device. When the MCP2120 is disabled, the device will consume less current. FIGURE 1-5: MCP2120 ENABLE/DISABLE D6 D2...
Page 18
MCP2120/MCP2150 Developer’s Kit User’s Guide 1.3.7 Selecting UART Source and Optical Transceiver Interface Figure 1-8 shows two sets of jumpers used to route signals to and from the MCP2150. Jumpers J2, J3 and J4 are used to determine the source of the signals used by the UART interface.
Page 19
JP2:JP1 9600 57600 19200 115200 TABLE 1-2: SERIAL BAUD RATE SELECTION VS. FREQUENCY BAUD1:BAUD0 Baud Rate @ 11.0592 MHz Bit Rate 9600 / 1152 19200 / 576 57600 / 192 115200 / 96 2004 Microchip Technology Inc. DS51246A-page 15...
Page 20
MCP2120/MCP2150 Developer’s Kit User’s Guide 1.3.9 Disabling the MCP2150 Figure 1-10 shows the jumper (JP3) which will enable or disable the MCP2150 device. When the MCP2150 is disabled, the device will consume less current. FIGURE 1-10: MCP2150 ENABLE/DISABLE Power D2 D5...
MCP2120 Dev Board (ASCII) MCP2120 Dev Board (ASCII) This is the typical mode that will be used for the two MCP2120 Developer’s Board. In this configuration, the MCP2120 board receives data as a single ASCII byte. This byte is then translated to the IR data format, and transmitted out of the selected optical transceiver logic.
Page 22
MCP2120 Dev Board (IR Driver) IrDA standard port (Palm Pilot, cell phone, ...) This configuration is used to evaluate the MCP2120 for an IrDA system, where the Host Controller is responsible for the IrDA protocol stack. The MCP2120 Developer’s Board interfaces to a PC running a terminal emulation program, such as Hyperterminal, that connects the IR port to a virtual serial port.
Hyperterminal. Windows 2000 considers the IrDA port to be a network device. Applications that can access a network service through a network protocol (i.e., TCP/IP) can use the MCP2120 Developer’s Board using the appropriate Windows 2000 driver.
• Transmitting/Receiving Data MCP2120 TUTORIAL SETUP This tutorial will use both MCP2120 Developer’s Boards. The system will operate at 9600 Baud. Each board will be connected via the UART to the serial port of a personal computer (PC). This means that either two PCs are required, or a PC with two serial ports, as shown in Figure 2-1.
HARDWARE SETUP 2.4.1 Oscillator The crystal oscillator has pin receptacles to allow the changing of the MCP2120 oscillator frequency. For the tutorial, we will be using a crystal frequency of 7.3728 MHz. This crystal frequency is shipped in the kit.
Page 27
Figure 2-3 shows the three Baud Rate Select jumpers (JP3:JP1) and the baud rate formula that is specified (baud rate dependant on MCP2120 operational frequency). The tutorial requires these jumpers to be open for a baud rate of 9600, when the crystal frequency is 7.3728 MHz.
Page 28
MCP2120/MCP2150 Developer’s Kit User’s Guide Figure 2-4 shows jumpers JP4 and JP5 and their state. For the tutorial, both of these jumpers are required to be open. FIGURE 2-4: MCP2120 UART MODE AND ENABLE MODE D6 D2 (MCP2120) Open=Enabled Component...
For the initial test, we will set up the system to operate at 9600 baud. Type the name as shown in Figure 2-6 and select any icon. Click OK. FIGURE 2-6: CHOOSING NAME AND ICON 2004 Microchip Technology Inc. DS51246A-page 25...
Page 30
MCP2120/MCP2150 Developer’s Kit User’s Guide The menu in Figure 2-7 appears. You will need to select the port your serial port is on (Connect using). In our case, we are using COM1. Click OK. FIGURE 2-7: SELECTING COMMUNICATIONS (COM) PORT The Default settings for COM1 are displayed in Figure 2-8.
Page 31
Flow Control is “None”, as shown in Figure 2-9. Click OK when done. ® FIGURE 2-9: DESIRED HYPERTERMINAL COM PORT SETTINGS The terminal window opens connected to the serial port as shown in Figure 2-10. ® FIGURE 2-10: HYPERTERMINAL SCREEN AFTER INITIAL SETUP 2004 Microchip Technology Inc. DS51246A-page 27...
Page 32
MCP2120/MCP2150 Developer’s Kit User’s Guide When the characteristics of the Hyperterminal session need to be modified, the program should be disconnected from the port. To disconnect, click on the icon with the handset with the down arrow onto the phone base as shown in Figure 2-11.
Page 33
Verify the settings are as desired. If not, change the settings to match the settings in Figure 2-14. Click the OK button and you will return to the window shown in Figure 2-13. FIGURE 2-14: CONFIGURE CONNECTION MENU 2004 Microchip Technology Inc. DS51246A-page 29...
Page 34
MCP2120/MCP2150 Developer’s Kit User’s Guide Click on the Settings tab. Figure 2-15 shows the default settings. The “Backscroll buffer lines” setting can be modified to 0, if desired. This will make viewing information in the Hyperterminal window more convenient. ®...
Now both PCs should have their Hyperterminal program running in the connected mode with the same COM port settings. See Figure 2-9. Each MCP2120 Developer’s Board should be powered. Use the pair of 18″ (45 cm) power jumper cables to power MCP2120 Developer’s Board #2 from MCP2120 Developer’s Board #1.
Page 36
System #1 (PC #1 and MCP2120 Developer’s Board #1). If it appears that the TXIR signal is correct, then the receive side needs to be validated. Figure 2-20 shows the steps for the receive side of System #2 (PC #2 and MCP2120 Developer’s Board #2).
Page 37
MCP2120 Tutorial FIGURE 2-19: DEBUG FLOWCHART – MCP2120 DEVELOPER’S BOARD #1 SIDE Debug Board #1 Set up digital oscilloscope to capture waveform on first falling edge (Start bit) Type character in PC #1 ® Hyperterminal window Data appear on MCP2120...
Page 38
MCP2120/MCP2150 Developer’s Kit User’s Guide FIGURE 2-20: DEBUG FLOWCHART – MCP2120 DEVELOPER’S BOARD #2 SIDE Verify that the connection for Debug Board #2 Board #1 TXIR to Optical Transceiver and Board #2 Optical Transceiver to RXIR (3 pin headers J6 and J7).
User’s Guide. Please check in the Development Tools section of the Microchip web site (www.microchip.com) for revision B of the User’s Guide. Revision B is planned to include the tutorial on using the MCP2150 Developer’s Board with an MCP2120 Developer’s Board.
MCLR RTCC Note 1: U1 is for use with any 40-pin PIC17C4X device. U2 is for use with any 18-pin PIC16C5X, PIC16CXXX device. U3 is for use with any 28-pin PIC16C5X, PIC16CXXX device. 2004 Microchip Technology Inc. DS51246A-page 37...
AN756, “Using the MCP2120 for Infrared Communication”, DS00756, uses the MCP2120 Developer’s Board and has two code examples. The first is using a PIC16F84 with the MCP2120 Developer’s Board in Hardware Baud mode. In this mode, only two signals need to be interfaced. The RX and TX signal. The second code example is also using a PIC16F84 with the MCP2120 Developer’s Board in Software...
Page 43
Information on Microchip Development Tools can be located by using the Navigate window and selecting Developer’s Tool Box > Development Tools. The PICDEM 2 User’s Guide literature number is DS30374, and the PICDEM 2 kit can be ordered with part number DM163002. 2004 Microchip Technology Inc. DS51246A-page 39...
A MAX3238E compatible level shifting IC has been provided with all necessary hardware to support connection of a RS-232 host through the DB-9 connector. The port can be connected to a PC using a straight through cable. Refer to the MCP2120 Data Sheet for more information.
• Device enable signal for power down operation A.5.1 MCP2120 Developer’s Board The MCP2120 Developer’s Board has the following jumpers: 1. Two jumpers to select source of UART signals. Either RS-232C socket or the four-pin header. 2. Three jumpers to select desired baud rate.
MCP2120/MCP2150 Developer’s Kit User’s Guide OSCILLATOR OPTIONS The MCP2120 can be operated at different frequencies, while the MCP2150 only operates at a single fixed frequency. A.6.1 MCP2120 Developer’s Board The MCP2120 Developer’s Board crystal has pin receptacles so that crystal frequencies can easily be changed.
Fax: 86-532-502-7205 Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 San Jose Mountain View, CA Tel: 650-215-1444 Fax: 650-961-0286 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 09/20/04 2004 Microchip Technology Inc. DS51246A-page 52...
Need help?
Do you have a question about the MCP2120 and is the answer not in the manual?
Questions and answers