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

PLEASE HELP!! Clear internal eeprom on 877

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







PLEASE HELP!! Clear internal eeprom on 877
PostPosted: Mon Mar 31, 2003 8:21 pm     Reply with quote

Stupid question!
But I can't reset the eeprom on 16f877. I made just a small program who collect a analog sgnal and AD covert it and write the hex number to eeprom. I use 10 bit AD. But when I read new max min value the old ones still stand there. What is wrong and how can I make this work??
I've tried to write 0 to the eeprom but this does not work.??

Need help!

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: PLEASE HELP!! Clear internal eeprom on 877
PostPosted: Tue Apr 01, 2003 12:55 pm     Reply with quote

:=Stupid question!
:=But I can't reset the eeprom on 16f877. I made just a small program who collect a analog sgnal and AD covert it and write the hex number to eeprom. I use 10 bit AD. But when I read new max min value the old ones still stand there. What is wrong and how can I make this work??
:=I've tried to write 0 to the eeprom but this does not work.??
-----------------------------------------------------

You didn't provide a sample program, so I made one.
It works OK with PCM vs. 3.148. The following program
has this output:

55
00

<PRE>
#include "c:\Program Files\Picc\Devices\16F877.h"
#fuses HS, NOWDT, NOPROTECT, PUT, BROWNOUT, NOLVP
#use Delay(clock=8000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
<BR>
//====================================================
void main()
{
char c;
<BR>
write_eeprom(0, 0x55); // Write 0x55 to eeprom address 0
c = read_eeprom(0); // Read it
printf("\%x\n\r", c);
<BR>
write_eeprom(0, 0); // Write 0 to eeprom address 0
c = read_eeprom(0); // Read it
printf("\%x\n\r", c);
<BR>
<BR>
while(1);
}
</PRE>
___________________________
This message was ported from CCS's old forum
Original Post ID: 13291
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