background image

©

 2006 Microchip Technology Inc.

 

DS70099D

dsPICDEM™ 1.1 Plus

Development Board

User’s Guide

Summary of Contents for dsPICDEM 1.1 Plus

Page 1: ...2006 Microchip Technology Inc DS70099D dsPICDEM 1 1 Plus Development Board User s Guide...

Page 2: ...P is a service mark of Microchip Technology Incorporated in the U S A All other trademarks mentioned herein are property of their respective companies 2006 Microchip Technology Incorporated Printed in...

Page 3: ...ject 14 2 5 Building the Code 19 2 6 Programming the Chip 21 2 7 Debugging the Code 25 Chapter 3 dsPIC30F Demonstration Program Operation 3 1 Introduction 29 3 2 Highlights 29 3 3 Demonstration Progra...

Page 4: ...Drawings and Schematics A 1 Introduction 67 A 2 Highlights 67 Appendix B LCD Controller Specification B 1 Overview 75 B 2 LCD Controller Interface 75 B 3 Commands 76 B 4 General Commands 78 B 5 Charac...

Page 5: ...ss for getting your dsPICDEM 1 1 Plus Development Board up and running with the MPLAB In Circuit Debugger 2 ICD 2 using dsPIC30F devices Chapter 3 Demonstration Program Operation This chapter presents...

Page 6: ...ter presents the features of the dsPICDEM 1 1 Plus Development Board in more detail Appendix A Hardware Drawings and Schematics This Appendix illustrates the dsPICDEM 1 1 Plus Development Board layout...

Page 7: ...ialog button Click OK A tab Click the Power tab N Rnnnn A number in verilog format where N is the total number of digits R is the radix and n is a digit 4 b0010 2 hF1 Text in angle brackets A key on t...

Page 8: ...an overview of the features and functionality of the dsPIC DSC product family It helps determine how the dsPIC 16 bit Digital Signal Controller Family fits a specific product application For detailed...

Page 9: ...1025 Consult this document for more information pertaining to the installation and features of the MPLAB Integrated Development Environment IDE Software To obtain any of these documents contact the ne...

Page 10: ...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 Microch...

Page 11: ...ort is available through the web site at http support microchip com DOCUMENT REVISION HISTORY Revision D October 2006 This revision reflects an upgrade to the dsPICDEM 1 1 Plus Development Board to al...

Page 12: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 8 2006 Microchip Technology Inc NOTES...

Page 13: ...nt Board Kit dsPICDEM 1 1 Plus Development Board Features Supported Plug In Modules Running the dsPICDEM 1 1 Demonstration Program 1 3 dsPICDEM 1 1 PLUS DEVELOPMENT BOARD KIT The dsPICDEM 1 1 Plus Dev...

Page 14: ...wall adapter 9V DC power source input jack for development board LED power on indicator MPLAB ICD 2 and MPLAB ICE 4000 Connections MPLAB ICD 2 programming connector Jumper J8 for selection of processo...

Page 15: ...temperature sensor and digital potentiometer U10 Device Clocking 7 3728 MHz crystal X3 for dsPIC DSC device Socket U5 clock oscillator for dsPIC DSC device alternate clock source X3 removed Pad for 32...

Page 16: ...t with typical user application programs When you apply power to the dsPICDEM 1 1 Plus Development Board the LCD menu displays these demonstration functions Data Acquisition Display Digital Signal Pro...

Page 17: ...ow Set a breakpoint and make the code halt at a chosen location Use the function keys to Reset Run Halt and Single Step the code 2 2 HIGHLIGHTS Items discussed in this chapter include Tutorial Overvie...

Page 18: ...ject Wizard to help create new projects Before starting create a folder for the project files for this tutorial C Tutorial is assumed in the instructions that follow From the dsPICDEM 1_1 Plus Develop...

Page 19: ...hat will be used the C Compiler is not used 2 In the Toolsuite Contents block select MPLAB ASM30 Assembler pic30 as exe 3 In the Location block click Browse and navigate to C Program Files Microchip M...

