图片仅供参考

详细数据请看参考数据手册

Datasheet下载
  • 型号: DM240021
  • 制造商: Microchip
  • 库位|库存: xxxx|xxxx
  • 要求:
数量阶梯 香港交货 国内含税
+xxxx $xxxx ¥xxxx

查看当月历史价格

查看今年历史价格

DM240021产品简介:

ICGOO电子元器件商城为您提供DM240021由Microchip设计生产,在icgoo商城现货销售,并且可以通过原厂、代理商等渠道进行代购。 DM240021价格参考。MicrochipDM240021封装/规格:评估板 - 嵌入式 - MCU,DSP, PIC24HJ128GP504 MPLAB® Starter Kit for PIC24H PIC® MCU 16-Bit PIC Embedded Evaluation Board。您可以下载DM240021参考资料、Datasheet数据手册功能说明书,资料中有DM240021 详细功能的应用电路图电压和使用方法及教程。

产品参数 图文手册 常见问题
参数 数值
产品目录

编程器,开发系统嵌入式解决方案

描述

KIT STARTER MPLAB FOR PIC24H开发板和工具包 - PIC / DSPIC MPLAB STARTER KIT FOR PIC24H

产品分类

评估板 - 嵌入式 - MCU, DSP工程工具

品牌

Microchip Technology

产品手册

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en539553

产品图片

rohs

符合RoHS无铅 / 符合限制有害物质指令(RoHS)规范要求

产品系列

嵌入式开发工具,嵌入式处理器开发套件,开发板和工具包 - PIC / DSPIC,Microchip Technology DM240021PIC®

数据手册

点击此处下载产品Datasheethttp://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en555367

产品型号

DM240021

产品

Development Kits

产品目录页面

点击此处下载产品Datasheet

产品种类

开发板和工具包 - PIC / DSPIC

内容

板,电缆,OLED

商标

Microchip Technology

安装类型

固定

工作电源电压

5 V, 3.3 V

工具用于评估

PIC24HJ128GP504

工厂包装数量

1

平台

用于 PIC24H 的 MPLAB® 入门套件

接口类型

USB

描述/功能

MPLAB starter kit for PIC24H MCUs

操作系统

-

数据总线宽度

16 bit

板类型

评估平台

标准包装

1

核心

PIC

核心处理器

PIC

相关产品

/product-detail/zh/BMA140/828-1001-6-ND/1987013/product-detail/zh/BMA140/828-1001-1-ND/1987007/product-detail/zh/BMA140-SHUTL/828-1010-ND/1987001/product-detail/zh/BMA140/828-1001-2-ND/1986992

类型

MCU 16-位

视频文件

http://www.digikey.cn/classic/video.aspx?PlayerID=1364138032001&width=640&height=455&videoID=43120585001

配套使用产品/相关产品

PIC24HJ128GP504

推荐商品

型号:STM32-H405

品牌:Olimex LTD

产品名称:开发板,套件,编程器

获取报价

型号:OM11006

品牌:NXP USA Inc.

产品名称:开发板,套件,编程器

获取报价

型号:FRDM-KL02Z

品牌:NXP USA Inc.

产品名称:开发板,套件,编程器

获取报价

型号:MSP-EXP430FR5969

品牌:Texas Instruments

产品名称:开发板,套件,编程器

获取报价

型号:C8051F411EK

品牌:Silicon Labs

产品名称:开发板,套件,编程器

获取报价

型号:C8051F005DK-A

品牌:Silicon Labs

产品名称:开发板,套件,编程器

获取报价

型号:EA-XPR-011

品牌:Embedded Artists

产品名称:开发板,套件,编程器

获取报价

型号:AT91SAM9N12-EK

品牌:Microchip Technology

产品名称:开发板,套件,编程器

获取报价

样品试用

万种样品免费试用

去申请
DM240021 相关产品

EVAL-ADUC7024QSZ

品牌:Analog Devices Inc.

价格:

NUCLEO-F334R8

品牌:STMicroelectronics

价格:¥询价-¥询价

TWR-56F8257

品牌:NXP USA Inc.

价格:

C8051F040DK-A

品牌:Silicon Labs

价格:

ATAVRXPLAIN

品牌:Microchip Technology

价格:

STM32-H107

品牌:Olimex LTD

价格:¥130.87-¥130.87

SOMDIMM-LPC1788

品牌:Future Designs Inc.

价格:¥581.63-¥654.34

EVAL-ADUC847QSZ

品牌:Analog Devices Inc.

价格:¥459.39-¥486.41

PDF Datasheet 数据手册内容提取

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide © 2008 Microchip Technology Inc. DS51780A

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 Trademarks applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, Accuron, and may be superseded by updates. It is your responsibility to dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, ensure that your application meets with your specifications. PICSTART, rfPIC, SmartShunt and UNI/O are registered MICROCHIP MAKES NO REPRESENTATIONS OR trademarks of Microchip Technology Incorporated in the WARRANTIES OF ANY KIND WHETHER EXPRESS OR U.S.A. and other countries. IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, FilterLab, Linear Active Thermistor, MXDEV, MXLAB, INCLUDING BUT NOT LIMITED TO ITS CONDITION, SEEVAL, SmartSensor and The Embedded Control Solutions QUALITY, PERFORMANCE, MERCHANTABILITY OR Company are registered trademarks of Microchip Technology FITNESS FOR PURPOSE. Microchip disclaims all liability Incorporated in the U.S.A. arising from this information and its use. Use of Microchip Analog-for-the-Digital Age, Application Maestro, CodeGuard, devices in life support and/or safety applications is entirely at dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, the buyer’s risk, and the buyer agrees to defend, indemnify and ECONOMONITOR, FanSense, In-Circuit Serial hold harmless Microchip from any and all damages, claims, Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB suits, or expenses resulting from such use. No licenses are Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM, conveyed, implicitly or otherwise, under any Microchip PICDEM.net, PICtail, PIC32 logo, PowerCal, PowerInfo, intellectual property rights. PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total Endurance, 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. © 2008, 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 design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® 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. DS51780A-page ii © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Table of Contents Preface ...........................................................................................................................1 Chapter 1. Introduction 1.1 Overview ........................................................................................................7 1.2 Operational Requirements .............................................................................8 1.3 Board Setup ...................................................................................................8 Chapter 2. Starter Kit Demo 2.1 Running the Demo .........................................................................................9 2.2 Understanding the Demo .............................................................................14 2.3 Other Demo Code Examples .......................................................................15 Chapter 3. Develop an Application 3.1 Installing the Hardware and Software ..........................................................17 3.2 Setting Up an Example Application for Debug .............................................18 3.3 Running the Example Application ................................................................19 3.4 Debugging the Example Application ............................................................19 3.5 Programming the Debugged Application ......................................................22 3.6 Creating Other PIC24H MCU Applications ...................................................22 3.7 Determining Device Support and Reserved Resources ...............................22 3.8 Troubleshooting ............................................................................................23 3.9 Settings Dialog, Info Tab ..............................................................................23 Chapter 4. Hardware 4.1 Application Functional Overview ..................................................................25 4.2 Debug Functional Overview .........................................................................28 4.3 Board Components ......................................................................................29 Appendix A. Schematics A.1 Application Schematics ................................................................................34 A.2 Debug Schematics .......................................................................................37 Index .............................................................................................................................39 Worldwide Sales and Service ....................................................................................40 © 2008 Microchip Technology Inc. DS51780A-page iii

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide NOTES: DS51780A-page iv © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS 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. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Topics to open a list of available online help files. INTRODUCTION This chapter contains general information that will be useful to know before you use the MPLAB® Starter Kit for PIC24H Microcontrollers (MCUs). Items discussed in this chapter include: • Document Layout • Conventions Used in this Guide • Warranty Registration • Recommended Reading • The Microchip Web Site • Development Systems Customer Change Notification Service • Customer Support • Document Revision History DOCUMENT LAYOUT This document describes how to use the starter kit as a development and demonstra- tive tool for PIC24H MCU device’s processing capabilities. The manual layout is as follows: • Chapter 1.Introduction – This chapter introduces the starter kit and provides an overview of its features. • Chapter 2.Starter Kit Demo – This chapter describes how to use the starter kit demo software. • Chapter 3.Develop an Application – This chapter describes how to debug application software on the starter kit using MPLAB® IDE. • Chapter 4.Hardware – This chapter provides a functional overview of the starter kit and identifies the major hardware components. • Appendix A.Schematics – This appendix provides detailed schematic diagrams of the starter kit. © 2008 Microchip Technology Inc. DS51780A-page 1

