Inquiring about PIC32 programmer?

Discussion in 'Embedded Systems and Microcontrollers' started by rougie, Apr 18, 2013.

  1. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello,

    I am looking into making my own PIC32 programmer by selecting a compiled hex file and down loading it into the PIC 32. On the PC side, there will be a VC++ or .NET program in charge of sending the hex file to my USB port.

    I have a question concerning the hardware side of my attachment. Why is it that in the schematic, they show pins 15(VBUS) and 23(VUSB3V3) of the PIC32 connected to the 3.3V power source. Do these pins really need to be connected ?

    Thanks for all help!

    r
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Your programmer is some variant of a PICKIT 2 clone I think. If you can afford it ditch your current programmer and programming software. And get a PICKIT 3 or clone. However I think it is a reason why your programmer schematic is drawn that way. And to ensure proper programming. Just go with your current schematic.
     
  3. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello t06afre,

    Well... i see your point that it is connected to ensure proper programming!
    But why??? The Pic32 is not using any USB operations, it's using JTAG!
    So why would those USB pins of the Pic32 need to be connected???

    bof... confused!
    thanks for your reply
    r
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    You should take a peek at the PIC32 Flash Programming Specification.

    AFAIK these pins do not need any power during programming, they are only needed for USB, but I've never tried this.

    Also, a PICkit 3 is only 45 USD and not only works seamlessly inside MPLAB, is tested and guaranteed to work, and also supports in circuit debugging, You should seriously consider getting one for working with PIC32's.

    And I must ask: what are you using to program the PIC18 in your programmer?
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,002
    Buy a pickit3 and save you and everyone else a lot of headaches. If you still want to build your programmer AFTER you purchase a PicKit3 (or even a 2) then wonderful. It would be an interesting project but you will have a known working pickit to use to check your work.
     
  6. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Guys,

    I have an ICD3, I have a MikroProg and I would have no problems buying an Pickit3. That's not the issue. Here's why I need that:

    My target board requires its own embedded programmer to program the on board PIC32. In other words, my target board has a PIC32 MCU which needs to be programmed from another MCU because no one will be at the remote PC location. Therefore all compiles will be done from my PC. And the hex file from my PC, will be sent to the remote PC and sent wirelessly to the target board so it can be programmed onto the PIC32 which is far away from my PC. Please view attachment.

    So, I still don't see why pins 15(VBUS) and 23(VUSB3V3) of the PIC32 are connected to the 3.3V power source.

    Thanks
    rob
     
    Last edited: Apr 18, 2013
  7. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    install jumpers and simply try out
     
  8. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    "install jumpers and simply try out"

    you bet !

    thanks
    r
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Asked and answered.

    I once did a programmer for a PIC12 device, protocol wasn't hard to follow. I've never looked at programming a PIC32 but I would be surprised if it was very different.
     
  10. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    One more question! I would like to ask your opinions on the following:

    In reference to my last drawing, is it possible to program the PIC32 from
    "My PC" directly onto the target board without the use of the "Remote PC"?

    In other words, is it doable if I send my hex file from "My PC", through my router and dsl modem, through the web, back into the target dsl modem (at the remote PC side), and then trough its router and straight into the PIC 32 through the WIFI without the use of the "Remote PC"?

    All feedback and recomended links that explain this are appreciated!

    thanks
    r
     
    Last edited: Apr 20, 2013
  11. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think Microchip has some application notes, Using USB and a boot loader approach. They have for sure using the serial port. But I have not used this my self. So I do not know much about and PIC32. Take a search on Google or Microchip using USB and boot loader as key words
     
  12. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    hello t06afre,

    I want to program the pic32 via the Internet and wifi as shown
    in my diagram !! not via USB???

    Why are you saying "USB"?

    My pic32 will interface the wifi module via spi
    or uart.... My question has nothing to do with USB
    it has to do with programing a pic32 without using
    the "remote PC" as shown in the diagram.

    is this possible...

    In other words do we need the "Remote Pc" ???

    "Take a search on Google or Microchip using USB and boot loader as key words"
    I did but I don't seem to find the feedback I am looking for?

    thanks for your reply!
     
    Last edited: Apr 20, 2013
  13. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Microchip's AN1388, "PIC32 Bootloader," which demonstrates various ways of obtaining the code, one of which is over an Ethernet connection.

    Bootloaders split the code space of your device into a constant bootloader portion, and a variable application portion. Thus when the bootloader runs the PIC can reprogram itself, a pretty neat trick.

    I did this using an SD card on a PIC32 with good success. It is not simple as both the bootloader and app need very custom linker scripts.

    But yes, it is possible.
     
  14. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    yes but all this without the need of the remote PC?
     
  15. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    No, you absolutely need a PC. Several, unless you have a quad processor core.

    And RAM, lots of RAM too, with fava beans and a nice chianti.
     
Loading...