Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:58 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PIC32 Programming Connector for MM+

Author Message
sawasdee01
Newbie

Joined: 23/12/2016
Location: United Kingdom
Posts: 33
Posted: 10:25am 21 Aug 2018
Copy link to clipboard 
Print this post

Hi,

I was wondering if anyone could help me with a question about the options for connecting a PICkit Programmer to the MM+ PIC32MX470512H (ie 64 pin).

In the MM+ manual it states that we should use PGEC1 and PGED1. However, these clash with Com1Tx and Com3Tx. Whilst this is probably fine for a lot of scenarios, I would like to retain full access to the programming port during run time.

I was wondering whether it is possible to relocate my programming port to pins 17 and 18 - ie PGEC2 and PGED2 without having to have a new HEX image for MM+? This would allow me free and unhindered access to Com 1.

Best wishes to all.

Sawasdee

 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 10:54am 21 Aug 2018
Copy link to clipboard 
Print this post

The pins for programming the firmware are set by Microchip in the chip design. You can choose from 3 pairs of programming pins when programming the DEVCFG0 register.

I have not tried this myself as I just normally use pair PGEC1/PGED1.

The programming pins are only needed during programming and if wired correctly can usually be used for other functions when not in programming mode.

You can find out more about this in the PIC32MX470 reference manual as a starting point.

Are you using an existing MM board or making your own?
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1044
Posted: 11:44am 21 Aug 2018
Copy link to clipboard 
Print this post

The MM+ backpack designed by @matherp below uses pins 17 and 18 and many have been built so it is not problem.

MM+ Ultimate Backpack

Regards
Gerry
F4 H7FotSF4xGT
 
sawasdee01
Newbie

Joined: 23/12/2016
Location: United Kingdom
Posts: 33
Posted: 12:06pm 21 Aug 2018
Copy link to clipboard 
Print this post

Hi Azure,

Many thanks for your reply.

In the Microchip PIC32 Flash Programming Specification it mentions that: "Any pair of programming pins available on a particular device may be used (for programming)"

Somewhere, it also mentions that DEVCFG0.ICESEL is used for the purposes of the "ICE/ICD Comm Communication Channel Select bits".

This is somewhat ambiguous, to say the least - but the way that I read it is that the DEVCFG0.ICESEL only selects which ICSP is used for In Circuit Emulation / Debug and has nothing to do with programming. (There looks to be some 'chicken and egg' stuff with DEVCFG0.ICESEL being able to control programming, anyhow)

This would explain why you can hook up to pretty much any ICSP when you purchase an empty device from Mouser, Farnell, RS, etc, when using MPLABX.

With any luck, this means that I should be fine to hook up to PGEC2 / PGED2 for the purposes of programming MM+ into the PIC32MX470, but any form of 'post boot debug action' with a PICKit is probably a dead duck. This is ok for what I want, as I don't have the source for MM+, anyway.

So, in summary, I think that I should be fine using PGEC2 / PGED2 for programming MM+ into the PIC32MX470 - but I would be very grateful to hear from anyone who might have had first hand experience, before I acquire more solder related injuries.

Best wishes.

Sawasdee





 
sawasdee01
Newbie

Joined: 23/12/2016
Location: United Kingdom
Posts: 33
Posted: 12:08pm 21 Aug 2018
Copy link to clipboard 
Print this post

Hi Gerry,

Perfect - this is exactly what I was looking for.

A huge 'thank you'

Best wishes.

Sawasdee
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2463
Posted: 12:17pm 21 Aug 2018
Copy link to clipboard 
Print this post

yes, you can use ANY pair of PGC/PGD pins. the only restriction is that any other circuitry connected to the pair you use should present minimal loading - this can be accomplished through either circuit design, or simply by using a pair of jumpers you remove when carrying out ICSP programming.

ICE and debugging is another matter, but as you say you're not going down that path anyway.


cheers,
rob :-)
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025