Searching \ for '16F84 "Bulk" erase problems.' 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/devices.htm?key=16F
Search entire site for: '16F84 "Bulk" erase problems.'.

Truncated match.
PICList Thread
'16F84 "Bulk" erase problems.'
1998\03\15@175058 by mjb

flavicon
face
I've built my own programmer (a serial programmer for both the EPROM
and Flash parts) and it programs great.  I'm having problems with the
"bulk" erasing of the program and data areas.  My first problem is
ambiguity in the data sheet.  In the data sheet it reads:

Bulk Erase Program Memory
To perform a bulk erase of the program memory, the following
sequence must be performed.
1. Do a "Load Data All 1's" command.
2. Do a "Bulk Erase User Memory" command.
3. Do a "Begin Programming" command.
4. Wait 10 ms to complete bulk erase.

But there are two "load data" commands, one for "load data for program
memory", (000010) and the other, "load data for data memory" (000011).
Ok, I assumed that if I was erasing  the program area, I'd use "load
data for program memory", and similarly for the data area.  Sounds
logical to me, but... it doesn't work.

It *does* seem to erase the memory location that I'm currently at,
in either the program or the data area, but I was under the impression
that a "bulk" erase would erase *all* of the respective memory locations
(data or program).

So, does the "bulk erase" erase one or all memory locations, and
if it does erase them all, how do you actually do it?  Have you
made the procedure in the data sheet actually work?

If you're the one who helps me solve this problem, I'll treat you
to your favorite coffee/tea/soda/beer the next time you are in
the Washington, D.C. area!

Matt


-----------------------------
Matt Bennett                |
spam_OUTmjbTakeThisOuTspamhazmat.com              |
http://www.hazmat.com/~mjb/ |

1998\03\15@193154 by Tomi J Virtanen

flavicon
face
At 17:46 15-03-98 -0500, Matt Bennett wrote:
>I've built my own programmer (a serial programmer for both the EPROM
>and Flash parts) and it programs great.  I'm having problems with the
>"bulk" erasing of the program and data areas.  My first problem is
>ambiguity in the data sheet.  In the data sheet it reads:
>

I have also recently made my own serial programmer for mid-range PICs.
I also encountered the same bulk erase problem with the 16F84/16C84.
Otherwise my programmer works fine.
If anyone knows how to make the bulk erase to work, please tell me too!

I tried the following:
1.      load data all '1's      (000010b, 0b, 11111111111111b, 0b)
2.      bulk erase pgm mem      (001001b)
3.      begin programming       (001000b)
4.      I waited 10ms before doing anything else to it..

But no bulk erase happens...

--Tomi Virtanen
 .....tjvirtanKILLspamspam@spam@cc.helsinki.fi

1998\03\16@065737 by Caisson

flavicon
face
{Quote hidden}

Correct that : Your _overwriting_ the current memory location.
(Just change step #1's data and observe the result ...)

> in either the program or the data area, but I was under the impression
> that a "bulk" erase would erase *all* of the respective memory locations
> (data or program).

Don't correct that ;-)  That's what it's supposed to do !
>
> So, does the "bulk erase" erase one or all memory locations, and
> if it does erase them all, how do you actually do it?  Have you
> made the procedure in the data sheet actually work?

I've had the same problem with a 16C84 and contacted my supplier, and
still have no answer (after 4-and-a-half months).  But ... Fiddeling around
(and reading this mailing-list) I've found the solution to _my_ problem:
just swap step 2 & 3.

If that doesn't work, add another 'Begin programming' after the
'Bulk-erase'
command.

> If you're the one who helps me solve this problem, I'll treat you
> to your favorite coffee/tea/soda/beer the next time you are in
> the Washington, D.C. area!

Thanks! I'll keep that in mind.
> Matt
>
> EraseMEmjbspam_OUTspamTakeThisOuThazmat.com              |
> http://www.hazmat.com/~mjb/ |

Greetz,
  Rudy Wieser

1998\03\16@092125 by David Tait

flavicon
picon face
Tomi Virtanen wrote:
> I tried the following:
> 1.      load data all '1's      (000010b, 0b, 11111111111111b, 0b)
> 2.      bulk erase pgm mem      (001001b)
> 3.      begin programming       (001000b)
> 4.      I waited 10ms before doing anything else to it..
>
> But no bulk erase happens...

Close.  It seems the bulk erase commands work like the load data
commands and need data.  Here's what I do:

1. send 001001                 bulk erase program memory
2. send 0111111111111110       all 1s data (padded with 0s)
3. send 001000                 begin programming
4. delay 10ms

With a similar sequence for bulk erase data memory.

By the way, the C source code of my own programmer software is
contained in:

http://www.man.ac.uk/~mbhstdj/files/pic84v04.zip

David

1998\03\17@034851 by Lauri Pirttiaho

flavicon
face
David wrote:
:It seems the bulk erase commands work like the load data
:commands and need data.  Here's what I do:
:
:1. send 001001                 bulk erase program memory
:2. send 0111111111111110       all 1s data (padded with 0s)
:3. send 001000                 begin programming
:4. delay 10ms
:
:With a similar sequence for bulk erase data memory.

Or the other sequence that came up earlier (and which I have
tested to work properly).

To erase the program memory:
1. Send 000010 011111111111110  "load program all ones"
2. Send 001000                  "begin programming"
3. Send 001001                  "bulk erase program memory"
4. Send 001000                  "begin programming"
5. Wait for 10ms or more.

To erase the data memory change above:
1. Send 000011 011111111111110  "load data all ones"
3. Send 001011                  "bulk erase data memory"

If you do the bulk erase program while in the test memory
also the ID's will be erased. In addition, if the code
protection is on also the configuration will be erased.

I don't know what the guys at Microchip actually intended
the erase procedure to be, they have not answered my questions.
Anyway, the document on programming the 16F8X (DS30262A)
gives the sequence I show abvove, without step 2. As to
David's sequence, the doc says bulk erase command does not
take data, but maybe it does as you can conclude from the
fact that David's code works.

Had I a PC, a logic analyzer and a PicStart+ I would check what
procedure Microchip uses for the bulk erase.

-- Lauri

---
<a href="http://www.ee.oulu.fi/~lapi/">For more info.</a>

1998\03\17@034917 by Nigel Goodwin
flavicon
picon face
In message <199803152246.RAA23663spamspam_OUTscdh-99.umd.edu>, Matt Bennett
<@spam@mjbKILLspamspamSCDH-99.UMD.EDU> writes
>I've built my own programmer (a serial programmer for both the EPROM
>and Flash parts) and it programs great.  I'm having problems with the
>"bulk" erasing of the program and data areas.  My first problem is
>ambiguity in the data sheet.  In the data sheet it reads:

I could never get it to work either, eventually someone advised me to
add an extra "Begin Programming" command.

>Bulk Erase Program Memory
>To perform a bulk erase of the program memory, the following
>sequence must be performed.
>1. Do a "Load Data All 1's" command.

* add "Begin Programming" command here. *

{Quote hidden}

Here is the EraseAll prodcedure used in both my DOS(TP7.0) and
Windows(Delphi 1.0 and 3.0) software

Procedure EraseAll;
Var
 i : Byte;
Begin
 {Clear Protect fuse}
 ProgMode(POn);
 Command(LdConf);
 OutWord($3FFF);
 FOR i := 0 TO 6 Do
   Command(IncAdd);
 Command(1);
 Command(7);
 Command(BegPrg);
 Delay(PgmCfg[Current].Settings[DelayTime]);
 Command(1);
 Command(7);
 Command(BegPrg);
 Delay(PgmCfg[Current].Settings[DelayTime]);
 ProgMode(POff);

 {Clear Data memory}
 ProgMode(POn);
 Command(LdData);
 OutWord($3FFF);
 Command(BegPrg);
 Command(ErsDat);
 Command(BegPrg);
 Delay(PgmCfg[Current].Settings[DelayTime]);
 ProgMode(POff);

 {Clear Prog memory}
 ProgMode(POn);
 Command(LdProg);
 OutWord($3FFF);
 Command(BegPrg);
 Command(ErsPrg);
 Command(BegPrg);
 Delay(PgmCfg[Current].Settings[DelayTime]);
 ProgMode(POff);
End;

>If you're the one who helps me solve this problem, I'll treat you
>to your favorite coffee/tea/soda/beer the next time you are in
>the Washington, D.C. area!

That's not a great offer!, I'm not very likely to get across there :-).
--

Nigel.

       /--------------------------------------------------------------\
       | Nigel Goodwin   | Internet : KILLspamnigelgKILLspamspamlpilsley.demon.co.uk     |
       | Lower Pilsley   | Web Page : http://www.lpilsley.demon.co.uk |
       | Chesterfield    |                                            |
       | England         |                                            |
       \--------------------------------------------------------------/

1998\03\17@081131 by Matthew J. Bennett

flavicon
face
I have to agree with Lauri Pirttiaho about David Tait's technique of
sending data after the "bulk erase" command, it works. to paraphrase from
David's email:

>1. send 001001                 bulk erase program memory
>2. send 0111111111111110       all 1s data (padded with 0s)
>3. send 001000                 begin programming
>4. delay 10ms

This worked for me, and replacing the command in step one with the command
for "bulk erase data memory" also worked to erase the data memory.  Now the
"flash" part of my programmer works great.  On the other hand...  I'm still
having problems with the EPROM.  Are there errors in the EPROM algorithm too?

Matt

-----------------------------
Matt Bennett                |
RemoveMEmjbTakeThisOuTspamhazmat.com              |
http://www.hazmat.com/~mjb/ |

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