Page 1 of 1

dsPIC30F6014a-ICSP & UART

PostPosted: Wed Feb 03, 2016 12:31 pm
by fazlul76
Hi all,

I am using dspic30F6014a for my project.I'm new to the device and hope to get more information and guide from this forum. I am using picKIT2, with ICSP USB PIC programmer (UIC00B) and also USB to UART converter (UC00A) for serial communication. I have a code written in CCS C compiler and hardly trying to see the output from the dsPIC. I still had no idea what actually causing the pic from working properly. I loaded a simple LED ON/OFF at pin_C1 with delay 1ms but no output. This is what I have done so far:
a) using the picKIT 2 the dspic can be found.
b) erased the dspic30F - successful
c) loaded the dspic with the simple LED ON/OFF code - successful
d) verify the dspic30F -successful

with the step above the dspic failed to give the output.

Then I go to tools>troubleshoot to test the dspic with another method.
a) Verify Vdd -passed
b) Test Vpp - passed

Can anyone help me what kind of problems do I have with the dspic? Is there any methods to test which part (dspic, UIC00B, UC00A) caused the failure? If the failure comes from the dspic why i still can write, erase and verify the device? Please advice.

Thank you

Re: dsPIC30F6014a-ICSP & UART

PostPosted: Wed Feb 03, 2016 2:24 pm
by ober
Photos of hardware setup would be helpful.

BTW, human eyes cannot see if the LED is blinking at 1ms rate.

Re: dsPIC30F6014a-ICSP & UART

PostPosted: Wed Feb 03, 2016 4:49 pm
by fazlul76
Hi,

The output was confirmed using oscilloscope. Sorry the blinking LED code is 1s not 1ms. The attached image was to send 1s pulse output from pin_C1 to LED#1. Here is the code:

Regards

CODE: SELECT_ALL_CODE
#include <delay_1us.h>


void main()
{

   //Example blinking LED program
   while(true)
   {
      output_low(LED);
      delay_ms(DELAY);
      output_high(LED);
      delay_ms(DELAY);
   }

}


and here is the .h file
CODE: SELECT_ALL_CODE
#include <30F6014A.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOBROWNOUT               //No brownout reset

#device ICSP=1
#use delay(crystal=20000000)

#define LED PIN_C1
#define DELAY 1000

Re: dsPIC30F6014a-ICSP & UART

PostPosted: Thu Feb 04, 2016 4:01 pm
by ober
The development board does not seem to be from Cytron, maybe you can check with the designer or manufacturer, there should be some example code.

Anyway, from your code, there should be initialization of Input and output, but I did not see any of those.