Page 20: ...c FIGURE 2 3 PROJECT WIZARD STEP 3 NAME YOUR PROJECT 2 4 3 Name Your Project 1 In the Project Name text box type MyProject 2 Click Browse and navigate to C Tutorial to place your project in the Tutori...

Page 21: ...C Program Files Microchip MPLAB ASM30 Suite Sup port gld folder and select the p30f6014A gld file 4 Click Add to include the file in the project The project now has two files 5 Click Next to continue...

Page 22: ...nc A project and workspace has now been created in MPLAB IDE MyProject mcw is the workspace file and MyProject mcp is the project file Double click the Tut6014A s file in the project window to open th...

Page 23: ...ource code level Before building there are settings required to tell MPLAB IDE where to find the include files and to reserve space for the extra debug code when the MPLAB ICD 2 is used The following...

Page 24: ...PLAB ASM30 Suite Support Inc This path tells MPLAB IDE where to find the Include files 2 5 2 Link for ICD 2 1 Select the MPLAB LINK30 tab to view the linker settings see Figure 2 8 2 Check Link for IC...

Page 25: ...e dsPIC30F6014A device in circuit on the dsPICDEM 1 1 Plus Development Board Use the following procedures to program the dsPIC30F6014A device 2 6 1 Set Up the Device Configuration 1 Use the Configure...

Page 26: ...uit Debugger 1 Before setting up the hardware check that the following jumpers are in place AVDD_JMP On J8 33F PGD3 30F 33F PGD3 30F J10 MCLR1 VDD_JMP On J21 On 5V J22 On 5V 2 Connect the MPLAB ICD 2...

Page 27: ...12 FIGURE 2 12 ENABLING MPLAB ICD 2 3 From the Debugger menu click Settings to display the MPLAB ICD Debugger settings 4 Select the Program tab 5 Check Allow ICD 2 to select memories and ranges as sho...

Page 28: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 24 2006 Microchip Technology Inc FIGURE 2 13 SETTING PROGRAM MEMORY SIZE...

Page 29: ...y should show the text in Figure 2 15 FIGURE 2 15 TUTORIAL LCD DISPLAY 2 7 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 h...

Page 30: ...he reset location The instruction at this location is goto __reset This code is added by the linker to make the program branch to the start of the code in the Tut6014A s file The code uses the __reset...

Page 31: ...se it has executed the prior lines of code up to and including mov 0xFFF0 w0 FIGURE 2 17 SOURCE CODE WINDOW 3 From the View menu select Watch to open a Watch window Figure 2 18 4 From the Add SFR pull...

Page 32: ...hown in Figure 2 19 FIGURE 2 19 SETTING BREAKPOINT In this example every time F9 is pressed to run the code it sends one character to the display and stops at the breakpoint After the first four space...

Page 33: ...monstration Performance Metrics Board Self Test Code Module Summary 3 3 DEMONSTRATION PROGRAM OPERATION The dsPIC30F device included with your dsPICDEM 1 1 Plus Development Board is programmed to auto...

Page 34: ...PIC30F device Temperature Sensor U9 Temperature sensor TC1047A is connected to the analog input pin AN8 on the dsPIC30F device Frequency A fundamental sine wave signal is generated by stepping the MCP...

Page 35: ...C as shown in Figure 3 4 FIGURE 3 4 dsPICDEM 1 1 PLUS DEVELOPMENT BOARD TO PC CONNECTION After connecting the table configure HyperTerminal for the port settings shown in Figure 3 5 HyperTerminal will...

Page 36: ...the high frequency components and yields a sine wave adequate for this demonstration Five frequencies are developed and selected by varying potentiometer RP1 as shown in Table 3 1 TABLE 3 1 FREQUENCIE...

Page 37: ...ed FIGURE 3 7 DSP OPERATIONS FLOW DIAGRAM Figure 3 8 shows the frequency response of the IIR filter implementation The IIR filter is only employed for demonstrating filter operation FIGURE 3 8 FREQUEN...

Page 38: ...e LCD To quit this demonstration and return to the main menu press switch SW1 3 3 1 3 DTMF GENERATION MODE From the Menu Options display pressing switch SW4 launches the DTMF Generation demo and takes...

Page 39: ...t Reversed Addressing for 256 point FFT input data in preparation for the FFT butterfly computations Modulo Addressing for accessing arrays in a circular fashion for FIR filtering Two modulo buffers h...

Page 40: ...ally configured to operate in an interrupt driven mode at FCY 8 Hz where FCY 7 3728 MHz The module communi cates at FCY 8 Hz in 8 bit mode while displaying results on the LCD controller When it is use...

Page 41: ...is benchmarked using the Timer4 5 pair 4 Squared magnitude is computed for each frequency bin in an in place fashion x2 y2 5 The magnitude data is run through a routine that returns the frequency bin...

Page 42: ...the DTMF tone are separated by 8 dB The high frequencies are reduced in magnitude relative to the low frequencies by 8 dB 3 4 3 3 UART RECEIVE INTERRUPTS Single DTMF tones may also be played by enter...

Page 43: ...uously since it does not have a scrolling effect 3 5 dsPIC30F DEMONSTRATION PERFORMANCE METRICS The dsPIC30F performance metrics are primarily based upon acquisition and processing of the 256 discrete...

Page 44: ...3 5 1 Performance Metric Summary with FIR Filter The overall CPU performance metric is calculated on how many complete processing cycles can be performed over a 1 second interval In one second the ds...

Page 45: ...s For example 32 mS for acquisition of 256 samples 3 89 mS for IIR filtering 2 47 mS for 256 point FFT Adding these three major timing metrics results in 38 3 mS Therefore this 38 3 mS cycle is repeat...

Page 46: ...he potentiometers are rotated through their range the displayed value will vary from 0 to 0FFF When SW1 SW4 are depressed LED1 LED4 should light respectively At 25 C 77 F the temperature sensor will y...

Page 47: ...memory and source code View registers in a Watch window Set a breakpoint and make the code halt at a chosen location Use the function keys to Reset Run Halt and Single Step the code 4 2 HIGHLIGHTS Ite...

Page 48: ...to help create new projects Before starting create a folder for the project files for this tutorial C Tutorial is assumed in the instructions that follow From the dsPICDEM 1_1 Plus Development Board...

Page 49: ...ROJECT WIZARD STEP 2 SELECT LANGUAGE TOOLSUITE 4 4 2 Select Language Toolsuite 1 From the Active Toolsuite pull down menu select Microchip C30 Toolsuite This toolsuite includes the assembler and linke...

Page 50: ...c FIGURE 4 3 PROJECT WIZARD STEP 3 NAME YOUR PROJECT 4 4 3 Name Your Project 1 In the Project Name text box type MyProject 2 Click Browse and navigate to C Tutorial to place your project in the Tutori...

Page 51: ...oject 3 Expand the C Program Files Microchip MPLAB C30 Support gld folder and select the p33FJ256GP710 gld file 4 Click Add to include the file in the project There should now be two files in the proj...

Page 52: ...B IDE PROJECT WINDOW A project and workspace has now been created in MPLAB IDE MyProject mcw is the workspace file and MyProject mcp is the project file Double click the Tutorial c file in the project...

Page 53: ...nformation that lets you debug at the source code level Before building there are settings required to tell MPLAB IDE to reserve space for the extra debug code when the MPLAB ICD 2 is used 4 5 1 Link...

Page 54: ...Microchip Technology Inc 4 5 2 Build the Project 1 Select Project Build All 2 Observe the progress of the build in the Output window Figure 4 8 3 When BUILD SUCCEEDED displays you are ready to program...

Page 55: ...GS 4 6 2 Connect the MPLAB ICD 2 In Circuit Debugger 1 Before setting up the hardware check that the following jumpers are in place AVDD_JMP On J8 33F PGD3 30F 33F PGC3 30F J10 MCLR1 VDD_JMP On 2 Reco...

Page 56: ...LAB ICD 2 to designate the MPLAB ICD 2 as the debug tool in MPLAB IDE 2 From the Debugger menu select Connect to connect the debugger to the device The MPLAB ICD 2 should report that it found the dsPI...

Page 57: ...m the Debugger menu click Settings to display the MPLAB ICD Debugger settings 4 Select the Program tab 5 Check Allow ICD 2 to select memories and ranges as shown in Figure 4 12 This setting will speed...

