You have no items in your shopping cart.

Subtotal: 0.00

Introduction

The DSPIC Evaluation Board can be used stand-alone board builtwith an in-circuit USB programmer. Sample programs are provided to demonstrate the unique features of the supported devices.

The DSPIC Evaluation Board Kit comes with the following:

DSPIC Evaluation Board

☞Sample devices (dsPIC30F4011)

☞CD-ROM, which contains: a) Sample programs b) DSPIC Evaluation Board User’s Guide

☞USB cable

☞9V AC/DC adapter

 

DSPIC Evaluation Board

The DSPIC Evaluation Board has the following hardware features:

☞40-pin ZIF socket.

☞+5V regulator for direct input from 9V, 500 mA AC/DC wall adapter

☞Two no’s RS-232 socket and associated hardware for RS-232 interface.

☞ICSP USB 2.0 Programmer with busy LED indication

☞One 5KΩ pot for devices with analog inputs.

☞Four push button switches for external interrupts and Reset.

☞Red power-on indicator LED.

☞A 10 MHz crystal oscillator.

☞16x2 LCD display with CONTRAST adjust

☞Two 20x2 Connector for interfacing with external devices

☞One PBT-3 pin connector for MCU RX and TX out.

☞Three 5x2 FRC box connector for PORT output

☞General purpose area to add external components

ZIGBEE wireless module

☞Optional USB power supply

DSPIC EVALUATION HARDWARE

dspic-evaluation-hardware

DSPIC Evaluation Board LAYOUT

dspic-evaluation-board-layout

CHAPTER 2: Hardware Details

SOCKETS

40 Pin ZIF socket is provided for the processor. Microcontroller can be removed from the board easily. This socket is intended to use our development board as programmer to program other IC’s.

10 pin FRC box type connectors: Three connectors can be found in the board. A 10 pin FRC cable is used to make connection with external. The three connectors are as follows,

10-pin-frc-box-type-connectors

Pins 1-8 are Data Pins. Pin 9 is VDD and the Pin 10 is GND. All 10 Pin FRC connectors will follow the same rule. If the port has less no of pins then it is arranged from 1 up to 8 and the VDD, VSS are same.

20x2 FRC connectors: this will be FEMALE or MALE type connectors. Connector J10 is connected with microcontroller’s pins 1-20 and the connector J11 is connected to pins 40-21. The following diagram shows the connection.

20x2-frc-connectors

POWER SUPPLY

The external power can be AC or DC, with a voltage (9V, 1A output). The DSPIC board produces +5V using an LM7805 voltage regulator, which provides supply to the peripherals. Power supply is controlled through slide switch J2. We can provide an alternate power supply from USB

POWER SWITCH

EXT USB

External Supply ON

EXT USB

USB Supply ON

 

Installation Notes

InstallingMPLAB IDE

1. Open up the user CD comes with DSPIC Microcontroller Board, Navigate to MPLAB IDE Folder

2. Double Click Setup.exe and Click >> Next

mplab-tool

3. Click >> I accept the terms of the license agreement and Click >> Next

mplab-license-agreement

4. Select >> Complete check box and Click >> Next

setup-type

5. Click >> Next

choose-destination-location

6. Click >> I accept the terms of the license agreement for both Application Maestro as well as MPLAB c32 windows and Click >> Next, Next

application-maestro mplab-c32-license

7. Click >> Next to Start Copying Files

start-copying-files

8. Now the MPLAB IDE setup will Progress

mplab-ide

9. After finishing installation MPLAB IDE, it will prompt for HI-TECH C Installation. Click >> No

10. Click >> Finish to InstallShield Wizard Complete

installshield-wizard-complete

11. Just Close the MPLAB IDE Document Support

mplab-ide-document-support

InstallingMPLAB C30 compiler

Purchase this compiler from microchip or download their 60 days student version. Install the compiler as per their manual. Then follow the next step.

Creating a Project on MPLAB IDE

1. Double Click the MPLAB IDE v8.xx from desktop

mplab-ide-v8.xx

2. To create a new project, Click >> Project and Project Wizard.

project-wizard-summary

