PDA

View Full Version : Bootloader Problems



rossfree
- 11th February 2005, 12:05
Hi all,

I am using the Microcode bootloader on a 16f877. I have several 877 controllers and at one time have had great sucess using them with the bootloader on an Olimex board.

I also have an updated Picstart Plus programmer. I used this programmer to load the bootloader in the 877s.

At some point along the way, I think I had the wrong controller chosen to program the 877 using Microcode. I had been bouncing back and forth between the 877 and 876 pics and in my haste tried programming the 877 with the 876 chosen in Microcode Studio's software.

Does anyone know if that blows something away on the chip? I zero'd the 877 out with MPLAB and my Picstart Plus and reinstalled the bootloader but I haven't gotten the bootloader to work again... though MPLAB says that the 877 programmed just fine.

Further, this problem seems to have happened (over time) to all of my 877 pics (5). At one point, I thought it was a hardware related problem... but now I'm just not so sure.

If I don't use the bootloader and just program the chips using my Picstart, everything works just ducky! The 877's appear to work fine in every way... they just don't bootload anymore.

I'm working on a large project... making small program changes and then checking them in-circuit. Pulling the 877's out of circuit and using the Picstart is killing me timewise... not to mention the wear and tear on chips, pins and sockets.

I need the bootloader back. Does anyone know how I can tell if I've killed the chips or if it is a hardware related issue?

Help!

Thank you!

Ross

PS: I'm not using the Olimex board in my project or I would consider using the ICSP port. There is no ICSP port available on the board I am using. I need the bootloader! :-P

Bruce
- 11th February 2005, 14:02
If you can program the 877 with your device programmer, and your code runs as expected, I doubt your controller is bad.

Are you using DEFINE LOADER_USED 1?

Are you using DEFINE OSC ? & a crystal frequency that matches the loader firmware you program into the target?

Have you checked/verified the comm port the loader software is set to use?

Do you have the MCS loader software set for Auto Detect under Options >> Baud Rate?

rossfree
- 11th February 2005, 16:54
Thank you Bruce for getting back to me. I went through everything you listed. Been racking my brain for the last five hours.

As it turned out... it was a COM PORT problem. For whatever reason, if MPLAB was running in the background, set to COM1, I could not choose COM1 on Microcode Studio. Go figure!

Once I noticed there was a COM port difference I closed both programs and re-opened MPLAB (since I knew it was working) and verified which COM port worked on the PICSTART programmer (COM 1). Then I closed MPLAB and re-opened Microcode Studio and was only then able to change communications back to COM1. Badabing! It worked!

Earlier, in my frustrations, I likely made another mistake... I don't think I checked the configuration bits when I chose the 877 in MPLAB. It allowed me to program the chip with the bootloader (of course) but very likely balked when I tried to use the bootloader with Microcode Studio (even if I had the port correctly set at some earlier time).

I'm typing this down so that someone else can benefit from my exhaustive hair-pulling.

Your reply was much appreciated and served to nudge me to keep going. I was sure ready to quit.

Thanks again Bruce!!!

Ross

mister_e
- 11th February 2005, 17:24
You don't need to close MPLAB to make it work. Just disable the programmer under the "PROGRAMMER" menu.

rossfree
- 11th February 2005, 17:51
I'll give that a try... thanks again,

Ross