USB Bootloader.


Closed Thread
Results 1 to 23 of 23

Thread: USB Bootloader.

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Posts
    448

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Thanks Dave,
    I got the 'other' USB bootloader from Microchip working (I believe it is the HID bootloader), well kind of.... I have a simple blink-a-led program that when flashed directly to the PIC works fine but when downloaded thru the bootloader it either doesn't "get there" or it never executes or there's something else going wrong.

    Thanks!
    /Henrik.
    Absolutely the same problem here, Henrik. Did you make any progress?

    Moreover, I find that all the USB bootloaders at Microchip, by default use a setting of HS Oscillator, PLL enabled, HS used by USB; with this I always get a USB Device Not Recognized; I have to change it to HS Oscillator, HS used by USB to get the pic (18F4455 in my case) to be recognised by the PC. But beyond this point, the loader fails to 'burn' the program in the pic; I have used the DEFINE LOADER_USED 1 and DEFINE RESET_ORG 1000h.

    Wonder what I am doing wrong?

    Incidentally, the test program works despite the 2 defines if I program it directly using a Pickit2. Didnt really expect that to happen?

    Regards,

    Anand

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624

    Default

    Hi,
    Sorry, no progress, I gave up on it for the time being. Still interested if you or anyone else has or finds a USB bootloader that "just works! though.

    /Henrik.

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default

    Did you guys see this thread:
    http://www.picbasic.co.uk/forum/show...usb+bootloader

    It talks about skipping over the bootloader code using:
    Code:
    DEFINE LOADER_USED 1
    DEFINE RESET_ORG 1000h ' For Microchip USB Bootloader
    Just wondering if that improves anything? Have yet to try the USB bootloader here though.

  4. #4
    Join Date
    Oct 2004
    Posts
    448

    Default

    First, thanks Scaler for the reference; I had included the 2 defines.

    Now, to sum up my observations; Henrik, these might be of use to you.

    1) A 10uF cap across the Vdd, Vss seems mandatory, regardless of whether you're powering up from the USB, or a separate supply.

    2) The Microchip HID bootloader works all right, although it gives a program/verify error. Once you program your code thru' the bootloader, you need to *re-start* the pic; a reset doesnt help. At this point, when the pic comes up again, your code will start executing happily.

    3) To get back into the booltoad mode, momentarily ground RA6. You're now ready to load another file thru' the bootloader.

    Not perfect, of course, I'd still like to not have the bootloader report the error, but seems to work otherwise.

    At times I feel like just giving in favour of a serial bootloader but the concept of a USB bootloader is too tempting to go away

    If anybody does any further work on this, or wishes to add more, I'd really appreciate it.

    Regards,

    Anand

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default

    Sorry Anand, missed that you already tried that. I got a chance to try out Microchip HID Bootloader v2.3 this morning on a 18f4550 using the Olimex PIC-USB-STK http://www.olimex.com/dev/pdf/PIC/PIC-USB-STK.pdf

    and I got an LED blinky to work. For this chip, you have to hold down PORTB.4 to get it into bootloader mode. Then I can program and verify correctly. The hex I was using assumes a 12 mhz oscillator, and uses PLL to bring it up to 48.

    Once my blinky program is loaded, I can hit the reset button, and my LED starts to blink.

  6. #6
    Join Date
    Oct 2004
    Posts
    448

    Default

    Quote Originally Posted by scalerobotics View Post
    For this chip, you have to hold down PORTB.4 to get it into bootloader mode. Then I can program and verify correctly. The hex I was using assumes a 12 mhz oscillator, and uses PLL to bring it up to 48.

    Once my blinky program is loaded, I can hit the reset button, and my LED starts to blink.
    Thanks a ton! Wasnt aware of the PORTB.4 switch, works perfect.

    Now, if I can just figure out why I get the error message, despite the code getting programmed alright!

    BTW, what hex file are you using for the bootloader? And, the Olimex schematic shows a 20 MHz crystal (the same as mine); how did you change the hex file to accomodate the 12 MHz?

    Thanks for the help!

    Anand

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default

    Glad to hear it almost works for you. What error message are you getting? Is it on verification? Are you changing any of the configs for the program you are trying to bootload?

    As far as my crystall, Hmmm....

    My eyes are getting bad.... Will have to check the board again when I get home. I have not changed the crystall, so it is just a matter of whether it matches the schematic. I will attach the hex file I am using tonight as well. But I think it came with Microchips MCHPFSUSB Framework install (79 meg download). I did not modify it, just programmed it directly.

    Walter

    Added:
    Here is some more information about their bootloader. This is included in the large downlaod, but you sort of have to search for it.

    http://www.scalerobotics.com/MCBootloader.html
    Last edited by ScaleRobotics; - 2nd March 2010 at 20:38.

Similar Threads

  1. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 21:17
  2. Replies: 7
    Last Post: - 10th November 2008, 10:24
  3. USB Bootloader CRASH on Vista
    By mindthomas in forum USB
    Replies: 9
    Last Post: - 9th March 2008, 21: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, 11:48
  5. BootLoader with USB to Serial Convertors
    By mike101video in forum General
    Replies: 6
    Last Post: - 10th January 2006, 17: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