Page 58: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 54 2006 Microchip Technology Inc FIGURE 4 12 SETTING PROGRAM MEMORY SIZE...

Page 59: ...D display should show the text in Figure 4 14 FIGURE 4 14 TUTORIAL LCD DISPLAY 4 7 DEBUGGING THE CODE The MPLAB ICD 2 In Circuit Debugger can be used to run halt and step the code A breakpoint can be...

Page 60: ...ymbolic tab as shown in Figure 4 15 FIGURE 4 15 PROGRAM MEMORY WINDOW 3 Press F5 to halt the processor and press F6 to reset The program memory now shows a green arrow pointing to the line of code at...

Page 61: ...oose Run to Cursor The green arrow then points to the first instruction in the main routine FIGURE 4 16 SOURCE CODE WINDOW 3 From the View menu select Watch to open a Watch window Figure 4 17 4 From t...

Page 62: ...eft of the source code window 2 Press F9 to run the code The program halts on the instruction following the breakpoint Note An alternate method is to simply double click the line This feature may need...

Page 63: ...the SOSCI and SOSCO pins The attached code example demonstrates how Timer1 may be configured to use the 32 kHz secondary oscillator for a real time clock RTC application Configuring Timer1 for the rea...

Page 64: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 60 2006 Microchip Technology Inc NOTES...

Page 65: ...5 1 2 13 Analog Potentiometers Section 5 1 5 3 Prototyping Area Section 5 1 17 14 LEDs Section 5 1 7 4 Oscillator X2 Section 5 1 15 15 Push Button Switches Section 5 1 6 5 Oscillator X3 Section 5 1 1...

Page 66: ...pins are connected to IC U3 Setting jumper J4 to the TX485 RX485 position configures the dsPIC DSC UART channel 1 U1RX and U1TX pins for a RS 485 RS 422 communication channel The second serial commun...

Page 67: ...exhibits a typical 10 mV C voltage slope The schematic of the temperature sensor is shown in Figure A 4 dsPICDEM 1 1 Plus Development Board Schematic Sheet 3 of 5 5 1 5 Analog Potentiometers Three 5...

Page 68: ...ected for low cost programming and debugging of the dsPIC30F 33F or PIC24H 24F device Programming and debugging of dsPIC30F devices requires that jumper J8 is set to the 30F position and jumper J10 is...

Page 69: ...VDD_JMP allow the supplied power source to be bypassed and alternate supplies to be provided The schematics of the power supply circuits are shown in Figure A 3 dsPICDEM 1 1 Plus Development Board Sch...

Page 70: ...J13 J15 Handle the device carefully when inserting and extracting the adaptor board The orientation of the adaptor board is important The Microchip logo and device part numbering should be aligned to...

Page 71: ...endix 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 1 1 Plus Development Board A 2 HI...

Page 72: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 68 2006 Microchip Technology Inc FIGURE A 1 dsPICDEM 1 1 PLUS DEVELOPMENT BOARD LAYOUT...

Page 73: ...G0 RG1 RG2 RG3 RG8 RG9 RD14 RD15 RF2 RF3 RF0 RF1 RF4 RF5 RD4 RD8 RD5 RD9 RD6 RD7 RD10 RD11 GND GND RC14 CLKO MCLR1 CLKIN RD0 RD1 RA10 RA9 RA12 RA13 RA14 RA15 RC1 VDD CLKIN GND RF6 RG2 RG12 RC1 RA6 RA1...

Page 74: ...DD RC13 RD0 RA15 RD9 RD10 VDD RA14 OSC2 RG2 RF2 RF7 RF6 RF3 RB0 RB6 242 2 1 2 1 GND GND 1 3 5 7 2 4 6 8 1 3 2 4 1 2 3 4 5 6 7 8 9 13 19 12 18 11 17 10 16 14 15 21 20 1 2 3 4 5 6 7 8 9 13 19 12 18 11 1...