® MPLAB Starter Kit for PIC24H Microcontrollers 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 A window the Output window A dialog the Settings dialog A menu selection select Enable Programmer Quotes A field name in a window or “Save project before build” dialog Underlined, italic text with A menu path File>Save right angle bracket Bold characters A dialog button Click OK A tab Click the Power tab N‘Rnnnn A number in verilog format, 4‘b0010, 2‘hF1 where N is the total number of digits, R is the radix and n is a digit. Text in angle brackets < > A key on the keyboard Press <Enter>, <F1> Courier New font: Plain Courier New Sample source code #define START Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’ Italic Courier New A variable argument file.o, where file can be any valid filename Square brackets [ ] Optional arguments mcc18 [options] file [options] Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1} character: { | } arguments; an OR selection Ellipses... Replaces repeated text var_name [, var_name...] Represents code supplied by void main (void) user { ... } DS51780A-page 2 © 2008 Microchip Technology Inc.

Preface WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles you to receive new product updates. Interim software releases are available at the Microchip web site. RECOMMENDED READING This user’s guide describes how to use the MPLAB Starter Kit for PIC24H MCUs. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. Readme Files For the latest information on Microchip tools, read the associated Readme files (HTML files) included with the software. PIC24H MCU Documentation For the most up-to-date information on PIC24H MCU devices (data sheets, errata, family reference manual, etc.), please see the Microchip web site at: http\\www.microchip.com. MPLAB® C Compiler for PIC24 MCUs and dsPIC® DSCs User’s Guide (DS51284) This document helps you use Microchip’s 16-bit C compilers to develop your applica- tion. The compilers are the MPLAB C Compiler for dsPIC DSCs and PIC24 MCUs, the MPLAB C Compiler for dsPIC DSCs (subset of the first), and the MPLAB C Compiler for PIC24 MCUs (subset of the first). These compilers are GNU-based language tools, based on source code from the Free Software Foundation (FSF). For more information about FSF, see www.fsf.org. MPLAB® Assembler, Linker and Utilities for PIC24 MCUs and dsPIC® DSCs User’s Guide (DS51317) This document helps you use Microchip Technology’s 16-bit language tools based on GNU technology. The language tools discussed are the MPLAB Assembler for dsPIC DSCs and PIC24 MCUs, MPLAB Object Linker for dsPIC DSCs and PIC24 MCUs, MPLAB Archiver/Librarian for dsPIC DSCs and PIC24 MCUs and other 16-bit device utilities. MPLAB® IDE User’s Guide (DS51519) This document describes how to use the MPLAB IDE integrated development environ- ment, as well as the MPLAB Project manager, MPLAB Editor and MPLAB SIM simulator. Use these development tools to help you develop and debug application code. © 2008 Microchip Technology Inc. DS51780A-page 3

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 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 DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions. The Development Systems product group categories are: • Compilers – The latest information on Microchip C compilers and other language tools. These include 16-bit language tools: - MPLAB C Compiler for dsPIC DSCs and PIC24 MCUs (and subsets) - MPLAB Assembler for dsPIC DSCs and PIC24 MCUs - MPLAB Object Linker for dsPIC DSCs and PIC24 MCUs - MPLAB Archiver/Librarian for dsPIC DSCs and PIC24 MCUs and 8-bit language tools: - MPLAB C Compiler for PIC18 MCUs - MPASM™ Assembler - MPLINK™ Object Linker - MPLIB™ Object Librarian • In-Circuit Emulators – The latest information on Microchip in-circuit emulators. These include the MPLAB REAL ICE and MPLAB ICE 2000 in-circuit emulators. • In-Circuit Debuggers – The latest information on Microchip in-circuit debuggers. These include MPLAB ICD 2, MPLAB ICD 3, and PICkit™ 2. • MPLAB IDE – The latest information on Microchip MPLAB IDE, the Windows® Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features. • Programmers – The latest information on Microchip programmers. These include the MPLAB PM3 device programmer and the PICSTART® Plus and PICkit 1 and 2 development programmers. DS51780A-page 4 © 2008 Microchip Technology Inc.

Preface CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • Distributor or Representative • Local Sales Office • Field Application Engineer (FAE) • Technical Support 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 A (November 2008) This is the initial release of this document. © 2008 Microchip Technology Inc. DS51780A-page 5

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide NOTES: DS51780A-page 6 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Chapter 1. Introduction Thank you for purchasing Microchip Technology’s MPLAB® Starter Kit for PIC24H Microcontrollers (MCUs). This kit is intended to introduce and demonstrate the features of the starter kit and the strong processing capabilities of PIC24H MCU devices. The starter kit demonstrates a low-cost hardware and software solution for processing sensor signals and interfacing audio and visual displays. The board also includes signal conditioning circuitry, which helps users to perform a quick evaluation of the power of PIC24H MCUs by processing signals coming from an external sensor. In addition, the starter kit has on-board debug circuitry you can use to develop and debug your own applications without using other debug tools (i.e., in-circuit emulator or debugger). This chapter introduces the starter kit and provides an overview of its features. Topics covered include: • Overview • Operational Requirements • Board Setup 1.1 OVERVIEW The MPLAB Starter Kit for PIC24H MCUs connects directly to the USB port on a personal computer (PC). The PC USB connection supplies communications and power to the board. The starter kit includes debug and programmer circuitry that allows applications to be programmed onto the board’s PIC24H MCU device and then debugged, all using MPLAB IDE. The sensor signals from an on-board triaxial analog accelerometer are routed to the fast on-chip ADC module in the PIC24H MCU for software processing. This feature allows the Starter Kit to be maneuvered by tilting. Based on the sensed acceleration due to the tilting of the board, a visual output is generated on the on-board OLED display controlled by the Parallel Master Port (PMP) module. Additionally, the speech segments are audibly produced through the on-board speaker via the output compare module as a Pulse-Width Modulated (PWM) digital waveform. This output is converted to an analog speech signal by a low-pass filter on the starter kit board. Alternatively, applications can use the conditioning circuitry to plug-in a wide range of analog sensors, grab the sensor signals through the ADC and process them. In addition to the Recommended Reading listed in the Preface, the following manufacturers’ data sheets are also recommended as reference sources: • Bosch Sensortec Data Sheet, BMA140 Triaxial Analog Acceleration Sensor • National Semiconductor Corporation Data Sheet, LM4853 Boomer® Audio Power Amplifier Series Mono 1.5W/ Stereo 300mW Power Amplifier (DS200334) © 2008 Microchip Technology Inc. DS51780A-page 7

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 1.2 OPERATIONAL REQUIREMENTS To communicate with and program the MPLAB Starter Kit for PIC24H MCUs, the following hardware and software requirements must be met: • PC-compatible system • An available USB port on the PC or a powered USB hub • CD-ROM drive • Windows® 2000 SP4, Windows XP SP2, or Windows Vista (32-bit)(1) Operating Systems. Note1: Only initial testing has been performed on the 32-bit Windows Vista Operating System for this release. The 64-bit Windows Vista Operating System is not supported at this time. 1.3 BOARD SETUP Figure1-1 shows the setup for the MPLAB Starter Kit for PIC24H MCUs. The USB connection provides communication and power to the board. As soon as the starter kit is powered through the USB cable, the preloaded demonstration starts. FIGURE 1-1: MPLAB STARTER KIT FOR PIC24H MCUs SETUP Starter Kit USB Speaker OLED PIC24H Display MCU Accelerometer MPLAB® IDE DS51780A-page 8 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Chapter 2. Starter Kit Demo This chapter describes the MPLAB® Starter Kit for PIC24H Microcontrollers demonstration that is preloaded on the PIC24H MCU device, which showcases the multitasking of accelerometer sensing, the OLED display, speech playback, and the switch press monitor. This software application demonstrates how to use the MPLAB Starter Kit for PIC24H MCUs for signal capture and processing of the sensor signal, speech decoding and playback, and controlling the OLED display. A detailed explanation of the starter kit hardware is provided in Chapter 4.“Hardware”. Topics covered include: • Running the Demo • Understanding the Demo • Other Demo Code Examples 2.1 RUNNING THE DEMO To run the demo, follow these steps: 1. Power-up the starter kit by connecting the board to the USB port of a computer. You should briefly see a pop-up message in the system tray that states (1) new hardware has been found, (2) drivers are being installed, and (3) new hardware is ready for use. If you do not see these messages and the starter kit does not work, try reconnecting the USB cable. If reconnecting the USB cable does not work, refer to Section3.8“Troubleshooting”. When powered up, an audible welcome message is played while simultaneously displaying the Start-up screen on the OLED display (see Figure2-1). FIGURE 2-1: START-UP SCREEN Y bh Welcome Z MPLAB® STARTER KIT X FOR PIC24H MCU S1 S2 © 2008 Microchip Technology Inc. DS51780A-page 9

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide After the start-up exercise, the Home screen appears on the OLED display, as shown in Figure2-2. The Home screen has four cells from which to choose: Accelerometer (Acc.) Graph, External (Ext.) Sensor, Orientation and Games. The starter kit can be maneuvered by tilting it about the X and Y axes. Based on the direction of tilt, one of the four cells is highlighted for selection. Switch S1 or S2 can be pressed to select the highlighted cell. FIGURE 2-2: STARTER KIT HOME SCREEN bPIC24H Starter Kit Y Acc. Graph Ext. Sensor Z X Orientation Games S1 S2 2. Selecting the Acc. Graph cell starts the application, which captures the triaxial outputs of the accelerometer and displays them on the OLED display as a graph, as shown in Figure2-3. Switch S1 or S2 can be pressed at any time to return to the Home screen. FIGURE 2-3: ACCELEROMETER GRAPH Y X Y Z X Z S1 S 2 3. Selecting the Ext. Sensor cell (see Figure2-4) starts the application, which captures the output of the external sensor that can be plugged-in at points TP12 and TP11. FIGURE 2-4: SELECTING THE EXTERNAL SENSOR OPTION bPIC24H Starter Kit Y Acc. Graph Ext. Sensor Z X Orientation Games S1 S2 DS51780A-page 10 © 2008 Microchip Technology Inc.

