Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

dsPIC33EV Programming Pins

Status
Not open for further replies.

RAJPUT VIDISHA

Member level 1
Joined
Jul 14, 2015
Messages
37
Helped
0
Reputation
0
Reaction score
1
Trophy points
6
Activity points
344
Hi,

I am using PICKit3 to program dsPIC33EV256GM106 & i'm using pins PGEC1, PGED1, MCLR, VCC, GND.
Everything seems fine but i'm unable to connect the device & it shows

Target Device ID (0x0) does not match expected Device ID (0x5d3b0000)

Also, what's the default value of Communication Channel Select configuration bits?
I cannot find anywhere written the default value of these two Communication Channel Select configuration bits.

Regards
Vidz
 

Sounds to me as though you do not have much experience with PIC MCUs as this is a very common problem.
That message has a number of causes but basically means that the Pickit3 is not talking correctly with the MCU.
For a start make sure that ALL of the power and related pins are correctly connected. Figure 2-1 in the data sheet shows the required configuration. Don't miss out on the power connection and bypass capacitors on all Vdd pins and the Vcap capacitor is required.
Make sure that there is nothing else connected to the \MCLR\ and PGExn pair of pins. A typical problem is having too big a capacitor on the \MCLR\ pin or not switching it out when programming. The Pickit3 User Guide has good information on how to connect the programmer to the chip. Also Section 2.4 of the MCU data sheet shows one option.
Also make sure the PGECn and PGEDn pins are connected the right way around.
In case you are not aware, you can program the MCU with *any* pair of PGExn pins. However if you later want to debug the MCU then you must set the correct CONFIG setting (the ICS bits in the FICD config word) for the pair that you will be using. If you get this wrong then you will get a message about the device not being ready to debug.
The 'communication Channel Select' config bits question has partly been answered but the full answer for all of the config bits is to look at the 'Special Features' section that is present in just about every MCU data sheet (except some of the really small older devices where the information is presented in other places). As the default setting for all of the config bits is '1', it follows that the default value for the ICS bits is 0b11 which means the default pair for debugging is PGEx1.
Setting the config bits IS a requirement to get any program working. However you only need to set those where the default is not that you want. Typically that means you can leave all of the protection and security settings alone. The settings you generally need to set are in (for this device) the FOSCSEL, FOSC, FWDT (turn off the WDT until you know what you are doing), FPOR and FICD registers.
I know that the Microchip data sheets (and errata) can be a bit hard to understand, and when you throw in the Family Reference Manual sections it can be very difficult at the start, but once you get the hang of it then they really do contain just about all of the information you need to know. Even better, once you understand how they all work together, then you can apply that to virtually any other Microchip MCU.
Finally, start with a 'flash a LED' program. Given that there is a steep learning curve and there are a number of things you need to get right even todebug a trivial program like that (config, oscillator, analog/digital modes on the pins, PPS, main loop etc.), once you get that program working then you have the basis for every other program after that.
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top