wiguna149

Blog For Sharing Knowledge

USING DSPIC 30F 3014/4013

This is my first time using PIC microcontroller from MICROCHIP. The type i am using is DSPIC 30F 3014/4013. DSPIC series are types of PIC which are suitable for DSP(digital signal processing). I can’t explain all the features completely, but i some of it are the speed up to 30 MIPS(mega instruction per second), PLL, large accumulator bit, single cycle DSP operation, hardware architecture suitable for DSP.

DSPIC 30F3014/4013 System Board

DSPIC 30F3014/4013 System Board

The system board is my own design. It has DC jack and IDC connector  for power supply. It also uses 5 volt regulator. I use diode 1n4004 to prevent inverted power supply pole case. It is necessary because i use 12 V Li-Po battery with high current capability, so if the pole is inverted, it can cause burning on the circuit board or components. The Board has rs 232 DB9 serial connector for serial communication. The exernal crystal value is 7,3728 MHz. With PLL x 16, the internal processing clock is 29,4912 MHz, nearly 30 MIPS. the value is chosen because i planned to use bootloader which requires that value(i haven’n succeed in using the bootloader yet).

I am using MPLAB IDE 8.63 with mplab C30 compiler for programming and downloading into DSPIC. all the software can be donloaded from microchip’s website http://www.microchip.com. i am using C language with built in library so i can write register value by calling them. For DSPIC, there are also built in libraries for DSP in microchip C  compiler. The DSP libraries contain many function like transformation, vector and else.

The programmer i am using is MPLAB ICD 2 from MICROCHIP.  This device is not only for programming but also for debugging, but i haven’t used the debugging feature yet. this programmer can be accesed directly from software MPLAB IDE.

MPLAB ICD 2

MPLAB ICD 2

in my experience, there are several thing to be avoided while programming the chip. don’t use capacitor on reset pin. it will cause the chip to be unprogrammable. i think there is no need for soft start on reset pin so the capacitor is not necessary. Mine works well after removing the capacitor. You must also make sure that the supply voltage is about 5 volt. I use battery as power supply, so when the battery voltage drop, there will occur problem such as  failure in verifying chip id or verifying written program. In error caused by voltage drop, the verified ID or program will show some correct number and wrong number. You will recognise this after many experiments. If that happens, check your voltage supply.

I am using this chip to perform 64 poit FFT operation with sampling frequency 6400 KHz on audio signal from microphone. I am quite satisfied with the result, since it can show the frequency of tune i play from my guitar. Of coure there are some approach on the result because of the FFT itself, but the chip can perform the FFT accurate enough.

That’s it for now.  I will give more tutorial about using some features like GPIO(General Purpose Input/Output), delay,timer, ADC, UART and using some DSP library as soon as possible.

Adi Wiguna

Leave a comment