Working bootloader hex on 18f2550


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126

    Default

    Updating the PBP code with

    DEFINE RESET_ORG 1000h ' For Microchip USB Bootloader
    DEFINE INTERRUPT_ORG 1008h ' For Microchip USB Bootloader

    Fixed the issue so I can now use the HID bootloader, which has the source for the Bootloader PC app.

    With the second DEFINE I am not sure if I require it, but I have seen it mentioned in some posts and the Microchip docs actually mention that the Interrupt vectors are moved. It also says that the High and Low priority are on two separate locations, but my code seems to work and its late.

    Tomorrow I will investigate further..

    Till then Happy Pic'n !

    bill

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    All you need to make the new HID loader work with PBP is DEFINE RESET_ORG 1000h.

    If you're using both high-pri & low-pri interrupts, then just use the interrupt DEFINEs.

    Example:

    DEFINE INTHAND High-Pri
    DEFINE INTLHAND Low-Pri

    PBP will automatically take care of it for you with ORG RESET_ORG + 8 for the high priority
    jump, and ORG RESET_ORG + 18h for the low priority jump.

    At 0x1008 PBP inserts GOTO High-Pri, and at 0x1018 GOTO Low-Pri.

    If you're not using interrupts all you need is the DEFINE RESET_ORG 1000h.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126

    Default

    Bruce,

    I have DT_Int running, so will these commands still be needed ? Not sure if it adds these automagically.

    bill.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    Hi Bill,

    All you need is the DEFINE RESET_ORG 1000h. If you look in the DT_INTS-18.bas file,
    you'll see where it's already including the int handler DEFINEs for high & low int handlers.

    So PBP will still place the correct int vector offsets in there automagically for you.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    saochu's Avatar
    saochu Guest

    Default thanks all

    i reading and thanks to all some one !

  6. #6

    Default

    ok now i have the hex in the pic, and when i connect it to the PC I get a ding-dong, it says its a unknown device...

    I guess the fuses were wrong for my xtal so in my programmer software i changed the divider from the old 20mhz crystal to the setting for my 4mhz one.


    now when i connect it says there's a pic device blah blah, and the pic starts 2 leds flashing....

    looks like a worker to that point...

    so I have my own (from the USBCDCDEMO) program I want to put on the pic, obviously after the boot loader, so I have a define reset org1000h

    But, when i compile and a get a lovely .hex file to program, how do i program it into the pic.....

    I must need some utility on the pc to load and blow the .hex file...

    And, do we have one that can work with microcode studio and take the .hex file as a command-line parameter and blow the hex, or is it going to have to be an awful standalone program etc that requires 768 mouse clicks....... (like the ql200 software seems to)

    Looks like i am still were i was when i made the first post 2 years ago lol
    Last edited by f_lez; - 19th March 2010 at 17:52.

Similar Threads

  1. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  2. Replies: 6
    Last Post: - 5th November 2008, 11:30
  3. 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
  4. Some test hex for a 18f2550
    By f_lez in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th October 2006, 14:24
  5. Bootloader + Mainline code in single HEX file
    By dman776 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th May 2006, 22:59

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