Starter Kit Demo Before displaying the external sensor signal an information screen is displayed, which prompts the user to plug-in an external sensor, as shown in Figure2-5. FIGURE 2-5: EXTERNAL SENSOR PROMPT Y bExternal Sensor Demo Z X Connect External Sensor... S1 S2 Switch S1 can be pressed to slow down or speed up the display (see Figure2-6) in case the displayed signal is too fast or too slow. FIGURE 2-6: EXTERNAL SENSOR SIGNAL Y V Z X S1 S 2 Switch S2 can be pressed at any time to return to the Home screen. 4. Selecting the Orientation cell (see Figure2-7) starts the application, which indicates the orientation of the starter kit. Patterns are displayed on the OLED display and messages are played out on the speaker indicating Portrait, Landscape and Plane orientations (see Figure2-8). The acceleration in each of the axes is displayed on the left side of the screen as a fraction of gravitational acceleration constant on earth, 1g = 9.8 m/s2. FIGURE 2-7: SELECTING THE ORIENTATION OPTION Y bPIC24H Starter Kit Z X Acc. Graph Ext. Sensor Orientation Games S1 S2 © 2008 Microchip Technology Inc. DS51780A-page 11

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide FIGURE 2-8: ORIENTATION PATTERNS Y X: 0g Z Landscape Y: +1g X Z: 0g S1 S2 5. Selecting the Games cell displays a new screen with three cells: Home, BomberJet and Snake, as shown in Figure2-9. FIGURE 2-9: GAMES SCREEN Y bGames Z X Home Bomber Jet Snake S1 S2 Selecting the Home cell will return you to the Home screen. 6. Selecting the Bomber Jet cell starts the Bomber Jet game. The Jet can be maneuvered on the X and Y planes of the display by tilting the starter kit about X and Y axes. Asteroids and alien ships are encountered in the game. The jet should be maneuvered such that it doesn’t collide with the aster- oid, alien ship, and isn’t hit by a missile from the alien ship. Pressing switch S1 turns on a protective shield, momentarily. The shield will destroy any asteroid or alien ship missile in its path. Pressing S2 releases missiles from the Bomber Jet. The alien ships and the asteroids are destroyed when hit by the missiles from the Bomber Jet. See Figure2-10 for an example of the display during game play. FIGURE 2-10: BOMBER JET GAME Y Z X S1 S2 DS51780A-page 12 © 2008 Microchip Technology Inc.

Starter Kit Demo The score increases whenever a missile fired by the Bomber Jet missile strikes an alien ship or an asteroid. Using the protective shield decreases the score. The game automatically exits to a Score screen after achieving a score of 1000 or when hit by an alien missile, or colliding with an alien ship or asteroid (see Figure2-11). FIGURE 2-11: BOMBER JET GAME SCORE bBomber Jet Y Mission Accomplished! Z X Score: 1000 Press switch to continue... S1 S2 After the Score screen appears, Switch S1 or S2 can be pressed at any time to return to the Games screen. 7. Selecting the Snake cell starts the Snake game. The snake can be maneuvered on the X and Y plane of the display by tilting the starter kit about X and Y axes. Multiple snake food appears, which the snake must eat. The snake grows in size when it eats. The snake should be maneu- vered to eat the food such that it doesn’t collide with any of the four walls. See Figure2-12 for an example of the display during game play. FIGURE 2-12: SNAKE GAME Y Z X S1 S2 The score increases if the snake eats food. The game automatically exits to a Score screen after the snake grows a tail length of 25 rings or the snake hits any of the four walls (see Figure2-13). FIGURE 2-13: SNAKE GAME SCORE bSnake Y Snake is full grown! Z Score: 350 X Press switch to continue... S1 S2 After the Score screen appears, switch S1 or S2 can be pressed at any time to return to the Games screen. © 2008 Microchip Technology Inc. DS51780A-page 13

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 2.2 UNDERSTANDING THE DEMO The PIC24H MCU device on the starter kit is pre-programmed with the main application demonstration. The CD that accompanies the starter kit also contains the main appli- cation code. As shown in Figure2-14, this sample application uses the board to cap- ture the triaxial acceleration signals from the accelerometer, and plays speech messages through the speaker with a visual display on the OLED display. The board also features conditioning circuitry that provides the user the flexibility of plugging in a wide range of sensors and performing signal processing on the captured sensor signals. Detailed descriptions of the basic modules are provided in Chapter 4.“Hardware”. The following sections give a brief functional description of these modules. FIGURE 2-14: STARTER KIT BOARD PIC24H MCU Triaxial Analog ADC Accelerometer Speaker OC OLED Display PMP (128 x 64) ADC Wide Range of Sensors 2.2.1 Accelerometer Interface The starter kit has a triaxial analog accelerometer. The three (X, Y and Z) acceleration outputs are captured using the ADC module on the PIC24H MCU device. The ADC-captured accelerometer samples are processed differently in the PIC24H MCU based on the game chosen. 2.2.2 OLED Display Interface The starter kit has a 128 x 64 OLED display. Different screens are displayed for the user to choose from. Depending on the stimulus obtained from the accelerometer and the switches, different screens are displayed, signals are graphed and games are controlled. 2.2.3 Speaker Interface The speaker plays messages. The speech messages are compressed using the G.711 A-law and are stored in the program memory of the PIC24H. The PIC24H decodes the compressed data and generates PWM signals which are demodulated before being output through the speaker. DS51780A-page 14 © 2008 Microchip Technology Inc.

