2

I'm currently trying to burn the pinguino bootloader in a pic32mx250f128b which is 5V tolerant with an arduino uno. I'd want to try pic32 chips, but I haven't a pickit3 now, I can only access to pickit2.

So to burn the bootloader I'm using an arduino uno, and use the bitbang sketch from pic32prog to try to burn it.

For the wiring I did this :

  • All VDD and the VUSB3V3BUS pins are wired to the 3V3 regulator of the arduino uno.
  • All VSS pins are connected to the ground of the arduino uno.
  • Arduino D2 (PGC) is directly connected to PGEC1
  • Arduino D3 (PGD) is directly connected to PGED1
  • Arduino D4 (MCLR) is directly connected to MCLR

But actually, when I launch pic32prog I always have this output :

Programmer for Microchip PIC32 microcontrollers, Version 2.0.218
Copyright: (C) 2011-2015 Serge Vakulenko
   (ascii ICSP coded by Robert Rozee)

  Adapter: ... OK1 OK2 - ascii ICSP v1E

No target found.

I tried also with the couples PGEC2/PGED2 and PGEC3/PGED3.

I haven't tried to use a crystal yet, but I think from what I read it's not needed for ICSP programming.

For now here is what I've done on my breadboard :

photo of the pic on the breadboard

I don't know what could cause this detection problem,

Thank you very much for your help :)

Edit : I tried several things and here is where I am :

  • I added the pull-up on MCLR, capacitors on VDD pins, and others recommended : Still the error No target found.
  • I saw that pic32prog add compatibility with pickit2 so I tried it : this time the pic is detected but I get this error : Unknown CPUID : ffffffff. I tried also with a new pic32mx250 on the pickit2 to be sure it wasn't the first which was damaged.
  • Finally to recheck my connections I found another version of the datasheet. In this one it seems that PGECx and PGEDx pins aren't 5V compatible... -> So I'll test with 3.3v compatible circuit this time
Elominp
  • 59
  • 5

2 Answers2

2

you need 3k3 pullups to the 3v3 supply rail on both PGC and PGD. these two outputs are 'open collector' (simulated) and the 3k3 resistors define the logic '1' voltage fed to the PGC and PGD pins of the target PIC32.

as mentioned by others, you also need a 10k pullup on MCLR. in addition, you need to ensure that all Vcc pins (13 and 28) are connected together, all ground pins (8, 19 and 27) are connected together, and that there is a 10uF low ESR ceramic capacitor from pin 20 to ground (a 22uF tantalum will do).

see the "ascii ICSP construction guide" article here: https://www.rictech.nz/files/126/file/ASCII-ICSP-constructor-guide-pdf the article includes a schematic of what is required.

cheers, rob :-)

Andy Preston
  • 779
  • 4
  • 9
  • 23
  • Thanks for your reply, back then I followed the guide you linked me and added the pullup and capacitors without success. The pic wasn't detected. But I found after in the datasheet that on the pins used for the programming, only MCLR pin was really 5V tolerant which should be a good reason to explain my failures. And for some reasons I hadn't enough time to continue. But I'll try again with a 3.3v arduino build and a Raspberry Pi and tell you the results, though it won't be soon. – Elominp Apr 18 '17 at 14:37
1

the 10uF low ESR ceramic capacitor on pin 20 is crucial. pin 20 connects ONLY to this capacitor, nothing else. without it, the core of the PIC32 will not run and programming will be impossible.

the reason for this is that the core of the PIC32 runs at 1.8 volts, and the capacitor on pin 20 is part of the circuitry that generates this supply. in your photo it looks like pin 20 is not connected to anything.

cheers, rob :-)