PDA

View Full Version : Bootloader problem.



Peter Oors
- 19th April 2006, 06:19
For the first time I use the bootloader with the 16F877.
Loading with the PicStart Plus and running the next simple program is no problem.
Loading the bootloader isn't a problem.
Loading the program by the bootloader insn't a problem too.
Running behaves strange.
Portb.3 stays an input.
The other B ports go high for 2 seconds, then low and then they become inputs.
Nothing else happends.
Did I do something wrong or forget something?

DEFINE LOADER_USED 1 ' Bootloader 19200

@ DEVICE PIC16F877,XT_OSC
@ DEVICE PIC16F877,BOD_OFF
@ DEVICE PIC16F877,LVP_OFF
@ DEVICE PIC16F877,CPD_OFF
@ DEVICE PIC16F877,PROTECT_OFF

DEFINE OSC 4
ADCON1 = %10000010
TRISB = %00000000
Pause 200
Clear

STARTEN:
PORTB=255
Pause 2000
PORTB=0
Pause 1000
GoTo starten

End

mister_e
- 19th April 2006, 13:52
how about if you remove the config fuse? BTW they're not supposed to be there. You need to set them ONLY when you load the bootloader firmware. More than often, the default one are set correctly.

Bruce
- 19th April 2006, 15:28
RB3 is the LVP pin. Make sure you're not setting LVP ON at the time you program the boot-loader .hex file into your F877 with your PicStart Plus.

Peter Oors
- 19th April 2006, 18:50
RB3 is the LVP pin. Make sure you're not setting LVP ON at the time you program the boot-loader .hex file into your F877 with your PicStart Plus.

This was indeed the problem. Now it works fine.
Thank you Bruce.

Mister_e, leaving the config fuse didn't harm.....

Thanks to all of you.