3. At the first page of Project Wizard, Click >> Next.

step-one

4. Step ONE: Next, you will need to select the device for your project. For this demonstration I will use DSPIC16F877A as the device.

step-one-project-wizard

5. After selecting the device, click >> Next

step-two1

6. Step TWO: Select the Compiler for your Project.

step-two2

7. Click the Active Toolsuite drop box and select MPLAB C30 ToolSuite.

step-two3

8. There should not be any red “X” mark (For those with the red “X”, please reinstall the MPLAB C30). Click Next to continue.

Example: See the “Red X” mark that appears before CCS C compilers

step-two3

9. Step Three: Select the directory to store your project and your project name.

☞Click on Browse to open a browser where you choose the directory and the project name.

☞It is advised that you use a new folder for a new project, and all the coding file (c file, h file, asm file) should be stored under the same folder.

step-three

10. Now enter the Project Name and Click >> Save

project-name

11. Click >> Next to the following window

mplap-step-three--pic

12. Step four, If you have an existing file Select that file and Click Add>>, Otherwise Just Skip this step by clicking Next.

add-exisiting-file

13. You have successfully created the project. Click Finish to continue.

summary

14. The project that you create will be open after you successfully created it, and this is what you will see at the IDE, a Project window and an Output window.

If you don’t have these windows on your IDE, you can always enable it back by clicking View >> Project and View >> Output.

mp-lab-14

15. Click on the icon (New File) to create a new file.

mp-lab-15

16. Enter All your codes or Enter spacebar once and Click File >> Save.

mp-lab-16

17. Enter the file name with “.c” extension. Check the box “Add File To Project”. Click Save to save it in project directory.

mp-lab-17

18. IF you forget to Check the box “Add File To Project”, You can add your source file by right clicking at the Source File and click Add Files.

mp-lab-18

19.Select the file that is being saved. Click Open

mp-lab-19

20.Now the code file “.c” is added to your project. You can see that it is shown under the Source Files at the Project window.

mp-lab-20

21. Now Right Click On Linker Script and Click Add Files…

mp-lab-21

22. Navigate to “C:\Program Files\Microchip\MPLAB C30\support\dsPIC30F\gld” and select your IC’s linker script. Click Open

mp-lab-22

23. Now everything has been done. Now write your code or modify the existing code….

mp-lab-23

24. Click build All to compile the project and correct the error, do rebuild etc…

mp-lab-24

3.3 Configuring Programmer for DSPIC Development Board 1.

☞First attach the DSPIC Microcontroller Development Board with PC via USB cable.

☞Connect the 9V AC/DC Adapter with Development Board or Just use USB power.

☞Turn ON the Power Switch (either USB side or EXT side).

☞Wait until the PICkit2 Finishes Driver Installation*. If the driver not detected just try to reconnect or RESTART your system, then try again.

reconnect or restrat

5. After Finishing the Hardware driver installation. Open MPLAB IDE. Select Programmer >> Select Programmer >> PICkit2

open-mplab-ide

6. If the Kit is properly connected, you can see the PICkit2 Icon set on the Toolbar (Yellow Set) and the PICkit2 Ready Message. Very First icon is used for “Programming the device”.

pickit2-ready-message

7. Finally open our Example Programs, Burn it to the controller, do the hardware connection as per Chapter 4 and See the result.

POSSIBLE ERRORS

Error 1: MPLAB may throw "Write Failure-Get lost Error". If it does, follow the instructions below,

☞Unplug the Power supply from target board

☞Close MPLAB

☞Plug the AC/DC adapter

☞Reopen MPLAB

Error 2: MPLAB may throw "target not found" error or “Unspecified device error”. If it does, follow the instructions below

☞Ensure whether the DSPIC microcontroller placed properly in ZIF jacket.

☞In Configure-->Select device, ensure DSPIC16F877A (or any) is selected.

Error 3: MPLAB may throw "Verified Failed" error, due to the following

☞Hex File may be old, so compile the project once and try Programming.

☞Faulty microcontroller device, Replace it with new one.

Note *: If the error still retains check your windows firewall or antivirus software to allow this MPLAB and DsPICkit2 programmer.

