Bootloader


Closed Thread
Results 1 to 7 of 7

Thread: Bootloader

  1. #1
    Join Date
    Mar 2004
    Posts
    44

    Default Bootloader

    A little help please.

    I'm using the Micro Studio Plus boot loader but after 100+ attempts I've given up.
    I know the LABX2 board I'm using works fine as I'm using the ICD software which works fine.

    The PCB has a 4MHz Crystal and I'm using 16f876-20p & 16f877-20p.
    I've tried loading both the 4 & 20MHz loader files but still no joy.
    http://www.mecanique.co.uk/products/...ootloader.html

    The website says 16f877A is this something special?

    Rob

  2. #2


    Did you find this post helpful? Yes | No

    Default PIC16F877A is special

    Hello,

    You're going to need the burn the bootloader for the PIC16F877A onto PIC16F877A chips and the bootloader for the PIC16F877 onto the PIC16F877 chips.

    Their architecture, especially in terms of the flash memory, is different and is dealt with differently.

    If you straighten this out you should be good to go.

    I had the same problem last month and now I have less hair.



    Cheers!
    ---> picnaut

  3. #3
    Join Date
    Mar 2004
    Posts
    44


    Did you find this post helpful? Yes | No

    Default

    OK just so I understand I used

    Define LOADER_USED 1

    Which I assumed loaded the bootloader when it compiled in pbp.

    Do I need to blow the bootloader first then compile and blow the program?

    Rob

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Hello again,

    There are a few things that you have to do:

    1)
    Figure out what kind of PIC you're using - 16F877 or 16F877A


    2)
    Make sure that you've programmed your PIC with the correct bootloader file that matches the chip (make sure you match the oscillator frequency and the part type).

    3)
    Then, in microcode studio, make sure that it knows which chip you're programming for (16F877 or 16F877A).

    4)
    Then press the "compile and program" button.

    That should do it.

    By the way, "DEFINE LOADER_USED 1" is correct.


    Hope this helps!
    ---> picnaut

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Hi Again,

    Just so there is no confusion...

    The bootloader needs to be burned onto the PIC with an Epic or PICStart Plus, or some other chip burner.

    After this has been done, you will be able to load your actual application onto the PIC via the serial port.

    All that "DEFINE LOADER_USED 1" does is tell the compiler that you're using a bootloader. This is required so that the compiler knows not to write into the first few memory locations or the last 255 bytes. This is where the bootloader resides.

    Then, programming begins by the DTR signal on the serial port resetting the PIC. The PIC starts up in the bootloader code and waits for a momet to see if new code will be loaded onto the PIC. If not, then it starts your application. If so, then it loads its memory with comes down the serial port.

    When it's finished, the application starts.

    Have fun!!!
    ---> picnaut

  6. #6
    mikeciz's Avatar
    mikeciz Guest


    Did you find this post helpful? Yes | No

    Unhappy bootloader error?

    I'm also trying to use the bootloader w/ the 16f877a. I have loaded the 16F877A_04.hex to the 16F877A chip with ICPROG. It verifies and all looks good. Then when I try to run loader, I get an error "Microntroller Series Mismatch - The target microcontroller uses a different instruction format from the loaded *.hex file. For example you might be trying to program a 16F8xx series microcontroller with a *.hex file assembled for a 18F8xxx device"

    In microcode studio I have the dropdown set to "16F877A" when I compile. What could I be doing wrong? Also this error occurs whenever there is power to my circuit and I press the "program" button in loader (I don't have to reset MCLR like I thought I had to do).

  7. #7
    Join Date
    Feb 2012
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: Bootloader

    Hello.Everyone
    I have a problem with microcode studio plus ver.4.
    I wanted to use the microcode loader.I read all instruction in help files and in this forum about loader.I have pic16f877a I made sure it is selected in MCSP. Firstly I programmed the pic with pic16f877A_4.Hex using Melab programmer 3.31 Beta.Configured it to "XT"
    The program is sample blink.pbp modified to suit the loader" added
    DEFINE OSC 4
    DEFINE LOADER_USED 1
    At the beginning of program. I failed to program the pic
    I got the two errors shown in the images attached.
    When I got the first error massage I selected "programany way" suggested by message.I then got the second error message.
    Can any body please help me.
    Obaid

    Attachment 0

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 17:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. USBDemo with Bootloader
    By vacpress in forum USB
    Replies: 4
    Last Post: - 25th January 2007, 22:29
  4. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 17:51
  5. Replies: 3
    Last Post: - 26th January 2005, 13:41

Members who have read this thread : 1

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