• AVR Freaks

Hot!DSPIC33EP - ICSP Pin

Author
delmat
New Member
  • Total Posts : 29
  • Reward points : 0
  • Joined: 2018/08/01 09:53:05
  • Location: 0
  • Status: offline
2018/09/25 09:50:56 (permalink)
0

DSPIC33EP - ICSP Pin

Dear All,
 
for the first time I wuld like to use in one of my new projects a dsPIC33EP32MC202.
 
In the datasheet I read that it can be programmed with the ICD3 interface (which I already have) and that in particular:
 
-ICSPCLK of ICD3 must be connected to a PGECx pin of the microcontroller
 
-ICSPDAT of ICD3 must be connected to a PGEDx pin of the microcontroller
 
What I don't understand is why there are several couples of PGEC-PGED pins on the microcontroller.
 
 
Are they all equivalent? Can I choose the couple of pin that for me are the best?
Thank you in advance,
 
 
Mattia
#1
MBedder
Circuit breaker
  • Total Posts : 6773
  • Reward points : 0
  • Joined: 2008/05/30 11:24:01
  • Location: Zelenograd, Russia
  • Status: offline
Re: DSPIC33EP - ICSP Pin 2018/09/25 10:12:57 (permalink)
5 (1)
They are all equivalent (any pair works) for programming (flashing) the chip but for debugging you have to select a particular pair by means of flashing the appropriate FICD.ICSxx configuration bits. This has been made to allow the user to free up the two remaining pairs for user functions.
#2
JPortici
Super Member
  • Total Posts : 711
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
Re: DSPIC33EP - ICSP Pin 2018/09/25 10:24:01 (permalink)
5 (1)
delmat
What I don't understand is why there are several couples of PGEC-PGED pins on the microcontroller.

 
Very simple
Are they all equivalent? Can I choose the couple of pin that for me are the best?

Yes, that is the reason.
#3
du00000001
Just Some Member
  • Total Posts : 2893
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: DSPIC33EP - ICSP Pin 2018/09/25 12:58:09 (permalink)
0
My guess is that the basic idea behind this option to choose from multiple ICD ports was ease of layout and - to some extend - the option to choose which special functions you might not require in your application.
 
The additional benefit: you are lucky to have gotten another chance to misconfigure your dsPIC  wink
(IIRC, programming does work on any pair - irrespective of the settings. Debug doesn't - it works only on the ICD port selected.)
 

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#4
pg318
Starting Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2015/10/30 07:37:28
  • Location: 0
  • Status: offline
Re: DSPIC33EP - ICSP Pin 2018/09/25 13:50:42 (permalink)
0
Not all of the peripherals are remappable, especially analog, so if you needed to be able to debug with those peripherals active, you'd have to choose a port that doesn't interfere with the I/O associated with them.. 
#5
Jump to:
© 2019 APG vNext Commercial Version 4.5