USB Bootloader.


Results 1 to 23 of 23

Thread: USB Bootloader.

Threaded View

  1. #9
    Join Date
    Dec 2011
    Posts
    2

    Default Re: USB Bootloader.

    Quote Originally Posted by Sherbrook View Post
    Hi Foggy
    If you still want a USB bootloader that works with PBP then try this one.
    If I can get it to work then you should also. Get it here:-

    http://digital-diy.com/pic-micrcontr...otloaders.html

    Example program - **** DO NOT INCLUDE the line 'DEFINE LOADER USED 1' ****


    DEFINE OSC 48
    DEFINE RESET_ORG 0F00h 'Load code at 0F00h

    RED_LED VAR PORTC.0
    YELLOW_LED VAR PORTC.1
    GREEN_LED VAR PORTC.2

    START:
    HIGH RED_LED
    PAUSE 500
    LOW RED_LED
    HIGH YELLOW_LED
    PAUSE 500
    LOW YELLOW_LED
    HIGH GREEN_LED
    PAUSE 500
    LOW GREEN_LED
    GOTO START:


    Compile and then load the hex file produced into the PIC with the bootloader.
    Reset the PIC by taking MCLR pin low and the LEDs should blink
    Reset the PIC again by taking MCLR low and you should be back in bootloader mode. No need to hold PORTB.4 low as with the Microchip bootloader. Don't forget pull-up on MCLR.

    A few conclusions reached mainly by trial and error.
    1 - DEFINE LOADER_USED 1
    This is not required. As far as I can tell all it does is tell the compiler to load the hex file using Microcode Loader when "Compile/Program" is clicked and puts a jump to where the Microcode loader is in the PIC memory which we do not want.
    2 - DEFINE RESET_ORG 0F00h
    This IS required as it sets the memory address where the program will be loaded.
    3 - The bootloader software is best flashed to a BLANK PIC. It may take 2 or 3 erase cycles before the PIC is blank.
    4 - When flashing the PIC with PICKit programmer, click on "Tools" then "Enable code protect". This seems (so far) to prevent the bootloader from being accidentally over written.
    5 - Tested with Windows XP, PBP 2.6, PIC 18F2550 20mHz Xtal
    I have no other suitable PICs to test at the moment.

    I have tried it with a few short programs and so far it has worked 100%

    Phil
    Phil-- Thanks for taking time to respond to my earlier post!!! As I type, I have both versions, HID & MCHPUSB bootloaders working. The particular one that I am using for no real good reason is the MCHPUSB bootloader. Getting one of these to work can be veeeery tiring if you have not done so to begin with. Some of my problems included the oscillator selection for my "main" because the USB requires either 48 or 20 MHz. After that burden was resolved with the MCHUSB, I had to change the 18F4550 linker code.

    Another thing that pi$$ed me with the HID loader was I read that the bootloader screen would just pop up from the ether once the loader was properly configured. Now granted I might have missed something that directed one to fetch the program screen from Microchip Solutions. For my use at least with C18 I can get by with the the MCHPUSB loader. And of course, Michrochip has now introduced a newer, better, improved more better....eh, make that MUCH better compiler. I spoke to one of their technical gals last January about replacing my full version of C18. I was told that I am eligible for the upgrade....but don't do it now!

    I will say that using the USB loader it gives me greater desk real estate without having to use the programmer.

    Thanks again--

    Foggy
    Last edited by foggysail; - 2nd May 2013 at 02:49.

Similar Threads

  1. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  2. Replies: 7
    Last Post: - 10th November 2008, 09:24
  3. USB Bootloader CRASH on Vista
    By mindthomas in forum USB
    Replies: 9
    Last Post: - 9th March 2008, 20:56
  4. 18F2550 MCRL/RE3 problem with USB bootloader Microchip
    By Ronald123 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th September 2007, 10:48
  5. BootLoader with USB to Serial Convertors
    By mike101video in forum General
    Replies: 6
    Last Post: - 10th January 2006, 16:48

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts