Searching \ for 'Erasing' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=erasing
Search entire site for: 'Erasing'.

Truncated match.
PICList Thread
'Erasing'
1999\05\31@215134 by Tony Nixon

flavicon
picon face
Hi all,

I bookmarked this URL for erasing PIC 16F84's that so I could use the
info later, but it has dissappered. It appeared on this list a few weeks
ago.

http://www.ee.oulu.fi/~lapi/KissPIC/erasepic.html

Does anyone else have the method of bulk erasing that was posted here.

--
Best regards

Tony

PicNPoke - Multimedia 16F84 Beginners PIC Tools.

http://www.picnpoke.com
Email spam_OUTpicnpokeTakeThisOuTspamcdi.com.au

1999\05\31@221634 by Myke Predko

flavicon
face
Hi Tony,

Here is the code that I used for the "El Cheapo" programmer I wrote about a
few weeks ago on:

http://www.rentron.com

Erase()                         //  Erase the 16F84's Program Memory
{                               //   Procedure Documented in DS30262A

int  i;


 PowerUp();

 CMDWrite( 0, 0x03FFF );       //  Code Protect Defeat Code
 for ( i = 0; i < 7; i++ )
   CMDSend( 6 );
 CMDSend( 1 );
 CMDSend( 7 );
 CMDSend( 8 );
 RTCDlay();                    //  Use the Long Delay
 CMDSend( 1 );
 CMDSend( 7 );

 RTCDlay();                    //  Wait for Everything to Complete

 PowerDown();

}  //  End Erase

It was taken directly from Microchip document DS30262A.  "CMDSend" sends the
six bit command string and "CMDWrite" sends the six bit command string with
a 14 bit data word (which is shifted up by two to get a sixteen bit word
that is serially sent to the PICMicro).

Good luck,

myke

{Original Message removed}

1999\05\31@222827 by Mark Willis

flavicon
face
www.ee.oulu.fi/~lapi/ states:

"Gone: Mail .....lauri.pirttiahoKILLspamspam@spam@nokia.com for info."

 Mark, Intrigued <G>

Tony Nixon wrote:
{Quote hidden}


'Erasing'
1999\06\02@212240 by Thomas Vogels
flavicon
face
(This is another try to post this message to the piclist.  Sorry, if
it shows up twice now.)

Tony,

 the important information from that website is that Microchip's
description of the commands is, uh, wrong?  After the BULK_ERASE you
should actually send data (14 1's).  Here is a snippet of C code (if
you have read AN 589 (?), it should look familiar).

/* Check Table 2-1, DS30262B-page 5 */
#define LOAD_CONFIG     0
#define ERASE_CMD_1     1
#define LOAD_DATA       2
#define READ_DATA       4
#define INC_ADDR        6
#define BEGIN_PGM       8
#define LOAD_DATA_DM    3
#define READ_DATA_DM    5
#define ERASE_CMD_2     7
#define BULK_ERASE      9
#define BULK_ERASE_DM   11

pic16f84 (PROG_MODE, 0);

fputs ("Erasing ...", stdout);

/* Disable code protect */
pic16f84 (LOAD_CONFIG, 0x3fff);

for (i = 7; i-- > 0; ) {
   pic16f84 (INC_ADDR, 0)
}
for (i = 2; i-- > 0; ) {
   pic16f84 (ERASE_CMD_1, 0);
   pic16f84 (ERASE_CMD_2,;0)
   pic16f84 (BEGIN_PGM, 0);
}

/* Erase everything */
pic16f84 (BULK_ERASE, 0x3fff);  /* twiddle thumbs for 10ms */
pic16f84 (BEGIN_PGM, 0);        /* ... and again */
pic16f84 (RESET_MODE, 0);

pic16f84 (RESET_MODE, 0);
fputs ("\nDone.\n", stdout);


Note that BULK_ERASE has to be followed by a 10ms pause, and have I
mentioned that you must send data after the command (all ones).

Bug me if you need more info.  The above works reliably.
Thanks go to Dave Tait & Nigel Goodwin who orignally helped me with
the same problem.

 -tom

--
.....tovKILLspamspam.....ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...