Electrical – what make MPLABX connected with ICD3 to dsPIC reads different Device ID

debuggingembeddedmplabxpic

Target Device ID (0x7bf0000) is an Invalid Device ID. Please check your connections to the Target Device.
although all connections correct status of the dspic3F is working well

Using MPLABX the above message appears

target voltage detected


even when reading it reads but://///


Connecting to MPLAB ICD 3…

Currently loaded firmware on ICD 3
Firmware Suite Version…..01.51.08
Firmware type…………..dsPIC33F/24F/24H

Target voltage detected
Target Device ID (0x7bf0000) is an Invalid Device ID. Please check your connections to the Target Device.

Reading…

The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0x2abff
configuration memory
User Id Memory
Read complete


Connecting to MPLAB ICD 3…

Currently loaded firmware on ICD 3
Firmware Suite Version…..01.51.08
Firmware type…………..dsPIC33F/24F/24H

Target voltage detected
Target device dsPIC33FJ256MC710A found.
Device ID Revision = 3004

Reading…

The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0x2abff
configuration memory
User Id Memory
Read complete

Also could you check the configuration bits

// DSPIC33FJ256MC710A Configuration Bit Settings
// 'C' source line config statements
// FBS
#pragma config BWRP = WRPROTECT_OFF      // Boot Segment Write Protect (Boot segment is write-protected)
#pragma config BSS = SMALL_FLASH_STD    // Boot Segment Program Flash Code Protection (Standard Security, Small-sized Boot Flash)
#pragma config RBS = NO_RAM             // Boot Segment RAM Protection (No Boot RAM)

// FSS
#pragma config SWRP = WRPROTECT_OFF     // Secure Segment Program Write Protect (Secure Segment may be written)
#pragma config SSS = NO_FLASH           // Secure Segment Program Flash Code Protection (No Secure Segment)
#pragma config RSS = NO_RAM             // Secure Segment Data RAM Protection (No Secure RAM)

// FGS
#pragma config GWRP = OFF               // General Code Segment Write Protect (User program memory is not write-protected)
#pragma config GSS = OFF                // General Segment Code Protection (User program memory is not code-protected)

// FOSCSEL
#pragma config FNOSC = LPRCDIVN         // Oscillator Mode (Internal Fast RC (FRC) with divide by N)
#pragma config IESO = ON                // Two-speed Oscillator Start-Up Enable (Start up with FRC, then switch)

// FOSC
#pragma config POSCMD = NONE            // Primary Oscillator Source (Primary Oscillator Disabled)
#pragma config OSCIOFNC = OFF           // OSC2 Pin Function (OSC2 pin has clock out function)
#pragma config FCKSM = CSDCMD           // Clock Switching and Monitor (Both Clock Switching and Fail-Safe Clock Monitor are disabled)

// FWDT
#pragma config WDTPOST = PS32768        // Watchdog Timer Postscaler (1:32,768)
#pragma config WDTPRE = PR128           // WDT Prescaler (1:128)
#pragma config PLLKEN = ON              // PLL Lock Enable bit (Clock switch to PLL source will wait until the PLL lock signal is valid.)
#pragma config WINDIS = OFF             // Watchdog Timer Window (Watchdog Timer in Non-Window mode)
#pragma config FWDTEN = ON              // Watchdog Timer Enable (Watchdog timer always enabled)

// FPOR
#pragma config FPWRT = PWR128           // POR Timer Value (128ms)
#pragma config LPOL = ON                // Low-side PWM Output Polarity (Active High)
#pragma config HPOL = ON                // Motor Control PWM High Side Polarity bit (PWM module high side output pins have active-high output polarity)
#pragma config PWMPIN = ON              // Motor Control PWM Module Pin Mode bit (PWM module pins controlled by PORT register at device Reset)

// FICD
#pragma config ICS = PGD1               // Comm Channel Select (Communicate on PGC1/EMUC1 and PGD1/EMUD1)
#pragma config JTAGEN = OFF             // JTAG Port Enable (JTAG is Disabled)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

#include <xc.h>

— after trying on another PC with another MPLABVersion V8.92 no target device ID message but the following popup appears "code protection warning"
You are trying to program over code protected areas of the device. To do this you must select segment programming on the Secure Segment property page and indicate which segments of the device you wish to program

code protection warning

message Failed to program device:

You are trying to change protected boot memory. In order to do this
you must select the "Boot, Secure and General Segments" option on the
debug tool Secure Segment properties page.

succeeded in old MPLAB /other PC but how this ▲ can be done in MPLAB X

Best Answer

This message is typically caused by device mismatch in MPLAB. Check whether device set in the project matches one connected to the ICD and change if necessary.