PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: PLEASE HELP!! Clear internal eeprom on 877 |
Posted: Tue Apr 01, 2003 12:55 pm |
|
|
:=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 |
|