View previous topic :: View next topic |
Author |
Message |
Golgotha Guest
|
Getc() and write_eeprom() freezes 16F876 |
Posted: Tue May 13, 2003 9:30 pm |
|
|
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
|
Re: Getc() and write_eeprom() freezes 16F876 |
Posted: Tue May 13, 2003 10:17 pm |
|
|
:=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 |
Posted: Wed May 14, 2003 8:20 am |
|
|
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 |
|
|
|