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 support@ccsinfo.com

Getc() and write_eeprom() freezes 16F876

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







Getc() and write_eeprom() freezes 16F876
PostPosted: Tue May 13, 2003 9:30 pm     Reply with quote

Has anyone ever had the problem of running Getc() and write_eeprom() sequentially and then having the PIC stop running its interrupts or freeze up all together? The write operation still works, as the data is updated at reset, but for some reason it won't come out of the write completely and the functions work fine independently...any ideas?

btw:
This is in a fairly large program (uses about 65 percent of the program eeprom). I tried re-initializing my interrupts, but to no avail...I also wrote my own data EEPROM access functions in assembly, but it does the same thing.

code segment:
-------------------------------------------

putc('3');
scaleflag=getc();
write_eeprom(72, scaleflag);
if(scaleflag==1)threshold=50; //celsius
else if(scaleflag==2)
threshold=122; //fahrenheit
else if(scaleflag==4) threshold=323; //kelvin
--------------------------------------------


Thanks!
___________________________
This message was ported from CCS's old forum
Original Post ID: 14433
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Getc() and write_eeprom() freezes 16F876
PostPosted: Tue May 13, 2003 10:17 pm     Reply with quote

:=Has anyone ever had the problem of running Getc() and write_eeprom() sequentially and then having the PIC stop running its interrupts or freeze up all together? The write operation still works, as the data is updated at reset, but for some reason it won't come out of the write completely and the functions work fine independently...any ideas?
--------------------------------------------------------

What PIC are you using and what's your compiler version ?

There was a problem with write_eeprom() and older versions
of the compiler. See this post:
<a href="http://www.pic-c.com/forum/general/posts/9420.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/9420.html</a>
___________________________
This message was ported from CCS's old forum
Original Post ID: 14435
Golgotha
Guest







Re: Getc() and write_eeprom() freezes 16F876
PostPosted: Wed May 14, 2003 8:20 am     Reply with quote

That works! Thanks, you rock!

Golgotha


:=What PIC are you using and what's your compiler version ?
:=There was a problem with write_eeprom() and older versions
:=of the compiler. See this post:
:= <a href="http://www.pic-c.com/forum/general/posts/9420.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/general/posts/9420.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/9420.html</a></a>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514453
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