Like it is already mentioned in the title I have question regarding this dev stack:
- MPLAB X IDE v1.80
- PICkit 3
- PIC16F684-ICD (datasheet)
- AC16205
There is image of how things are connected (I don't think there is a problem):
Powering settings:
There is simple program I am using for testing:
/*
* File: main.c
* Author: Primoz
*
* PIC16F684
*
* Simple test program.
*/
#include <xc.h>
// CONFIG
#pragma config MCLRE = OFF // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to V
#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)
#pragma config BOREN = OFF // Brown Out Detect (BOR disabled)
#pragma config IESO = OFF // Internal External Switchover bit (Internal External Switchover mode is disabled)
#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is disabled)
void main()
{
TRISA = 0b111101;
PORTA = 0b000010;
for (;;)
{
;
}
}
I successfully programmed the device only few times. Most of the time I get this output:
Connecting to MPLAB PICkit 3...
Firmware Suite Version.....01.28.72
Firmware type..............Midrange
Target detected
Failed to get Device ID
So my question is what could be a reason for such an odd behaviour? How can I make it work?
If you need any additional information, please let me know…
Best Answer
I checked out if there are any loosed connections like suggested by @pjc50 - found none.
I even ordered new header and on my surprise the issue was still not gone.
After many trial and error I figured out that it works if I set
Voltage Level
to4,875
(instead of5V
):