Searching \ for '[PIC]: Bulk Erase Program & Data Memory commands' 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/microchip/memory.htm?key=data
Search entire site for: 'Bulk Erase Program & Data Memory commands'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Bulk Erase Program & Data Memory commands'
2001\02\23@025831 by Andrei B.

picon face
> Procedure EraseAll;
> Var
>   i : Byte;
> Begin
>   {Clear Protect fuse}
>   ProgMode(POn);
>   Command(LdConf);
>   OutWord($3FFF); {value to reset memory to}
>   FOR i := 0 TO 6 Do
>     Command(IncAdd);
>   Command(1);
>   Command(7);
>   Command(BegPrg);
>   Delay(ProgDelayTime);
>   Command(1);
>   Command(7);
>   ProgMode(POff);

Here you do a "Load Configuration Word" without incrementing to
address $2007? This is how I understood it from the datasheet. My
programmer when writing the configuration word increments to $2007 and
writes it with LoadConfig, then reads it back correctly.

The one thing I've been unable to do is to read address $2006 where
suposedly is the Device ID as specified in the EEPROM programming
specs. However, I read $0000 there...

Looks like I'll have to modify my Command() routine, because it only
accepts the commands described in table 2-1 in the specs.

{Quote hidden}

Thank you for your answer and I'll try it as soon as I get home.


=====
ing. Andrei Boros
Centrul pt. Tehnologia Informatiei
Societatea Romana de Radiodifuziune

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\23@172459 by Nigel Goodwin

flavicon
face
In message <spam_OUT20010223075858.34632.qmailTakeThisOuTspamweb10807.mail.yahoo.com>, Andrei
B. <.....andrixnetKILLspamspam@spam@YAHOO.COM> writes
> Here you do a "Load Configuration Word" without incrementing to
>address $2007? This is how I understood it from the datasheet. My
>programmer when writing the configuration word increments to $2007 and
>writes it with LoadConfig, then reads it back correctly.

Basically it works, after lots of changes and help from the PICList, so
I'm happy to use it :-). The datasheet is wrong in many respects, so you
have to 'suck it and see'.
--

Nigel.

       /--------------------------------------------------------------\
       | Nigel Goodwin   | Internet : nigelgspamKILLspamlpilsley.co.uk           |
       | Lower Pilsley   | Web Page : http://www.lpilsley.co.uk       |
       | Chesterfield    | Official site for Shin Ki and New Spirit   |
       | England         |                 Ju Jitsu                   |
       \--------------------------------------------------------------/

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\23@175056 by Mike Mansheim

flavicon
face
>Basically it works, after lots of changes and help from the PICList, so
>I'm happy to use it :-). The datasheet is wrong in many respects, so you
>have to 'suck it and see'.

Just curious:  does this discussion of the datasheet being wrong for
the bulk erase command sequence apply only to the F84?  Or are the
specs for the F87x's also wrong?

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\23@180258 by Byron A Jeff

face picon face
>
> >Basically it works, after lots of changes and help from the PICList, so
> >I'm happy to use it :-). The datasheet is wrong in many respects, so you
> >have to 'suck it and see'.
>
> Just curious:  does this discussion of the datasheet being wrong for
> the bulk erase command sequence apply only to the F84?  Or are the
> specs for the F87x's also wrong?

The bulk erase algorithm specified in the 16F87X programming specification
document works as advertised. I integrated into Brian Lane's picprg 2.2 for
Linux.

I currently have on my short list building a cloner/programmer for Wouter's
wloader firmware so that a wloaded chip can clone itself. I plan to use the
same algorithm since it worked in the picprg 2.2.

BAJ

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\23@181134 by Dan Larson

flavicon
face
I just had a thought on this "bulk erase" stuff...

What would happen if you removed power to the device before it had
a chance to finish erasing all locations ? Would it be possible to
get the code protect fuse erased without completely erasing all
program locations ?

It was two years ago when I updated my programmer software for the
new flash parts and I remember screwing around with it to get it to
work. IIRC, the 16F84 algorithm needed tweaking to work with the new
parts. The double "BEGIN_PROGRAMMING" commands just don't make sense,
but they *are* needed.

Yes, the datasheet is very cryptic, but you *can* sort of interpret
it in a strange way to be correct. IMHO, they purposely obfuscate the
bulk erase command, since the interpretation for the 16f87x bulk erase
was still not straight forward. Perhaps it *is* possible to get a partial
erase and reveal protected code. It might be one explanation as to why
the datasheet appears to be "wrong". Maybe I'm way off on this too. Like
I said, it was 2 years ago that I worked on this....

Dan

On Fri, 23 Feb 2001 16:44:36 -0600, Mike Mansheim wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\24@021639 by Nigel Goodwin

flavicon
face
In message <.....OF0ED49EF3.E28420CB-ON862569FC.007CBA88KILLspamspam.....graco.com>, Mike
Mansheim <EraseMEMichael_J_Mansheimspam_OUTspamTakeThisOuTGRACO.COM> writes
>>Basically it works, after lots of changes and help from the PICList, so
>>I'm happy to use it :-). The datasheet is wrong in many respects, so you
>>have to 'suck it and see'.
>
>Just curious:  does this discussion of the datasheet being wrong for
>the bulk erase command sequence apply only to the F84?  Or are the
>specs for the F87x's also wrong?

I can't say I ever really paid much attention, the routine I posted
works for the F87x's as well, and the spec sheet didn't seem to make a
great deal of sense (as usual).
--

Nigel.

       /--------------------------------------------------------------\
       | Nigel Goodwin   | Internet : nigelgspamspam_OUTlpilsley.co.uk           |
       | Lower Pilsley   | Web Page : http://www.lpilsley.co.uk       |
       | Chesterfield    | Official site for Shin Ki and New Spirit   |
       | England         |                 Ju Jitsu                   |
       \--------------------------------------------------------------/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


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