dsPICDEM™ 2 Development Board User’s Guide © 2005 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.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Table of Contents Preface ........................................................................................................................... 1 Chapter 1. Introduction 1.1 Introduction ..................................................................................................... 7 1.2 Highlights ........................................................................................................ 7 1.3 dsPICDEM™ 2 Development Board ................
dsPICDEM 2 Development Board User’s Guide 5.5 Observing the Sample Application ............................................................... 36 5.6 In-Circuit Debugging ..................................................................................... 37 5.7 Summary ...................................................................................................... 38 Chapter 6. Using the dsPIC30F3010 6.1 Introduction ..................................................................................
Chapter 11. Using the dsPIC30F4011 11.1 Introduction ................................................................................................. 69 11.2 Highlights .................................................................................................... 69 11.3 Board Setup for the dsPIC30F4011 Sample Application ........................... 69 11.4 Device Programming .................................................................................. 71 11.5 Observing the Sample Application ..
dsPICDEM 2 Development Board User’s Guide DS51558A-page iv © 2005 Microchip Technology Inc.
dsPICDEM™ 2 DEVELOPMENT 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, including errata documents applicable to this product. Also, refer to the errata information in Appendix C.
dsPICDEM 2 Development Board User’s Guide • Chapter 4. Using the dsPIC30F2011 – This chapter describes how to configure the dsPICDEM 2 Development Board for use with the dsPIC30F2011 Digital Signal Controller. It provides suggested procedures for device programming and in-circuit debugging of the dsPIC30F2011using the sample application. • Chapter 5. Using the dsPIC30F2012 – This chapter describes how to configure the dsPICDEM 2 Development Board for use with the dsPIC30F2012 Digital Signal Controller.
Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Initial caps Quotes Underlined, italic text with right angle bracket Bold characters ‘bnnnn Text in angle brackets < > Courier font: Plain Courier Italic Courier 0xnnnn Square brackets [ ] Curly brackets and pipe character: { | } Ellipses... © 2005 Microchip Technology Inc.
dsPICDEM 2 Development Board User’s Guide WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users 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 dsPICDEM 2 Development Board. Other useful documents are listed below.
Preface MPLAB® C30 C Compiler User’s Guide (DS51284) The purpose of this document is to help you use Microchip’s MPLAB C30 C compiler for dsPIC DSC devices to develop your application. MPLAB C30 is a GNU-based language tool, based on source code from the Free Software Foundation (FSF). For more information about the FSF, see www.fsf.org.
dsPICDEM 2 Development Board User’s Guide • 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 SIM simulator, MPLAB IDE Project Manager and general editing and debugging features. • Programmers – The latest information on Microchip programmers. These include the MPLAB PM3 and PRO MATE® II device programmers and the PICSTART® Plus and PICkit® 1 development programmers.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 1. Introduction 1.1 INTRODUCTION The dsPICDEM™ 2 Development Board is a development and evaluation tool that helps you create embedded applications using dsPIC30F Digital Signal Controllers (DSC) in 18-pin PDIP, 28-pin SPDIP and 40-pin PDIP packages. The dsPICDEM™ 2 Development Board provides both a hardware and software baseline capability to help jump start your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 1-1: 1.4 dsPICDEM™ 2 DEVELOPMENT BOARD dsPICDEM™ 2 DEVELOPMENT BOARD RESOURCES The dsPICDEM™ 2 Development Board accommodates the devices listed in Table 1-1.
Introduction The dsPICDEM™ 2 must be configured for the device you have chosen for your application. Switches and headers are provided to connect hardware components on the board with corresponding pins on the dsPIC30F device. Figure 1-2 shows the location of hardware components and configuration headers that need to be set up depending on the dsPIC30F device.
dsPICDEM 2 Development Board User’s Guide FIGURE 1-3: dsPICDEM™ 2 DEVELOPMENT BOARD LAYOUT Sockets for Motor Control Family Devices: U2A1 U2B1 dsPIC30F2010 dsPIC30F3010 dsPIC30F3011 dsPIC30F4011 dsPIC30F4012 1.4.
Introduction 1.4.6 Reset Switch This pushbutton switch (S1) is tied to the MCLR pin on the dsPIC30F device. It is used to reset the device regardless of the socket used. 1.4.7 Device Clocking Device clocking can be provided by on-chip RC oscillators, on-board crystal oscillators or external sources. Crystal (Y1) provides a 7.3728 MHz oscillator for the motor control device. Crystal (Y2) provides a 7.3728 MHz oscillator for the general purpose and sensor devices. 1.4.
dsPICDEM 2 Development Board User’s Guide 1.5 SAMPLE APPLICATION PROJECTS The dsPICDEM™ 2 Development Kit CD contains sample projects for each of the dsPIC DSC devices supported by the dsPICDEM™ 2 Development Board. These sample programs are intended to jump start your application development by showing you how to implement and configure dsPIC30F peripherals such as A/D converters, external interrupts, timers, SPI, and UART interfaces and I/O ports.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 2. Getting Started 2.1 INTRODUCTION The dsPICDEM™ 2 Development Board provides both a hardware and software baseline capability to help jump start your application. The board is pre-configured for and populated with a dsPIC30F4011 Digital Signal Controller (DSC). The dsPIC30F4011 is preprogrammed with a sample application program ready to run out of the box.
dsPICDEM 2 Development Board User’s Guide Out-of-the-box, you can power up the dsPICDEM™ 2 Development Board and run the sample application on the dsPIC30F4011 device. The objective of this process is to acquaint you with the board and demonstrate how the dsPIC30F device interacts with the hardware components used for the demo (see Section 2.4 “Out-of-the-Box Demo”). Eventually, as you develop your own application, you will need to program and debug the dsPIC30F device.
Getting Started 2.4.2 Connect PC and Start HyperTerminal Session Follow the information in Figure 2-2 to set up your PC to operate with the dsPICDEM™ 2 Development Board. 1. Use an RS-232 cable to connect the serial port on your PC to the UART connector (J2) on the board. 2.
dsPICDEM 2 Development Board User’s Guide 2.4.3 Observe Sample Application To run and observe the sample application follow these steps: 1. Plug the 9 VDC cable into the DC IN connector (J4). The PWR ON indicator should illuminate. 2. Press the RESET ALL pushbutton (S1). The LCD displays the current temperature and voltage values, which represent the A/D conversions from the temperature sensor and potentiometer, respectively. dsPICDEM™ 2 Board T=+18C Pot=3.
Getting Started 2.5 DEVICE PROGRAMMING PROCESS The second phase of the getting-started process introduces the MPLAB Integrated Development Environment (IDE) and MPLAB ICD 2 In-Circuit Debugger. The emphasis in this phase is to program the sample application into a dsPIC30F4011 device. After observing the demonstration, this process gets you ready to examine what you observed. 2.5.1 Connect MPLAB ICD 2 Follow the information in Figure 2-2 to set up the MPLAB ICD 2 for use as a programmer. 1.
dsPICDEM 2 Development Board User’s Guide FIGURE 2-5: OPEN WORKSPACE DIALOG 3. Select 30F4011/Demo.mcw. A project and workspace is created in MPLAB IDE. As shown in Figure 2-6, Demo.mcw is the workspace file and Demo.mcp is the project file. FIGURE 2-6: DS51558A-page 18 PROJECT WORKSPACE IN MPLAB® IDE © 2005 Microchip Technology Inc.
Getting Started 2.5.3 1. 2. 3. 4. Build the Project Select Project>Build All. Observe the progress of the build in the Output window. When BUILD SUCCEEDED displays you are ready to program the device. Program the dsPIC30F4011device (Programmer>Program) 2.5.4 Run the Application 1. From the Programmer menu, select Release from Reset to enable code exectution. 2. On the board, turn off the M ALL switch in S2. 3.
dsPICDEM 2 Development Board User’s Guide FIGURE 2-7: 2.6.2 CONFIGURATION BITS WINDOW Debugging the Code The MPLAB ICD 2 In-Circuit Debugger can be used to run, halt and step the code. A breakpoint can be set to halt the program after the code has executed the instruction at the breakpoint. The contents of the RAM and registers can be viewed whenever the processor has been halted.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 3. Using the dsPIC30F2010 3.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F2010 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F2010 device in a 28-pin SPDIP package, as shown in Figure 3-1. This device provides six 10-bit A/D (500 ksps) channels, a UART, an SPI module, an I2C™ module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution. U2B1 3.
dsPICDEM 2 Development Board User’s Guide 3. Plug the dsPIC30F2010 into socket U2B1. 4. Configure the hardware components as shown in Table 3-1. TABLE 3-1: dsPIC30F2010 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F2010 3.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F2010 using this process: 1. Plug the RJ11cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F2010 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F2010/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 3.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F2010 folder. 3. See information on LCD.
Using the dsPIC30F2010 3.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and peripheral modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 3-3: 3.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 4. Using the dsPIC30F2011 4.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F2011 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F2011 device in an 18-pin PDIP package, as shown in Figure 4-1. This device provides eight 12-bit A/D (100 ksps) channels, a UART, an SPI module, an I2C module and 12 I/O pins. A sample application program provides a software baseline for building your own embedded solution.
dsPICDEM 2 Development Board User’s Guide 4. Configure the hardware components as shown in Table 4-1. TABLE 4-1: dsPIC30F2011 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F2011 4.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F2011 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F2011 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F2011/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 4.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F2011 folder. 3. See information on LCD.
Using the dsPIC30F2011 4.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 4-3: 4.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 5. Using the dsPIC30F2012 5.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F2012 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F2012 device in an 28-pin, SPDIP package, as shown in Figure 5-1. This device provides ten 12-bit A/D (100 ksps) channels, a UART, an SPI module, an I2C module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution. U1B1 5.
dsPICDEM 2 Development Board User’s Guide TABLE 5-1: dsPIC30F2012 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F2012 5.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F2012 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F2012 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F2012/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 5.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F2012 folder. 3. See information on LCD.
Using the dsPIC30F2012 5.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and peripheral modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 5-3: 5.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 6. Using the dsPIC30F3010 6.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F3010 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F3010 device in a 28-pin SPDIP package, as shown in Figure 6-1. This device provides six 10-bit A/D (500 ksps) channels, a UART, an SPI module, an I2C™ module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution. U2B1 6.
dsPICDEM 2 Development Board User’s Guide 3. Plug the dsPIC30F3010 into socket U2B1. 4. Configure the hardware components as shown in Table 6-1. TABLE 6-1: dsPIC30F3010 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F3010 6.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F3010 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F3010 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F3010/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 6.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F3010 folder. 3. See information on LCD.
Using the dsPIC30F3010 6.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and peripheral modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 6-3: 6.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 7. Using the dsPIC30F3011 7.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F3011 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F3011 device in a 40-pin PDIP package, as shown in Figure 7-1. This device provides nine 10-bit A/D (500 ksps) channels, two UARTs, an SPI module, an I2C module and 30 I/O pins. A sample application program provides a software baseline for building your own embedded solution. U2A1 7.
dsPICDEM 2 Development Board User’s Guide 2. Remove any dsPIC30Fxxxx device currently plugged into the dsPICDEM 2 Development Board. 3. Plug the dsPIC30F3011 into socket U2A1. 4. Configure the hardware components as shown in Table 7-1. TABLE 7-1: dsPIC30F3011 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F3011 7.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F3011 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F3011 sample project (File>Open Workspace> from path/dsPICDEM 2 Development Kit/Example Software/30F3011/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 7.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F3011 folder. 3. See information on LCD.
Using the dsPIC30F3011 7.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 7-3: 7.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 8. Using the dsPIC30F3012 8.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F3012 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F3012 device in an 18-pin PDIP package, as shown in Figure 8-1. This device provides eight 12-bit A/D (100 ksps) channels, a UART, an SPI module, an I2C module and 12 I/O pins. A sample application program provides a software baseline for building your own embedded solution.
dsPICDEM 2 Development Board User’s Guide TABLE 8-1: dsPIC30F3012 CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F3012 8.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F3012 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F3012 sample project (File>Open Workspace>[path/dsPIC30F4013 Sample Project]) from path/dsPICDEM 2 Development Kit/Example Software/30F3012/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 8.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F3012 folder. 3. See information on LCD.
Using the dsPIC30F3012 8.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and peripheral modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 8-3: 8.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 9. Using the dsPIC30F3013 9.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F3013 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F3013 device in a 28-pin SPDIP package, as shown in Figure 9-1. This device provides ten 12-bit A/D (100 ksps) channels, two UARTs, an SPI module, an I2C module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution. U1B1 9.
dsPICDEM 2 Development Board User’s Guide 4. Configure the hardware components as shown in Table 9-1. TABLE 9-1: HARDWARE CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F3013 9.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F3013 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F3013 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F3013/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 9.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F3013 folder. 3. See information on LCD.
Using the dsPIC30F3013 9.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 9-3: 9.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 10. Using the dsPIC30F3014 10.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F3014 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F3014 device in a 40-pin PDIP package, as shown in Figure 10-1. This device provides thirteen 12-bit A/D (100 ksps) channels, two UARTs, an SPI module, an I2C module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution.
dsPICDEM 2 Development Board User’s Guide 2. Remove any dsPIC30Fxxxx device currently plugged into the dsPICDEM 2 Development Board. 3. Plug the dsPIC30F3014 into socket U1A1. 4. Configure the hardware components as shown in Table 10-1. TABLE 10-1: HARDWARE CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F3014 10.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F3014 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F3014 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F3014/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 10.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F3014 folder. 3. See information on LCD.
Using the dsPIC30F3014 10.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and peripheral modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide 10.7 SUMMARY This chapter has provided specific instructions for using the dsPICDEM 2 Development Board with a dsPIC30F3014 device. If you have reviewed this process, you should be able to: • • • • • DS51558A-page 68 Configure the dsPICDEM 2 Development Board for the dsPIC30F3014 device. Set up MPLAB IDE to use the MPLAB ICD 2 In-Circuit Debugger. Locate the sample application for the dsPIC30F2010 device. Program the chip with the MPLAB ICD 2.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 11. Using the dsPIC30F4011 11.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F4011 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F4011 device in a 40-pin PDIP package, as shown in Figure 11-1. This device provides nine 10-bit A/D (500 ksps) channels, two UARTs, an SPI module, an I2C module, a CAN module and 30 I/O pins.
dsPICDEM 2 Development Board User’s Guide 1. Disconnect the power source. 2. Remove any dsPIC30Fxxxx device currently plugged into the dsPICDEM 2 Development Board. 3. Plug the dsPIC30F4011 into socket U2A1. 4. Configure the hardware components as shown in Table 11-1. TABLE 11-1: dsPIC30F4011 CONFIGURATION SETTINGS Header Socket U2A1 Component No.
Using the dsPIC30F4011 11.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F4011 using this process: 1. Plug the RJ11 cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F4011 sample project (File>Open Workspace) from path\dsPICDEM2 Development Kit\Example Software\30F4011\Demo.
dsPICDEM 2 Development Board User’s Guide 11.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F2010 folder. 3. See information on LCD.
Using the dsPIC30F4011 11.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 11-3: 11.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 12. Using the dsPIC30F4012 12.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F4012 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F4012 device in a 40-pin PDIP package, as shown in Figure 12-1. This device provides six 10-bit A/D (500 ksps) channels, a UART, an SPI module, an I2C module, a CAN module and 20 I/O pins. A sample application program provides a software baseline for building your own embedded solution.
dsPICDEM 2 Development Board User’s Guide 2. Remove any dsPIC30Fxxxx device currently plugged into the dsPICDEM 2 Development Board. 3. Plug the dsPIC30F4012 into socket U2B1. 4. Configure the hardware components as shown in Table 12-1. TABLE 12-1: HARDWARE CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F4012 12.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F4012 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F4012 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F4012/Demo.
dsPICDEM 2 Development Board User’s Guide 12.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F4012 folder. 3. See information on LCD.
Using the dsPIC30F4012 12.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide FIGURE 12-3: 12.6.2 CONFIGURATION BITS WINDOW Examining the Code After the application has been reprogrammed to use the MPLAB ICD 2 as a debugger, you can use MPLAB IDE to run, halt and step the program. You can set breakpoints to halt the program and examine the actual code at any point. You can also examine the contents of the RAM and registers whenever the processor is halted. Refer to Section 2.3 “Getting Started” for an overview of the sample application.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Chapter 13. Using the dsPIC30F4013 13.1 INTRODUCTION This chapter assumes you have chosen the dsPIC30F4013 for your application. The dsPICDEM 2 Development Board supports a dsPIC30F4013 device in a 40-pin PDIP package, as shown in Figure 13-1. This device provides thirteen 12-bit A/D (100 ksps) channels, two UARTs, an SPI module, an I2C module, a CAN module and 30 I/O pins.
dsPICDEM 2 Development Board User’s Guide 1. Disconnect the power source. 2. Remove any dsPIC30Fxxxx device currently plugged into the dsPICDEM 2 Development Board. 3. Plug the dsPIC30F4013 into socket U1A1. 4. Configure the hardware components as shown in Table 13-1. TABLE 13-1: HARDWARE CONFIGURATION SETTINGS Header Component No.
Using the dsPIC30F4013 13.4 DEVICE PROGRAMMING Load the sample application program for the dsPIC30F4013 using this process: 1. Plug the RJ11 (telephone) cable from the MPLAB ICD 2 into the ICD header (J1). Make sure the USB cable from the MPLAB ICD 2 is connected to your PC. 2. Start MPLAB IDE. 3. Open the dsPIC30F4013 sample project (File>Open Workspace) from path/dsPICDEM 2 Development Kit/Example Software/30F4013/Demo.mcw.
dsPICDEM 2 Development Board User’s Guide 13.5 OBSERVING THE SAMPLE APPLICATION 1. Press RESET ALL. The program begins to run. 2. Set up a HyperTerminal session on the PC to run with these parameters: Port Setting Value Bits per second 9600 Data bits 8 Parity None Stop bits 1 Flow control None As a shortcut, you can launch the Hyperterminal_RS232_dsPICDEM2.ht file in the dsPICDEM 2 Development Kit/Example Software/30F4013 folder. 3. See information on LCD.
Using the dsPIC30F4013 13.6 IN-CIRCUIT DEBUGGING The sample application program is intended to illustrate how the processor and I/O modules handle the functionality provided on the dsPICDEM 2 Development Board. The MPLAB ICD 2 In-Circuit Debugger was used to program the sample application into the dsPIC30F device. You can also use the MPLAB ICD 2 In-Circuit Debugger to examine this baseline code to determine specific applicability to your application.
dsPICDEM 2 Development Board User’s Guide 13.7 SUMMARY This chapter has provided specific instructions for using the dsPICDEM 2 Development Board with a dsPIC30F4013 device. If you have reviewed this process, you should be able to: • • • • • DS51558A-page 86 Configure the dsPICDEM 2 Development Board for the dsPIC30F4013 device. Set up MPLAB IDE to use the MPLAB ICD 2 In-Circuit Debugger. Locate the sample application for the dsPIC30F4013 device. Program the chip with the MPLAB ICD 2.
dsPICDEM™ 2.0 DEVELOPMENT BOARD USER’S GUIDE Chapter 14. Hardware 14.1 HARDWARE OVERVIEW This chapter describes the dsPICDEM™ 2 Development Board hardware, which features the components shown in Figure 14-1. FIGURE 14-1: 33 dsPICDEM™ 2 DEVELOPMENT BOARD 34 35 1 2 32 3 4 5 6 31 7 30 8 9 10 29 11 12 13 28 14 27 15 26 25 16 17 24 18 23 © 2005 Microchip Technology Inc.
dsPICDEM 2 Development Board User’s Guide TABLE 14-1: No. dsPICDEM™ 1.1 DEVELOPMENT BOARD HARDWARE Hardware Element No. Hardware Element 1 CAN Port (see Section 14.1.6) 19 Switch S6 header (see Section 14.1.8) 2 CAN Transceiver (see Section 14.1.6) 20 Analog Potentiometer (see Section 14.1.12) 3 CAN Header (see Section 14.1.6) 21 Analog Potentiometer Header (see Section 14.1.12) 4 External Power Supply Inputs (see Section 14.1.
Hardware 14.1.2 dsPIC30F Device Sockets The left side of the dsPICDEM 2 Development Board includes sockets (U2B1 and U2A1) for 28 and 40-pin devices, respectively, in the Motor Control family. The right side of the board includes sockets (U1C1, U1B1 and U1A1) for 18, 28 and 40-pin devices, respectively, in the dsPIC30F General Purpose and Sensor family of devices.
dsPICDEM 2 Development Board User’s Guide EMUC1 & EMUD1 pin-pair, as well as the EMUC2 & EMUD2 pin-pair, for alternate debugging channels. This functionality has been provided by the DIP switches in S3 (for Motor Control family) and S4 (for Sensor and General-Purpose families). Table 14-3 shows the various alternate debugging channel options available to the user. These switches are represented in the schematics in Figure A-5: “dsPICDEM™ 2 Development Board Schematic (Sheet 4 of 7)”.
Hardware The LCD Controller accesses the LCD via a 4-pin parallel port and a 3-pin control line. For a detailed description of the communication protocol, see Appendix B. “Writing to LCD”. The schematics for the LCD connections on the board are provided in Figure A-4: “dsPICDEM™ 2 Development Board Schematic (Sheet 3 of 7)”. 14.1.6 CAN Port An MCP2551 Controller Area Network transceiver is provided on the dsPICDEM 2 Development Board.
dsPICDEM 2 Development Board User’s Guide 14.1.8 External Interrupt Switches Switches S5 and S6 can be connected to the external interrupt pins, INT0 and INT1, respectively on all supported dsPIC30F devices. Switches S5 and S6 are connected to the dsPIC DSC device through headers H6 and H7, respectively. The signal lines are normally pulled up to +5V DC through 4.7 kOhm resistors. Pressing the switch will short the line to ground.
Hardware 14.1.10 External Connection Headers Two 40-pin headers, H8 and H9, allow the user to connect hardware external to the dsPICDEM 2 Development Board into the circuit. The schematic of the external connection headers is shown in Figure A-6: “dsPICDEM™ 2 Development Board Schematic (Sheet 5 of 7)”. 14.1.11 Analog Temperature Sensor Temperature sensor, U5, is a -40°C to +125°C linear output TC1047A connected to analog channel AN3 of the dsPIC30F device through header H10.
dsPICDEM 2 Development Board User’s Guide NOTES: DS51558A-page 94 © 2005 Microchip Technology Inc.
dsPICDEM™ 2.0 DEVELOPMENT BOARD USER’S GUIDE Appendix A. Hardware Drawings and Schematics A.1 INTRODUCTION This Appendix provides a layout drawing of the printed circuit board followed by schematics for the dsPICDEM™ 2 Development Board. FIGURE A-1: © 2005 Microchip Technology Inc.
DS51558A-page 96 VDD GND RB5_1 RB4_1 RD0_1 OSC2_1 RC13_1 RC14_1 RB7_1 RB3_1 OSC1_1 RB6_1 RB2_1 VDD GND RB1_1 RD2_1 RD3_1 AGND RD8_1 RD9_1 AVDD RF6_1 RA11_1 MCLR RF3_1 RB0_1 RF2_1 RC14_1 RF0_1 VDD RC13_1 GND RB8_1 RF5_1 VDD RB7_1 OSC2_1 RD1_1 RB6_1 RF4_1 RD0_1 RB5_1 RF1_1 RB12_1 RB4_1 GND RB11_1 RB3_1 MCLR RD9_1 VDD RC14_1 RC13_1 OSC2_1 OSC1_1 GND RB5_1 RB4_1 RB3_1 RB2_1 RB1_1 RB0_1 VDD VDD VDD VDD VDD AVDD B dsPICDEM 2 RD8_1 RF6_1 RF3_1 R
© 2005 Microchip Technology Inc.
DS51558A-page 98 VDD SDI1 RF3_2 RE8_2 RF3_2 RF6_2 SCK1 RB4_1 E RS R/W D7 D6 GND VDD AGND D5 AVDD D4 CAN_RXD MCLR RB6_1 RF3_1 RF6_1 AVDD RF2_2 RF3_2 DATA CLK VDD VDD E RS R/W D7 D6 D5 D4 MCLR B dsPICDEM 2 VDD F FIGURE A-4: RF0_2 RF1_2 RF0_1 RF1_1 VDD GND CAN_TXD dsPICDEM 2 Development Board User’s Guide dsPICDEM™ 2 DEVELOPMENT BOARD SCHEMATIC (SHEET 3 OF 7) © 2005 Microchip Technology Inc.
© 2005 Microchip Technology Inc.
DS51558A-page 100 AVDD POT1 RB2_2 OSC1_2 OSC2_2 OSC2_1 OSC1_1 OSC1_1 VDD RB3_2 RB3_1 VDD OSC1_2 RF4_1 RF0_1 VDD RF5_1 RF1_1 GND VDD RB9_1 RB10_1 GND RB11_1 RB12_1 RD0_1 RF2_1 RF3_1 RD1_1 RF6_1 RD8_1 GND RD3_1 RD2_1 RD9_1 RA11_1 VDD RC14_1 GND GND RC13_1 GND VDD RB8_1 RB6_1 RB5_1 RB7_1 RB4_1 RB3_1 RB2_1 RC13_1 RC14_1 B MCLR dsPICDEM 2 GND RE1_2 RE3_2 RE5_2 GND RF1_2 RF5_2 RF3_2 RD0_2 VDD RD3_2 RE8_2 RC13_2 GND VDD RB7_2 RB5_2 RB3_2 RB1_2 VDD
Hardware Drawings and Schematics dsPICDEM™ 2 DEVELOPMENT BOARD SCHEMATIC (SHEET 6 OF 7) RD0_1 RD0_2 RD8_1 © 2005 Microchip Technology Inc.
dsPICDEM 2 Development Board User’s Guide dsPICDEM™ 2 DEVELOPMENT BOARD SCHEMATIC (SHEET 7 OF 7) VDD VDD B dsPICDEM 2 AVDD F FIGURE A-8: DS51558A-page 102 © 2005 Microchip Technology Inc.
dsPICDEM™ 2.0 DEVELOPMENT BOARD USER’S GUIDE Appendix B. Writing to LCD B.1 OVERVIEW A 2x16 ASCII-text LCD is provided on the dsPICDEM2 Development Board. dsPIC30F devices installed on the dsPICDEM2 development board may use this LCD to display characters. The interface to the LCD is via a 2-wire Serial Peripheral Interface (SPI™). dsPIC30F devices may send serial clock and data signals on 2 pins to the dsPIC30F2011 device that controls the 2x16 LCD. B.
dsPICDEM 2 Development Board User’s Guide B.4 LCD FIRMWARE PROGRAMMING: The LCD firmware resident on the dsPIC30F2011 device may be reprogrammed at any time using the MPLAB IDE project and workspace provided in this folder. In order to reprogram the firmware, the following steps need to be performed in sequence: 1. 2. 3. 4. 5. 6. 7. 8. 9. DS51558A-page 104 All switches on blocks S2, S3, and S4 should be turned OFF. All jumpers on header H1 should be removed. Install jumpers on header H11.
dsPICDEM™ 2.0 DEVELOPMENT BOARD USER’S GUIDE Appendix C. Board Errata C.1 H7 AND H6 LABELLING ERROR This Appendix illustrates and explains a labeling error on Revisions E and F of the dsPICDEM 2 printed circuit board (see Figure C-1). The SEL S6 and SEL S7 labels on Headers H6 and H7, respectively, are reversed. H7 actually enables S6 to be connected to INT1, and H6 enables S5 to be connected to INT0.
dsPICDEM 2 Development Board User’s Guide Notes: DS51558A-page 106 © 2005 Microchip Technology Inc.
dsPICDEM™ 2 DEVELOPMENT BOARD USER’S GUIDE Index A E Alternate UART1 header.......................................... 88 Analog Pot Header................................................... 88 Analog Potentiometer .............................................. 88 External Connection Headers .................................. 88 External Power Supply Inputs .................................. 88 B Free Software Foundation.......................................... 5 Board Configuration For dsPIC30F2010 .
dsPICDEM 2 Development Board User’s Guide Headers Analog Potentiometer ....................................... 88 CAN .................................................................. 88 External Connection.......................................... 88 LCD Controller .................................................. 88 LED Selection ................................................... 88 Host System Environment........................................ 12 T Temperature Sensor ................................
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.