PicKit 3 & MPLab X

Thread Starter

HarG

Joined Nov 20, 2012
18
Beginner with PICs and sorry in advance if I missed a thread that covered this.

I bought a PICKit 3 Express and none of the software mentioned in the tutorial is easily available so I am using MPLab X with XC8 Compiler. I've set the PICKit 3 to provide the voltage as well.

My source code (below) seems to build fine and it even says it is programming but nothing is happening on my board. Any help would be excellent.

#include <xc.h>
#include <stdio.h>
#include <stdlib.h>
#define _XTAL_FREQ 1000000

/*
*
*/
void main(void)
{
PORTD = 0;
TRISD = 0b00000000;
LATDbits.LATD7 = 1;
while (1);
}
 

tshuck

Joined Oct 18, 2012
3,534
Have you measured the voltage to ensure that the Pickit is, indeed, supplying power?

Also, your compiler may be optimizing the while(1); out....
 

t06afre

Joined May 11, 2009
5,934
I can not see any setting of the configuration bits. That may be your problem. Aslo as mention. PICKIT 3 has by defualt power not supplied to the target chip. It must be turned on, in MPLAB
 
Top