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

write_program_memory, software locks up when called
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Nick
Guest







PostPosted: Mon Sep 19, 2005 6:54 pm     Reply with quote

the error occurs on the pic16f876a but not pic16f876, the only difference in the file is the include pic statement. I've contacted CCS about the error. I hope they will give me a patch without having to upgrade versions.

Thanks again,
Nick
mathewss



Joined: 07 Aug 2008
Posts: 17

View user's profile Send private message

Same issue on 16F877A
PostPosted: Sun Sep 14, 2008 1:03 am     Reply with quote

Did you ever figure this out? I am having the exact problem using the same base code as you on a PIC16F877A chip..


Re
Sean
truong87bk



Joined: 27 Apr 2009
Posts: 1
Location: Vietnam

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Apr 27, 2009 10:01 pm     Reply with quote

PCM programmer wrote:
I ran the test program below, and it failed with PCM vs. 3.187.
It only displays:

Start

It worked with PCM vs. 3.234. With that version, it displayed:

Start
Done

Code:

#include <16F877A.H>
#fuses  XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

int8 count = 0;

#int_timer2
void rtcc_isr(void)
{
count++;
}

//================================
main(void)
{
int8 count;
int16 addr;
int8 data[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
int8 value;

setup_timer_2(T2_DIV_BY_1, 127, 1);
enable_interrupts(INT_TIMER2);
enable_interrupts(GLOBAL);

printf("Start\n\r");

disable_interrupts(GLOBAL);

count = 16;
addr = 0;
write_program_memory(addr, data, count);

printf("Done\n\r");

while(1);
}

I tried your code but why doesn't it work? :((
When I ran your code in Proteus software, it is reported:
http://i44.photobucket.com/albums/f4/truong87bk/Flash-Proteus.jpg
(I use CCS 4.0.72)
Do you know what the problem is?
_________________
http://360.yahoo.com/truong87bk
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 27, 2009 10:07 pm     Reply with quote

Quote:
I use CCS 4.0.72

That's not a version number. Look at the top of the .LST file to find it.
The version number will be in this format: x.xxx

The .LST file will be in your project directory.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Apr 27, 2009 11:39 pm     Reply with quote

Quote:
I tried your code but why doesn't it work?

Are you seriously asking, why you can't overwrite program memory starting from address 0 without fatal results? I would name it application suicide.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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