Page 75: ...DS70099D page 71 FIGURE A 4 dsPICDEM 1 1 PLUS DEVELOPMENT BOARD SCHEMATIC SHEET 3 OF 5 RD2 RD1 RD0 RA14 RA13 VDD RG6 RD7 GND RB5 RB4 RB6 AVDD AGND AGND AVDD AGND AGND AGND RB3 RB8 RD3 RA12 RA15 RG8 GN...

Page 76: ...DD VDD VDD GND RF0 RF1 DATA_H DATA_L VDD 1 3 2 4 VDD 2 1 1 3 2 4 1 3 5 7 2 4 6 8 RTS TX232 TX485 RG1 RX485 RTS CTS RX232 TX232 TX485 RX232 RG0 GND VDD GND GND RX485 5 3 8 4 9 7 2 6 1 5 3 8 4 9 7 2 6 1...

Page 77: ...G15 RG13 MCLK GND GND AGND VDDLCD AGND GND MCLR2 GND LINE_IN VDDLCD GND RG7 RG6 GND GND AGND RG8 VDD GND VDD RG12 AVDD VDD AGND AGND LINE_OUT RB6 242 RB7 242 VDDLCD VDDLCD GND 3 2 1 AGND VDDLCD 7 8 9...

Page 78: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 74 2006 Microchip Technology Inc NOTES...

Page 79: ...LCD display It will not accept any input until it has completed its initialization sequence The controller stores incoming bytes in an interrupt buffer that is 186 bytes deep so that the dsPIC DSC de...

Page 80: ...the controller This greatly simplifies the interface on the dsPIC DSC side since there is little advantage to putting wrappers around the individual commands Nothing needs to be done to the data other...

Page 81: ...acter coordinates The coordinate range is X 0 121 and R 0 3 The ColPos X R specifies the default location for column commands The home position is the top left of the LCD display ColPos 0 0 Unless oth...

Page 82: ...nd rolls the display in the vertical axis by the amount ScrollY The LCD data array consists of 32 lines of 122 pixels each If scrolling value ScrollY is set to zero and the top row of the data array i...

Page 83: ...position to ChrPosC ChrPosR This command has no effect on the display except for moving character cursor if it is turned on B 5 2 ChrPosInc Command The ChrPosInc command increments the character posit...

Page 84: ...turns off the character cursor B 5 9 ChrCursorOn Command The ChrCursorOn command turns on the character cursor at the current ChrPos B 5 10 ChrCursorBlink Command The ChrCursorBlink command controls...

Page 85: ...PixPosX PixPosY and turns on the pixel at that location This command does not increment PixPos B 6 3 PixOff Command The PixOff command sets PixPos to PixPosX PixPosY and turns off the pixel at that l...

Page 86: ...d The WrtColNextOR command ORs column data with existing data and writes the result to the current ColPos then increments ColPos B 7 4 WrtColNextAND Command The WrtColNextAND command ANDs column data...

Page 87: ...GHT LINE This example draws a straight line from X location 1 1 to Y location 119 3 Write the following bytes to SPI port 0xD7 1 1 Set Pixel cursor to X 1 Y 1 0xDA 119 31 Draw line to X 119 Y 31 EXAMP...

Page 88: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 84 2006 Microchip Technology Inc NOTES...

Page 89: ...Program Data Acquisition Display 30 DSP Operations Display 32 DTMF Tone Generation 34 Summary 29 Demonstration Programs 12 Development Board Features Analog 11 Device Clocking 11 ICD 2 and ICE 4000 C...

Page 90: ...47 48 52 MPLAB IDE Project Wizard 14 44 MPLAB IDE User s Guide 5 MPLAB LINK 30 Object Linker 15 O Oscillator Options 65 Oscillator X2 61 Oscillator X3 61 Output Window 18 21 48 50 P Peripherals 12 bit...

Page 91: ...Index 2006 Microchip Technology Inc DS70099D page 87 NOTES...

Page 92: ...21 5407 5066 China Shenyang Tel 86 24 2334 2829 Fax 86 24 2334 2393 China Shenzhen Tel 86 755 8203 2660 Fax 86 755 8203 1760 China Shunde Tel 86 757 2839 5507 Fax 86 757 2839 5571 China Wuhan Tel 86 2...

Page 93: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip DM300024...

Reviews: