CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problems after implementing the microchipc bootloader

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jester
Guest







Problems after implementing the microchipc bootloader
PostPosted: Thu Nov 06, 2003 7:46 am     Reply with quote

Hi

I'm working with 16F877. My program has been ok, but now i implemented the bootloader from www.microchipc.com (the 20MHz version of hex files) i have faced some problems.

The bootloader is working fine, and also most of my own code is working as it does when i program my chip with PicStart Plus- programmer.

Anyhow one very important part of my code doesn't work after i have used the Microchipc bootloader. The program simply just hangs. So i quess that some part of my code points somewhere in memory that it shouldn't point. When programming the chip with PicStart this failure dissapears. Has anyone had similar problems?

-J

My compiler version is 3.178
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 06, 2003 11:19 am     Reply with quote

Here are two possible reasons:

1. Since the bootloader runs in the top 256 bytes of ROM, you need
to reserve that space and prevent the compiler from using it.
Do it with the #org statement, like this:

#org 0x1F00, 0x1FFF {}

main()
{

}

2. The hex file from Microchipc comes with the LVP fuse enabled.
So, suppose you have a line of code in your program that turns
on the Port B pull-ups. The program will instantly lock up,
because taking pin B3 high will put the PIC into Low Voltage
programming mode.

Solution:
Import the hex file into MPLAB again. Bring up the Picstart-Plus
programming window. Change the config bit setting for LVP
to Disabled. Now re-program the 16F877.


If you do these two things, it will probably fix your problems.
Jester
Guest







PostPosted: Fri Nov 07, 2003 12:22 am     Reply with quote

Clearing the LVP bit did the magic!!!

PCM Programmer have you ever thought that your advices are worth of money! If so, you are doing great charity work Laughing

All the Best!

-J
nicksiz
Guest







bootloader
PostPosted: Mon Jul 09, 2007 2:16 am     Reply with quote

I tryıng about bootloader
but a problem here;
ı am using microchip firm ware for 16f877a
and my main program is that;



#include <16F877A.h>
#device adc=8

#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz)
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected




#use delay(clock=18432000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)

#org 0x1f00,0x1fff
void main(void)
{

//write_eeprom(0,0x00FF);

while(1)
{
if(!input(pin_b0)){goto_address(0x0000);}

output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);

output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);


output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
delay_ms(500);



}
}


ı am programıng pic with firmware than with picdem 2 plus ı am tryıng bootloading the microchip pic16f/18f bootloader gives that error.mcp
000030 00 34 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
004000 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 3A 3F
what can ı do
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group