Example Programs and Connections

ADC

HARDWARE PIN OUT

CONNECTIONS

OUTPUT

CH8(POT)

PORTA.0

Connect Serial cable between USART1

Section in the Board and PC.

Open HyperTerminal at 9600 Baud-rate

Digital Value of CH8 will be dis- played in HyperTerminal

Adjust the POT R13 to change the value

 

INTERRUPT

HARDWARE PIN OUT

CONNECTIONS

OUTPUT

INT0(SW2)

PORTE.8

Connect Serial cable between USART1 Section in the Board and PC.

Open HyperTerminal at 9600 Baud- rate

Press INT0, INT1 and INT2 Push button switches SW2, SW3 and SW4.

 

The Message “INTx Detected...” will be displayed.

In INTx, x is 0 or 1 or 2.

INT1(SW3)

PORTD.0

INT2(SW4)

PORTD.1

 

LCD

HARDWARE PIN OUT

CONNECTIONS

OUTPUT

CONTROL LINES

 

 

 

Place the LCD in LCD connector J6. Adjust the POT (R14) Right or Left until

 

theletters or dark screen are visible(if necessary)

Press RESET if necessary

 

 

 

The Strings “DSPIC DEV. BOARD” and "LCD DEMO PROGRAM" will be displayed on LCD.

RS

PORTC.13

RW

GND

EN

PORTC.14

DATA LINES

D4

PORTD.0

D5

PORTD.1

D6

PORTD.2

D7

PORTD.3

 

LED

 

HARDWARE PIN OUT

 

CONNECTIONS

 

OUTPUT

LED.0

PORTx.0

 

 

 

 

Connect an LED or group of LED’s with any of the PORT pin(s). The LED(s) will be blinking

 

 

 

 

LED’s will be Turned ON and

OFF at 500ms interval.

LED.1

PORTx.1

LED.2

PORTx.2

LED.3

PORTx.3

LED.4

PORTx.4

LED.5

PORTx.5

LED.6

PORTx.6

LED.7

PORTx.7

 

USART1

 

HARDWARE PIN OUT

 

CONNECTIONS

 

OUTPUT

RXD1

PORTF.2

Connect USART1(P2) with PC using serial cable

Configure HyperTerminal at 9600

 

Press RESET Once (If Necessary)

 

The string "USART1 Demo

Program" will be displayed

TXD1

PORTF.3

 

USART2

HARDWARE PIN OUT

CONNECTIONS

OUTPUT

RXD2

PORTF.4

Connect USART2(P2) with PC using serial cable

Configure HyperTerminal at 9600

Press RESET Once (If Necessary)

The string "Sending Data via

USART2" will be displayed

TXD2

PORTF.5

 

ZIGBEE DEMO

HARDWARE PIN OUT

CONNECTIONS

OUTPUT

ZIG-RX

PORTF.4

Ensure the ZIGBEE module is properly placed in the connector JP2.

Connect another ZIGBEE module with PC via straight serial cable.

Configure HyperTerminal at 9600 baud

Press RESET Once (If Necessary)

 

 

 

The string "ZIGBEE USART Demo Program" will be dis- played in HyperTerminal

ZIG-TX

PORTF.5

 

OTHER EXAMPLES

NOTES
Other Examples are also provided in the CD. So use this examples by changingthe pins or modify the codes according to the target etc.
 

Setting up HyperTerminal

HyperTerminal is automatically installed under Programs>>Accessories,

1. Click Start >> Programs >> Accessories >> Communications >> HyperTerminal

☞Enter Name (e.g. Com1_9600) and choose any one ICON.

connection-description

2. Click the drop-down arrow by Connect Using >> COM1 >> Click OK

connect-to

3. COM1 Properties, Port Settings

com1-properties

☞Bits per Second: select 9600 (or desired baud rate)

☞Data Bits: select 8

☞Parity: select None

☞Stop Bits: select 1

☞Flow Control: select none

☞Click OK

4. Now you get the HyperTerminal window.

5. The Serial Cable used with the board (both USART1 and USART2) is a NULL modem cable.