PDA

View Full Version : Bootloader



Rob Martin
- 27th May 2004, 20:37
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/pic-prog/bootloader.html

The website says 16f877A is this something special?

Rob

picnaut
- 27th May 2004, 21:08
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!

Rob Martin
- 27th May 2004, 22:21
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

picnaut
- 27th May 2004, 23:34
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
- 31st May 2004, 04:01
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!!!

mikeciz
- 28th December 2004, 04:14
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).

abofar
- 15th April 2012, 19:46
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

http://www.picbasic.co.uk/forum/attachment.php?attachmentid=6408&d=1334512195Attachment 0 (http://www.picbasic.co.uk/forum/attachment.php?attachmentid=0&d=1334512195)http://www.picbasic.co.uk/forum/attachment.php?attachmentid=6409&d=1334512246