Starter Kit Demo 2.2.4 External Sensor Interface The starter kit features an analog conditioning circuit which can be used by the user to plug in a wide range of external sensors. The differential output of the sensor flows through a differential amplifier and an anti-aliasing filter before being sampled by the on-chip ADC. 2.3 OTHER DEMO CODE EXAMPLES The starter kit software CD includes another demo code example, External_Sensor_Demo. The External_Sensor_Demo code example demonstrates the low-cost sensor signal capture and processing. When a sensor is plugged into the analog conditioning circuitry the code example captures the sensor signal through the ADC channel. The captured discrete time sensor signal can be processed inside the code example. Instructions are provided in the source file as to where user desired signal processing routines need to be added to process the sensor signal captured by the ADC. The characteristics of the external analog sensor that can be used are provided in Section4.1.4“Analog Conditioning Circuitry”. © 2008 Microchip Technology Inc. DS51780A-page 15

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide NOTES: DS51780A-page 16 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S Chapter 3. Develop an Application The MPLAB Starter Kit for PIC24 MCUs may be used with MPLAB® IDE, the free integrated development environment available on Microchip’s web site. MPLAB IDE allows the starter kit to be used as an in-circuit debugger as well as a programmer for the featured device. In-circuit debugging allows you to run, examine, and modify your program for the device embedded in the starter kit hardware. This greatly assists you in debugging your firmware and hardware together. Special starter kit software interacts with the MPLAB IDE application to run, stop, and single-step through programs. Breakpoints can be set and the processor can be reset. Once the processor is stopped, the register’s contents can be examined and modified. For more information on how to use MPLAB IDE, reference the following documentation: • MPLAB® IDE User’s Guide (DS51519) • MPLAB® IDE Quick Start Guide (DS51281) • MPLAB® IDE On-line Help This chapter includes the following: • Installing the Hardware and Software • Setting Up an Example Application for Debug • Running the Example Application • Debugging the Example Application • Programming the Debugged Application • Creating Other PIC24H MCU Applications • Determining Device Support and Reserved Resources • Troubleshooting • Settings Dialog, Info Tab 3.1 INSTALLING THE HARDWARE AND SOFTWARE To install the hardware: If you have not already set up the hardware to run the demo, follow these steps: 1. Power-up the starter kit by connecting the board to the USB port of a computer. You should briefly see a pop-up balloon in the system tray that states (1) new hardware has been found, (2) drivers are being installed, and (3) new hardware is ready for use. If you do not see these messages and the starter kit does not work, try reconnecting the USB cable. If reconnecting the USB cables does not work, see Section3.8“Troubleshooting”. 2. When powered up, the application starts and runs as described in Section 2.1. To install the software: Run the CD-ROM enclosed with the starter kit and install the software as directed. © 2008 Microchip Technology Inc. DS51780A-page 17

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 3.2 SETTING UP AN EXAMPLE APPLICATION FOR DEBUG The MPLAB IDE software that is installed on your PC by the starter kit CD-ROM auto- matically opens an example application that you may use to examine debug features of the starter kit. To prepare the application for debug: 1. Launch MPLAB IDE. The example application project and related workspace will open. For information on projects and workspaces, see the MPLAB IDE documentation mentioned at the beginning of this chapter. 2. Select Project>Build All to build the application code. The build’s progress will be visible in the Build tab of the Output window. 3. Select Debugger>Select Tool>Starter Kits. MPLAB IDE will change to add starter kit debug features (Figure3-1): (1) the status bar will show Starter Kits as the debug tool, (2) a Starter Kit debug toolbar will be added, (3) the Debugger menu will change to add Starter Kit debug functions and (4) the Output window will dis- play communication status between MPLAB IDE and the stater kit on the Starter Kit Debugger tab. Also, several device resources are used for debug. For details, see Section3.7“Determining Device Support and Reserved Resources”. FIGURE 3-1: STARTER KIT AS DEBUG TOOL 2 4 3 1 4. Select Debugger>Program to program the application code into the PIC24H MCU device on the starter kit. The debug programming progress will be visible in the Starter Kit tab of the Output window. Note: Debug executive code is automatically programmed in the upper program memory of the starter kit device when the starter kit is selected as a debug- ger. Debug code must be programmed into the target device to use the in-circuit debugging capabilities of the starter kit. DS51780A-page 18 © 2008 Microchip Technology Inc.

Develop an Application 3.3 RUNNING THE EXAMPLE APPLICATION The starter kit executes in either real-time (Run) or steps (Step Into, Step Over, Animate). Real-time execution occurs when you select Run in MPLAB IDE. Once the device code is halted, either by Halt or a breakpoint, you can step. The toolbar buttons shown in Table3-1 can be used for quick access to commonly used debug operations: TABLE 3-1: TOOLBAR BUTTONS Debugger Menu Debug Toolbar Debugger Menu DSK Toolbar Run Program Halt Read Animate Step Into Step Over Reset Breakpoints To see how these options function, do the following: 1. Select Debugger>Reset>Processor Reset or click Reset to reset the program. 2. Select Debugger>Run or click Run. Observe how the application operates. 3. Select Debugger>Halt or click Halt to stop the program execution. A green solid arrow will mark the line of code in the File window where the program halted. 4. Select Debugger>Step Into or click Step Into to step the program execution once. The green solid arrow will move down one line of code in the File window. Click the button several times to step through some code. 5. Select Debugger>Reset>Processor Reset click Reset to reset the program again. The arrow will disappear, meaning the device is reset. 3.4 DEBUGGING THE EXAMPLE APPLICATION For the example code given, everything works fine. However, when you are developing code, it will likely not work the first time and may need to be debugged. MPLAB IDE provides an editor and several debug features, such as breakpoints and Watch windows, to aid in application code debugging. This section includes: • Editing Application Code • Using Breakpoints and Mouseovers • Using Watch Windows © 2008 Microchip Technology Inc. DS51780A-page 19

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 3.4.1 Editing Application Code To view application code so it may be edited, do one of the following: 1. Select Edit>New to create new code or Edit>Open to search for and open an existing code file. 2. Double click a file in the Project window to open an existing code file. See an example Project window in Figure3-2. FIGURE 3-2: EXAMPLE PROJECT For more information on using the editor to create and edit code, see MPLAB Editor Help. 3.4.2 Using Breakpoints and Mouseovers To set a breakpoint in code: 1. Double Click the Gutter – Double click in the window gutter next to the line of code where you want the breakpoint. Double click again to remove the breakpoint. Note: Double click must be set up for breakpoints. See the Edit>Properties, ASM/C/BAS File Type tab, and the check box for “Double-click Toggles Breakpoint”. 2. Pop-up Menu – Place the cursor over the line of code where you want the break- point. Then, right click to pop up a menu and select “Set Breakpoint”. Once a breakpoint is set, “Set Breakpoint” will become “Remove Breakpoint” and “Disable breakpoint”. Other options on the pop-up menu under Breakpoints are for deleting, enabling, or disabling all breakpoints. 3. Breakpoint Dialog – Open the Breakpoint dialog (Debugger>Breakpoints) to set, delete, enable or disable breakpoints. See MPLAB IDE Help for more information on this dialog. DS51780A-page 20 © 2008 Microchip Technology Inc.

