Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: PIC18 USB Bootloaders

Re: PIC18 USB Bootloaders 8 years 4 months ago #15639

Microchip released a USB Bootloader which supports pretty much every device with USB (back in 2008 - I must be living under a rock). It can be downloaded on the Application Libraries page, read on before you do. The package includes the source code and a compiled program for the graphic user interface, screen shot below.

download package *

The Microchip bootloader includes support for a development board (reset switch/LEDs) which typically isn’t needed for practical use. Joe Hanley (more commonly known as Captainslarty on the proton site) went one step further and removed the additional hardware support, and then packaged all of the precompiled firmware for popular PIC18 devices. At the time of writing, the USB bootloader firmware supports the 18F14K50, 18F2450, 18F2455, 18F2458, 18F2550, 18F2553, 18F4450, 18F4455, 18F4458, 18F4550 and 18F4553 (with 8 or 20Mhz crystal oscillators).

Thanks to Joe, the process of working with the USB Bootloader is simple:
  • Download the PIC18 USB Bootloader pack (and unzip it).
  • Flash the appropriate firmware to your device (using a PICKit 2, for example).
  • The device can now be flashed using a USB cable and PC software.
Note you do not have to use MPLAB or have any knowledge of C18. Once the device is loaded you can flash the device with firmware written in any language. If you want to venture out of the precompiled configurations, then you'll need to get familiar with C18 and have a close look at the original Microchip code.

Read full article...

Re: PIC18 USB Bootloaders 8 years 4 months ago #7521

Good loader, although I've had some issues with Swordfish programs. Likely due to configuration settings, hard to tell without the source code.

I've made a variant of the loader that works in a similar way, am adding some final touches to it and will make it available to all soon enough

Re: PIC18 USB Bootloaders 8 years 4 months ago #7525

  • Jon G
  •  Jon G's Avatar
  • Offline
  • Fresh Boarder
  • Thanks received: 33
NICE! This is also a GUI to what is normally a command line app, if memory serves and I haven't also been under a rock. Whenever I see a company release a utility that is used through command line, it strikes me as an after-thought.

I'm all for command line stuff believe me, I'm a big Linux guy, but still...

Re: PIC18 USB Bootloaders 8 years 4 months ago #7526

  • jmessina
  • jmessina's Avatar
  • Offline
  • Senior Boarder
  • Posts: 44
  • Thanks received: 189
My post about what happens when you remove the code to read an IO pin for the bootloader seems to have vanished, but I still have the same question.

If the bootloader always inits the USB stack and waits for a message at power up, how do you keep it from getting stuck at power on if you happen to be running an app that communicates to the device? In the Mchip version, if the pin isn't asserted then the bootloader just continues on and runs the app.

There's scant details, and no source to look at with Joe's solution. It's convenient not needing a pin, but how's it actually work?

Re: PIC18 USB Bootloaders 8 years 4 months ago #7529

Sorry Jerry - I've unpublished the topic for a moment while I make a couple more changes. I believe this bootloader works in a similar way as I am with the RCON RI flag - upon a fresh power cycle the device is in "bootload" mode, and if the PC application is running then it will connect. If not, then it will run the user application.

In addition, if the PIC does detect the PC software, then the user can reset the device from the PC, removing it from "bootload" mode.

Re: PIC18 USB Bootloaders 8 years 4 months ago #7530

  • jmessina
  • jmessina's Avatar
  • Offline
  • Senior Boarder
  • Posts: 44
  • Thanks received: 189
So when it powers up, the bootloader runs, initializes the USB stack, and waits for a message? How long does it wait? What if it gets a USB message that isn't from the bootloader application?
Time to create page: 0.250 seconds