Develop an Application A breakpoint set in code will appear as a red hexagon with a “B” as shown in Figure3-3. FIGURE 3-3: EXAMPLE BREAKPOINT Once code is halted, hovering over variables pops up the current value of those variables (see Figure3-3.) Note: This feature must be set up. See the Edit>Properties, Tooltips tab, and check the “Enable Variable Mouseover Values” check box. 3.4.3 Using Watch Windows To use a Watch window: 1. The Watch window is made visible on the desktop by selecting View>Watch. It contains four selectable Watch views (via tabs) in which to view variables (SFRs, symbols and absolute addresses). 2. Select an SFR or Symbol from the list and click the related Add button to add it to the Watch window. Or click the “Address” column and enter an absolute address. A Watch window populated with SFRs and Symbols will look like Figure3-4. For more information on using Watch windows, see MPLAB IDE Help. FIGURE 3-4: EXAMPLE WATCH © 2008 Microchip Technology Inc. DS51780A-page 21

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 3.5 PROGRAMMING THE DEBUGGED APPLICATION When the program is successfully debugged and running, the next step is to program the device for stand-alone operation in the finished design. When doing this, the resources reserved for debug are released for use by the application. To program the application, use the following steps: 1. Disable Starter Kits as a debug tool by selecting Debugger>Select Tool>None. 2. Select Starter Kits as the programmer in the Programmer>Select Programmer menu. 3. Select Programmer>Program. Now the starter kit will run independently. 3.6 CREATING OTHER PIC24H MCU APPLICATIONS This starter kit is just one way to use Microchip PIC24H MCUs in an application. Other tools and resources exist to support these devices. • PIC MCU Development Boards – Many boards are available for developing appli- cations. See our web site (http://www.microchip.com/) under Design>Develop- ment Tools>Demo Boards>PIC MCU. • MPLAB C Compiler for dsPIC® DSCs and PIC24 MCUs, Full Version – More optimization options than the student version for full-scale development. See http://www.microchip.com/c30. • Application Notes – Example applications with code for using PIC24H MCU features. See our web site (http://www.microchip.com/) under Design>App Notes & Source Code>16-bit PIC MCUs & dsPIC DSCs. 3.7 DETERMINING DEVICE SUPPORT AND RESERVED RESOURCES Due to the built-in in-circuit debugging capability of ICD devices and the ICSP™ function offered by the debugger, the starter kit uses some on-chip resources when debugging. It also uses program memory and file register locations in the target device during debugging. These locations are not available for use by user code. In the MPLAB IDE, registers marked with an “R” in register displays represent reserved registers. For information on device resources that are needed for in-circuit debugging, please refer to the MPLAB ICD 2 Help, found in MPLAB IDE under Help>Topics. The device reserved resource information found under “Resources Used By MPLAB ICD 2” is the same for the starter kit. DS51780A-page 22 © 2008 Microchip Technology Inc.

Develop an Application 3.8 TROUBLESHOOTING 3.8.1 Debug Connection Problems While using the starter kit as a debugger, you may get the error “Unable to Enter Debug Mode” when programming the device. This can result from communication being lost between the starter kit and MPLAB IDE. To resolve this: 1. Unplug the USB cable from the starter kit. 2. Plug the USB cable back into the starter kit. MPLAB IDE should automatically reconnect to the starter kit. If this does not work, do the following: 1. Check the USB connection between the PC and starter kit at both ends. 2. If using a USB hub, make sure it is powered. 3. Make sure the USB port is not in use by another device. 3.8.2 Programming Problems If during the course of developing your own application you can no longer program the device on the starter kit, you may have set device Configuration bits to code-protect or some other state that prevents programming. To view the settings of the Configuration bits, select Configure>Configuration Bits. 3.8.3 Build Problems When using the starter kit as a debugger, make sure that the Build Configuration (drop-down list on the toolbar or item on the Debugger menu) is set to “Debug” or your code will not build correctly for debugging. When using the starter kit as a programmer, make sure that the Build Configuration is set to “Release” or your code will not build correctly for programming. 3.9 SETTINGS DIALOG, INFO TAB When you select Debugger>Settings or Programmer Settings, you will open the Starter Kit Settings dialog. Currently, there is only one (Info) tab on this dialog, displaying the following information: • Firmware Version: The version of firmware on the starter kit board. • Debug Exec Version: The version of the debug executive that is loaded into the device program memory to enable debug operation. © 2008 Microchip Technology Inc. DS51780A-page 23

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide NOTES: DS51780A-page 24 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Chapter 4. Hardware This chapter provides a functional overview of the hardware used in the MPLAB Starter Kit for PIC24H MCUs and identifies the major hardware components. Topics covered include: • Application Functional Overview • Debug Functional Overview • Board Components 4.1 APPLICATION FUNCTIONAL OVERVIEW The block diagram shown in Figure4-1 illustrates the mainstream operation of the starter kit. FIGURE 4-1: STARTER KIT APPLICATION BLOCK DIAGRAM Triaxial AN4 Analog AN5 Accelerometer AN6 Low-pass Speaker OC1 Filter PIC24H MCU Device Audio Power Amplifier PMD7-PMD0 OLED PMRD Display PMWR (128 x 64) PMCS1 PMA0 AN7 Low-pass Wide Range of Sensors Filter Differential Amplifier © 2008 Microchip Technology Inc. DS51780A-page 25

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 4.1.1 Accelerometer Interface The starter kit has a triaxial analog accelerometer (see schematics in FigureA-2). The accelerometer has three analog outputs, one for each of the three spatial dimensions (3D - X, Y, and Z). These three acceleration outputs are captured using the ADC inputs AN4, AN5 and AN6, respectively, on the PIC24H MCU device.The ADC is set to perform simultaneous sampling. The direction of acceleration and associated spatial dimensions can be observed in the Figure4-2. FIGURE 4-2: DIRECTION OF ACCELERATION AND ASSOCIATED SPATIAL DIMENSIONS FOR THE TRIAXIAL ANALOG ACCELEROMETER +Z Gravity Vector +X Top Side +Y 4.1.2 OLED Display Interface The starter kit has a 128 x 64 pixel, monochrome organic LED array, which provides a wide range of graphics and alphanumeric display options. It is interfaced to the PIC24H MCU through the Parallel Master Port (PMP) module. The application uses the Microchip Graphics Library to communicate with the OLED display. 4.1.3 Speaker Interface The speech messages are compressed using the G.711 A-law and are stored in the program memory of the PIC24H MCU. The wave files were G.711 compressed by using the dsPIC33F Speech Encoder Utility for G.711 provided on the CD and also available on the Microchip web site. When the demo application is running, the compressed speech messages are loaded from the program memory and decompressed using the G711 A-law decode algorithm and played out as a Pulse Width Modulated (PWM) signal using the output compare module on the PIC24H. This signal is passed through a 4th-order low-pass filter. This behaves like an integrator, whose output signal amplitude and frequency depends on the duty cycle of the input PWM waveform. The PWM frequency should be an integral multiple of the audio sampling rate. The output of this low-pass filter feeds an audio amplifier. The speaker is driven by an audio power amplifier (LM4853 Boomer). The speaker has a frequency range of 600Hz to 22kHz, with 8 Ohm impedance and rated power of 1W. See the schematics in FigureA-3. FIGURE 4-3: PWM DEMODULATION Pwm Signal From OCPWM Low-pass Filter Demodulated Audio Signal R C DS51780A-page 26 © 2008 Microchip Technology Inc.

Hardware 4.1.4 Analog Conditioning Circuitry The starter kit features an analog conditioning circuit (see schematics in FigureA-4), which can be used by the user to plug in a wide range of external analog sensors. The analog conditioning circuit has a differential amplifier followed by an anti-aliasing low pass filter. The gain of the differential amplifier is given by Equation4-1 in terms of the resistors used and differential input voltages at input points TP11 and TP12. The gain is fixed at 100. Any sensor with a differential compensated output voltage of less than 33mV can be used. EQUATION 4-1: DIFFERENTIAL AMPLIFIER GAIN R Gain = -----f(V –V ) R TP11 TP12 i R = R57 = R58 f R = R51 = R53 i The anti-aliasing filter is a 2nd-order low-pass filter, with a cut-off frequency of ~500Hz (483.78Hz). The highest frequency of the base band sensor signal is assumed to be less than 500Hz. The output of the low-pass filter is connected to the ADC input AN7 on the PIC24H MCU device. © 2008 Microchip Technology Inc. DS51780A-page 27

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 4.2 DEBUG FUNCTIONAL OVERVIEW The block diagram shown in Figure4-4 illustrates the debugging/programming operation of the starter kit. FIGURE 4-4: STARTER KIT DEBUG BLOCK DIAGRAM USB Mini-B 3.3V LDO Jack Regulator 12 MHz Status PIC18F67J50 Device Crystal LEDs ™ PI P S S C I Serial EEPROM PIC24H MCU 25LC010A Device The starter kit, with its built-in debugger/programmer, provides an all-in-one solution for debugging and programming applications using MPLAB IDE. Also, no additional external power supply is needed as power is supplied by the host PC’s USB port. See the schematics in FigureA-7 and FigureA-8. The starter kit’s debugging/programming operations are controlled by a PIC18F67J50 MCU running at 48 MHz. The PIC18F67J50’s built-in USB engine provides the communications interface between the starter kit and the host PC. Power to the starter kit is provided via USB, whose nominal 5V unregulated supply is regulated by a Microchip MC1727 3.3V low-dropout (LDO) linear regulator. Proper starter kit main system power is indicated by the green LED, D1. The PIC18F67J50 MCU accomplishes debugging or programming of the target PIC24HJ128GP504 by controlling the target’s PGC1/EMUC1 and PGD1/EMUD1 signals. Target power is switched on/off via a low VCE saturation PNP transistor configured as a high-side switch. Target clocking is also provided by the PIC18F67J50 MCU. A Microchip 25LC010A serial EEPROM is used to store the starter kit’s serial number and debug control information. DS51780A-page 28 © 2008 Microchip Technology Inc.

Hardware 4.3 BOARD COMPONENTS Figure4-5 identifies the key starter kit hardware components. Table4-1 provides descriptions for the hardware components. FIGURE 4-5: STARTER KIT D2 D3 D4 D5 A1 A2 A3 A4 A5 ® D1 M D7 D6 A11 A10 A9 A8 A6 A7 TABLE 4-1: STARTER KIT HARDWARE COMPONENT DESCRIPTIONS Ref Component Ref Component D1 Mini-B USB Connector (J1) A3 Audio Power Amplifier (U7) D2 MCP1727 (U1) A4 Anti-Aliasing Low-Pass Filter (Speech) (U6: A, B) D3 Low VCE Saturation PNP Transistor Switch (Q1) A5 OLED Display (LED) D4 Debug Status LED (D18) A6 Switch S1 D5 System Power STATUS LED (D19) A7 Switch S2 D6 PIC18F67J50 MCU (U2) A8 Differential Amplifier (External Sensor) (U4: A) D7 25LC010A SERIAL EEPROM (U3) A9 Anti-Aliasing Low-Pass Filter (External Sensor) (U4: B) A1 PIC24HJ128GP504 (MCU) (U5) A10 Sensor Differential Inputs (External Sensor) (TP11 and TP12) A2 Speaker (SP2) A11 Triaxial Analog Accelerometer (U8) Legend: D# = Debug components A# = Audio components © 2008 Microchip Technology Inc. DS51780A-page 29

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide 4.3.1 Debug Components The following components support the debug function of the starter kit. See Appendix A.“Schematics” for debug schematics. 4.3.1.1 MINI-B USB CONNECTOR (J1) Provides system power and bidirectional communication between the host PC and starter kit. 4.3.1.2 MCP1727 (U1) 3.3V Linear regulator. Regulates the USB unregulated voltage to 3.3 volts (with respect to VSS) and supplies the starter kit with system power. 4.3.1.3 LOW VCE SATURATION PNP TRANSISTOR SWITCH (Q1) Provides target power (via high-side switching) to the PIC24HJ128GP504 (and ancillary circuitry) via control by the PIC18F67J50 programming/debugging MCU. 4.3.1.4 DEBUG STATUS LED (D18) When lit, indicates that communication between the starter kit and MPLAB IDE has been successfully established. 4.3.1.5 SYSTEM POWER STATUS LED (D19) When lit, indicates that the starter kit is powered via the USB. 4.3.1.6 PIC18F67J50 MCU (U2) Controls the programming/debugging operations of the target PIC24HJ128GP504 device. 4.3.1.7 25LC010A SERIAL EEPROM (U3) Provides nonvolatile parameter storage for the PIC18F67J50 MCU. 4.3.2 Application Components The following components support the application portion of the starter kit. See Appendix A.“Schematics” for application schematics. 4.3.2.1 PIC24HJ128GP504 (MCU) (U5) The PIC24HJ128GP504 microcontroller unit (MCU) provides the computation and processing resource for application development on the starter kit. This MCU features 128 KB of program Flash and 4 KB RAM. The application can either use the on-chip FRC or the external 12 MHz signal as clock source. 4.3.2.2 SPEAKER (SP2) The speaker is connected to the Output Compare (OC) module. The OC module produces the PWM-modulated speech signal that is played through the speaker after filtering. DS51780A-page 30 © 2008 Microchip Technology Inc.

Hardware 4.3.2.3 AUDIO POWER AMPLIFIER (U7) The audio power amplifier is a National Semiconductor, LM4853 Mono 1.5W/Stereo 300mW amplifier. Gain has been set to 3.3 using the resistors R56 and R59, as shown in Equation4-2. EQUATION 4-2: AUDIO POWER AMPLIFIER GAIN Gain = 2×⎛R-----5--6---⎞ ⎝R59⎠ 4.3.2.4 ANTI-ALIASING LOW-PASS FILTER (SPEECH) (U6: A, B) The PWM signal from the output compare module on the PIC24H MCU device on the board is demodulated by the PWM low-pass filter. This 4th-order filter uses two op amps (U6: A and U6: B) on the MCP617 dual op amp IC. The cut-off frequency of the filter is ~4kHz. 4.3.2.5 OLED DISPLAY (LED) The starter kit has a 128 x 64 pixel, monochrome organic LED array, which provides a wide range of graphics and alphanumeric display options. 4.3.2.6 SWITCH S1 AND SWITCH S2 The starter kit has two press switches, S1 and S2, which are connected to the I/O ports on the PIC24H MCU device. The functions of these two switches are defined by the application. 4.3.2.7 DIFFERENTIAL AMPLIFIER (EXTERNAL SENSOR) (U4: A) The first op amp of the U4 component MCP617 is used to construct the differential amplifier circuit, which is used in the analog signal conditioning circuit for the external sensor. 4.3.2.8 ANTI-ALIASING LOW-PASS FILTER (EXTERNAL SENSOR) (U4: B) The second op amp of the U4 component MCP617 is used to construct the anti-aliasing low-pass filter circuit, which follows the differential amplifier circuit in the analog signal conditioning circuit for the external sensor. 4.3.2.9 SENSOR DIFFERENTIAL INPUTS (EXTERNAL SENSOR) (TP11 AND TP12) The interface holes, TP11 and TP12, can be used to connect the differential outputs of the external sensor. TP11 takes in the positive node and TP12 the negative node. 4.3.2.10 TRIAXIAL ANALOG ACCELEROMETER (U8) The starter kit features a triaxial analog accelerometer, BMA140, from Bosch Sensortec. © 2008 Microchip Technology Inc. DS51780A-page 31

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide NOTES: DS51780A-page 32 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Appendix A. Schematics This appendix provides the following schematics for the MPLAB Starter Kit for PIC24H Microcontrollers: SectionA.1“Application Schematics”: • FigureA-1: Processor Schematic • FigureA-2: Accelerometer Schematic • FigureA-3: Speaker Schematic • FigureA-4: Differential Amplifier and Low-Pass Filter Schematic • FigureA-5: Organic LED (OLED) Display Schematic • FigureA-6: User Switches and Test Points Schematics SectionA.2“Debug Schematics”: • FigureA-7: USB Interface/Target Power Switching and Debug Input and Control Schematics (Sheet 1 of 2) • FigureA-8: USB Interface/Target Power Switching and Debug Input and Control Schematics (Sheet 2 of 2) © 2008 Microchip Technology Inc. DS51780A-page 33

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide A.1 APPLICATION SCHEMATICS FIGURE A-1: PROCESSOR SCHEMATIC SWITCHED_+3.3V SWITCHED_+3.3V AVDD R28 10R C25 R29 10R 0.1 UF 4567 DDDD PPPP MMMM PPPP 4443424140393837363534 8765DS54394 BBBBDSCCCAA RRRRVVRRRRR PMPD3 1 RB9 RB4 33 AUDIO_OUT 2 RC6 RA8 32 SWITCH_S2 3 U5 31 PMPA0 RC7 OSC0 4 RC8 QFN44_8X8 OSC1 30 TARGET_REFERENCE_CLOCK 56 DRICS9VREG VVSDSD 2298 C24 0.1 UF SWITCHED_+3.3V 7 27 VCAP/VDDCORE RC2 SWITCH_S1 C18 PMPD2 8 RB10 RC1 26 SENSOR 10 uF PMPD1 9 RB11 RC0 25 ACCEL_Z 10 24 PMPD0 RB12 RB3 ACCEL_Y 11 23 PMPRD RB13 RB2 ACCEL_X A10A7B14B15VSSVDD CLRA0A1B0B1 RRRRAA MRRRR 1213 141516171819202122 R1 T SWITCHED_+3.3V PMPWPMCS RESE TATARRGGEETT_C_DLAOTCAK R26 AVDD 10K R27 TARGET_MCLR 330R FIGURE A-2: ACCELEROMETER SCHEMATIC U8 AVDD 2 BMA140 1 1 VDD1EL.0 AMUX 11 2 S 10 VDD2 X.OUT ACCEL_X 3 9 GND1 Y.OUT ACCEL_Y 4 8 GND2 Z.OUT ACCEL_Z C36 C20 5 1 7 10 uF 0.1 uF ST EL. TEST S 6 DS51780A-page 34 © 2008 Microchip Technology Inc.

Schematics FIGURE A-3: SPEAKER SCHEMATIC SWITCHED_+3.3V U6:A C31 C32 R61 R62 MCP617-I/SN 0.1 UF AUDIO_OUT 9.31K 19.1K 5VINV+ R50 R54 3 8 0.1 uF 2700C p3F8 6VINUB-6:B7 8.45K 12.4K C26 2VVIINNAA+- 1 4 MCP61-I/SN 2700 pF C37 C34 3300 pF 5600 pF R56 33K SWITCHED_+3.3V LM4853MM_MSOP10 C33 R59 1 10 Left_IN Left_OUT 1.2 UF 20K 23Shutdown VDD 98 SP2 HP_IN BLT_OUT+ GC0251K-ND 4GND Bypass 7 C39 R60 5Right_IN Right_OUT 6 100 UF 100K C29 C30 U7 0.1 uF 1 uF R63 1K FIGURE A-4: DIFFERENTIAL AMPLIFIER AND LOW-PASS FILTER SCHEMATIC AVDD C27 C28 0.1 uF 47 nF U4:A MCP617-I/SN TP11 R51 1K 3VINA+8 1 R55 R52 TP12 R53 1K 2VINA- 7.87K 13.3K 5VINV+ SENSOR 4 VINB- 7 R57 C35 6 100K 22000 pF U4:B MCP617-I/SN R58 100K © 2008 Microchip Technology Inc. DS51780A-page 35

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide FIGURE A-5: ORGANIC LED (OLED) DISPLAY SCHEMATIC SWITCHED_+3.3V L3 D5 100 uH MBR0520L C45 C44 1 10 D3 R40 1 LED1 NC 930K 1% 2 GND Q4 G1 SW 3 SW MGSF1N02LT1 SWITCHED_+3.3V 4 VDD2 S2 FB 5 FB 6 RESE SENSE 7 VBREF VBREF R38 8 VDD1 .12 ohm 1% R39 C43 SWITCHED_+3.3V 9 CB6 110K 1% 1000 pF 10 PS PMCS1 11 CS 12 RESET RES PMPA0 13 A0 PMPWR 14 WR PMPRD 15 RD 16 VCOMH VCOMH 17 VPP VPP 18 C40 C42 C41 PMPD0 19 D0 6.8 4.7 1 PMPD1 20 D1 PMPD2 D2 21 PMPD3 D3 22 PMPD4 D4 23 PMPD5 D5 PMPD6 24 D7 PMPD7 25 D6 26 IREF IREF 27 R37 NC 820K LED_OLED_HS1101A FIGURE A-6: USER SWITCHES AND TEST POINTS SCHEMATICS SWITCHED_+3.3V TP7 R31 R30 TP8 10K 10K SWITCH_S2 SWITCH_S1 2 1 21 TP9 C22 C23 0.1 UF S2 0.1 UF S1 TP10 34 3 4 B3F-1002-G B3F-1002-G DS51780A-page 36 © 2008 Microchip Technology Inc.

Schematics K A C T O A L D C 2) T_ T_ F GE GE O R R HEET 1 330TA 330 TA330 +3.3V RIAL_RX1 RIAL_TX1 D DEBUG INPUT AND CONTROL SCHEMATICS (S R20 R21 R23 R22R24ELECT_SERIAL_EEPROM_1 4.7K4.7K OWER_GOOD_+3.3V+3.3V R25R17 10K10K48SWITCH_TO_TARGET_47464544WRITE_PROTECT_SERIAL_EEPROM143C17R1242HOST_ICSP_PGC4133027 pF4012 MHz39Y138C8+3.3V37HOST_ICSP_PGD36HOST_MASTER_SPI_SDO27 pF35HOST_MASTER_SPI_SDI34HOST_MASTER_SPI_SCK33TARGET_MCLR +3.3V R7R6200K200KTEST_DEBUG_1HOST_ASYNC_SETP2 TEST_DEBUG_0HOST_ASYNC_SETP1 NG AN CHIP_S P 9472DKCRS/6RB0DRB1RRB2RB3RB4RB5RB6/RGDVSSOSC2/RA6OSC1/RA7VDDRB7/PGCRC5/SDO1RC4/SDI1RC3/SCK1 RC267CCRR23 HI 05 2IDS/5DR 0CR13 15 03 C 2ODS/4DR 4 1CR SWIT 32545555123DDDRRR 2_TQFP6 45DAADRRV79862222 +3.3V WER +3.3V 768555S0DSDDVVR UF67J50 01SAASRRV345222 7ER 8 2AR GET PO 093126566623465EEEEERRRRR PIC1 /VECAP GERDSBV3DSSNAVVURVAAE1902821221 E/TAR G CK 46 RE1RE0RG0RG1RG2RG3MCLRRG4VSSVDDCORRF7RF6RF5RF4/D+RF3/D- RF2 71 C50.1 uF D_+3.3V CHEMATICS USB INTERFAC OST_LED_RUN_DEBU ET_REFERENCE_CLO 1234567R2330891011121314D+15D-16 (RF2 – DO NOT USEDue to USB routing) +3.3V C61uF SWITCHE S H G F G TAR CLR C1310 u U M DEB E A-7: TP5 ST_ICSP_ R O U H 2 G . A FI © 2008 Microchip Technology Inc. DS51780A-page 37

® MPLAB Starter Kit for PIC24H Microcontrollers User’s Guide EY LP BP 2) HASU CS (SHEET 2 OF C141uF HOST_MASTER_SPI_SDI C010A_S08_SN HOST MCU SWITC3.3V REGULATED SWITCHED_+3.3V POWER_GOOD_+3.3V L ATI OM 2 U3 25 M R O OL SCHE Serial EEP +3.3V 85VccSIS6SCK1CS3WP7HOLDVss4 P6 R152.2K C1947pF ND DEBUG INPUT AND CONTR R1110K HOST_MASTER_SPI_SDOHOST_MASTER_SPI_SCK CHIP_SELECT_SERIAL_EEPROM_1 RITE_PROTECT_SERIAL_EEPROM1 R10 1K TP4T SYSTEM POWERZXTP25020CFHINDICATORQ123EC1D18BGREENR19C11C9R9C1010K0.1uF1.0uF0.01uFR132.2K330R R16330R SWITCH_TO_TARGET_+3.3V Logic ‘0’: Connect +3.3V to targetLogic ‘1’: Disconnect +3.3V from target W A R SWITCHING )SS 3.3V LDOAR REGULATO+3.3VU18VVOUTIN7VSENSEIN6CDELAYSHDN5GNDPWRGDR8CP1727_DFN8200K R d V NE 1234 M GURE A-8:USB INTERFACE/TARGET POWE PIC18F67J50 Bypass/Decoupling Capacitors (V pin 26 and V)(V pin 38 and V)(V pin 57 anDDSSDDSSDD+3.3V+3.3V+3.3V C7C15C121uF1uF1uF Status LED – Debug+3.3V D19GREEN R14330 HOST_LED_RUN_DEBUG USB INTERFACELI(BUS POWERED)TP3J1L10RR51VVINBUS2D-3D+4ID (NC)5C4C1C3R3C20.01uF0.001uF200K0.1uF2.2uF6,7,8,9 0RR4 FI DS51780A-page 38 © 2008 Microchip Technology Inc.

MPLAB® STARTER KIT FOR PIC24H MICROCONTROLLERS USER’S GUIDE Index A O Accelerometer Interface......................................14, 26 OLED Display Interface......................................14, 26 Amplifier Gain.....................................................27, 31 Operational Requirements.........................................8 Analog Conditioning Circuitry...................................27 Overview....................................................................7 B P Board Components..................................................29 Programmer.............................................................22 Board Setup...............................................................8 R Breakpoints..............................................................19 Build Configuration...................................................23 Reading, Recommended...........................................3 Reserved Resources................................................22 C Reset........................................................................19 Configuration Bits.....................................................23 Run...........................................................................19 Customer Notification Service....................................4 S Customer Support......................................................5 Schematics D Application Debug......................................................................28 Accelerometer............................................34 Executive..........................................................18 Differential Amplifier and Low-Pass Filter..35 Reserved Resources........................................22 Processor...................................................34 Setup................................................................18 Speaker.....................................................35 Debug/Release........................................................23 User Switches and Test Points..................36 Demo2.....................................................................15 Debug Demonstration Application.........................................9 USB Interface Schematic/Target Documentation Power Switching Schematic................37, 38 Conventions........................................................2 Setup..........................................................................8 Layout.................................................................1 Software Installation.................................................17 Speaker Interface...............................................14, 26 E Speech Sampling Interface Schematic....................38 External Sensor Interface........................................15 Step..........................................................................19 H T Halt...........................................................................19 Troubleshooting.......................................................23 Hardware Installation...............................................17 U Host Computer Requirements....................................8 Unable to Enter Debug Mode...................................23 I W Install........................................................................17 Internet Address.........................................................4 Warranty Registration................................................3 Watch Window.........................................................19 M WWW Address...........................................................4 Microchip Internet Web Site.......................................4 MPLAB IDE..............................................................17 © 2008 Microchip Technology Inc. DS51780A-page 39

Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office Asia Pacific Office India - Bangalore Austria - Wels 2355 West Chandler Blvd. Suites 3707-14, 37th Floor Tel: 91-80-4182-8400 Tel: 43-7242-2244-39 Chandler, AZ 85224-6199 Tower 6, The Gateway Fax: 91-80-4182-8422 Fax: 43-7242-2244-393 Tel: 480-792-7200 Harbour City, Kowloon India - New Delhi Denmark - Copenhagen Fax: 480-792-7277 Hong Kong Tel: 91-11-4160-8631 Tel: 45-4450-2828 Technical Support: Tel: 852-2401-1200 Fax: 91-11-4160-8632 Fax: 45-4485-2829 http://support.microchip.com Web Address: Fax: 852-2401-3431 India - Pune France - Paris www.microchip.com Australia - Sydney Tel: 91-20-2566-1512 Tel: 33-1-69-53-63-20 Tel: 61-2-9868-6733 Fax: 91-20-2566-1513 Fax: 33-1-69-30-90-79 ADtullaunthta, GA Fax: 61-2-9868-6755 Japan - Yokohama Germany - Munich Tel: 678-957-9614 China - Beijing Tel: 81-45-471- 6166 Tel: 49-89-627-144-0 Tel: 86-10-8528-2100 Fax: 49-89-627-144-44 Fax: 678-957-1455 Fax: 81-45-471-6122 Fax: 86-10-8528-2104 Italy - Milan Boston Korea - Daegu China - Chengdu Tel: 39-0331-742611 Westborough, MA Tel: 82-53-744-4301 Tel: 774-760-0087 Tel: 86-28-8665-5511 Fax: 82-53-744-4302 Fax: 39-0331-466781 Fax: 774-760-0088 Fax: 86-28-8665-7889 Korea - Seoul Netherlands - Drunen Chicago China - Hong Kong SAR Tel: 82-2-554-7200 Tel: 31-416-690399 Itasca, IL Tel: 852-2401-1200 Fax: 82-2-558-5932 or Fax: 31-416-690340 Tel: 630-285-0071 Fax: 852-2401-3431 82-2-558-5934 Spain - Madrid Fax: 630-285-0075 China - Nanjing Malaysia - Kuala Lumpur Tel: 34-91-708-08-90 Dallas Tel: 86-25-8473-2460 Tel: 60-3-6201-9857 Fax: 34-91-708-08-91 Addison, TX Fax: 86-25-8473-2470 Fax: 60-3-6201-9859 UK - Wokingham Tel: 972-818-7423 China - Qingdao Malaysia - Penang Tel: 44-118-921-5869 Fax: 972-818-2924 Tel: 86-532-8502-7355 Tel: 60-4-227-8870 Fax: 44-118-921-5820 Detroit Fax: 86-532-8502-7205 Fax: 60-4-227-4068 Farmington Hills, MI China - Shanghai Philippines - Manila Tel: 248-538-2250 Tel: 86-21-5407-5533 Tel: 63-2-634-9065 Fax: 248-538-2260 Fax: 86-21-5407-5066 Fax: 63-2-634-9069 Kokomo China - Shenyang Singapore Kokomo, IN Tel: 86-24-2334-2829 Tel: 65-6334-8870 Tel: 765-864-8360 Fax: 86-24-2334-2393 Fax: 65-6334-8850 Fax: 765-864-8387 China - Shenzhen Taiwan - Hsin Chu Los Angeles Tel: 86-755-8203-2660 Tel: 886-3-572-9526 Mission Viejo, CA Fax: 86-755-8203-1760 Fax: 886-3-572-6459 Tel: 949-462-9523 Fax: 949-462-9608 China - Wuhan Taiwan - Kaohsiung Tel: 86-27-5980-5300 Tel: 886-7-536-4818 Santa Clara Fax: 86-27-5980-5118 Fax: 886-7-536-4803 Santa Clara, CA China - Xiamen Taiwan - Taipei Tel: 408-961-6444 Tel: 86-592-2388138 Tel: 886-2-2500-6610 Fax: 408-961-6445 Fax: 86-592-2388130 Fax: 886-2-2508-0102 Toronto China - Xian Thailand - Bangkok Mississauga, Ontario, Tel: 86-29-8833-7252 Tel: 66-2-694-1351 Canada Fax: 86-29-8833-7256 Fax: 66-2-694-1350 Tel: 905-673-0699 Fax: 905-673-6509 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 01/02/08 DS51780A-page 40 © 2008 Microchip Technology Inc.