Searching \ for '[PIC]: Bulk Erase' 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=pic
Search entire site for: 'Bulk Erase'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Bulk Erase'
2002\12\18@110602 by Christopher Dusch

flavicon
face
Hi,

I'm new to the PICList.  I am currently employed with an efficiency
engineering firm in Tempe, Arizona.  Recently I was assigned the task of
redesigning our line of photovoltaic charge controllers to implement the
PICMicro.  To do this successfully I will have to become an expert at the
PIC very quickly.  My background is in Materials Science and Engineering,
though I have a fair amount of experience in microelectronics and computer
Programming.  Despite this, I lack any experience with Assembly coding or
microcontroller application.

My initial experimentation with the PIC16F84 includes building an El Cheapo
programmer, which works, and some small, simple LED and LCD circuits to test
my programs.  My problem, however, is that I am unable to perform a BULK
ERASE operation.
My lack of assembly experience and the esoteric instructions in the
programming
datasheet are holding up further development so I turn to the PICList for
support.  Can someone please, in plain
English and Assembly explain how to perform a BULK ERASE on a PIC16F84(A).
I would really appreciate it.

Thanks!

Chris Dusch
Tempe, Arizona

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@115816 by Dale Botkin

flavicon
face
Might I respectfully suggest that, since this is a commercial environment,
you get a good quality commercial programmer (Picstart+, Warp-13, EPIC,
whatever) and look at more modern PICs than the 16F84.  16F87x or the
PIC18 family.  Less than a day of your time messing with it will pay for
the hardware.

While I think learning Assembler would be a good idea to get intimately
familiar with the PIC architecture and all, I'd also suggest a C compiler
will probably produce much better results for you much more quickly, since
you're not already an assembler kind of guy.

Just a couple suggestions.

Dale
---
We are Dyslexia of Borg.
Fusistance is retile.
Your ass will be laminated.

On Wed, 18 Dec 2002, Christopher Dusch wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@150628 by Wouter van Ooijen

face picon face
>  Can someone please, in plain
> English and Assembly explain how to perform a BULK ERASE on a
> PIC16F84(A).

The firmware for my Wisp628 programmer http://www.voti.nl/wisp628
contains the 'secret' sequence. Alas, the firmware is written in Jal,
not in English...

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@150633 by Wouter van Ooijen

face picon face
> Might I respectfully suggest that, since this is a commercial
> environment, you get a good quality commercial programmer

and maybe read http://www.voti.nl/swp ?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@162350 by Christopher Dusch

flavicon
face
The BULK ERASE routine should be the same for all 16F8x PICs, right?

A commercial programmer will eliminate my problem, but will also eliminate
the possibility for designing a custom programmer (which we plan to do)
because we will still not be able to erase the PIC.  I hope I'm making
myself clear.

Chris

On 12/18/02 9:57 AM, "Dale Botkin" <spam_OUTdaleTakeThisOuTspamBOTKIN.ORG> wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@164038 by Dale Botkin

flavicon
face
Ah.  You only mentioned redesigning a line of PV charge controllers, which
is why I did not assume you wanted to build a custom programmer.  The two
do not seem to be implicitly connected.  For a custom programmer, I
believe there are complete programming specifications on the Microchip web
site, if you haven't seen them yet:

http://www.microchip.com/1010/suppdoc/specs/index.htm

Dale
---
We are Dyslexia of Borg.
Fusistance is retile.
Your ass will be laminated.

On Wed, 18 Dec 2002, Christopher Dusch wrote:

> The BULK ERASE routine should be the same for all 16F8x PICs, right?
>
> A commercial programmer will eliminate my problem, but will also eliminate
> the possibility for designing a custom programmer (which we plan to do)
> because we will still not be able to erase the PIC.  I hope I'm making
> myself clear.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@174016 by Mike Singer

picon face
Christopher Dusch wrote:
> ...  Can someone please, in plain English and Assembly
> explain how to perform a BULK ERASE on a PIC16F84(A)...

BULK ERASE what: PROGRAMM or DATA MEMORY?

Anyway, have look at 30277C.pdf (ICSP guide)
SECTION 3, PROGRAMMING SPECIFICATIONS,
In-Circuit Serial Programming for PIC16F8X FLASH MCUs,
2.3.1.9 BULK ERASE PROGRAMM MEMORY
2.3.1.9 BULK ERASE DATA MEMORY

The text is in plain English.

Could you explain why you choose 16F84?
Have not enough money for 18F242?
Hmm, 18F242 is cheaper then 16F84.

  Mike.
(F18 vs F16 mortal combat leitmotiv)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@174433 by Christopher Dusch

flavicon
face
Right, I have the programming specs from Microchip, but they obviously were
not designed for the beginner.


On 12/18/02 2:40 PM, "Dale Botkin" <.....daleKILLspamspam@spam@BOTKIN.ORG> wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@183809 by Gordon Niessen

flavicon
face
Why exactly are you needing to built your own "custom" programmer.  Rather
then use one of the far to many already available?

At 04:35 PM 12/18/2002, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@210641 by Kevin Timmerman

flavicon
face
This works with the 16F84 and a few other flash parts.

// --- This will erase all program and config flash memory in the part
// Execute Load Config command
WriteCommand(g_pChip->cmdLoadConfig);
WriteData(0x7FFE);

// Inc to config word location (0x2007)
for(int i=0;i<7;i++) WriteCommand(g_pChip->cmdIncAddress);

// Execute Erase Setup 1
WriteCommand(g_pChip->cmdBulkEraseSetup1);
// Execute Erase Setup 2
WriteCommand(g_pChip->cmdBulkEraseSetup2);
// Execute Begin Programming command
WriteCommand(g_pChip->cmdBeginEraseProgrammingCycle);

// Wait
Sleep(10);

// Execute Erase Setup 1
WriteCommand(g_pChip->cmdBulkEraseSetup1);
// Execute Erase Setup 2
WriteCommand(g_pChip->cmdBulkEraseSetup2);



// --- Erase data memory
// Execute Load Config command
WriteCommand(g_pChip->cmdLoadDataForDataMemory);
WriteData(0x7FFE);

// Execute Erase Setup 1
WriteCommand(g_pChip->cmdBulkEraseSetup1);
// Execute Erase Setup 2
WriteCommand(g_pChip->cmdBulkEraseSetup2);
// Execute Begin Programming command
WriteCommand(g_pChip->cmdBeginEraseProgrammingCycle);

// Wait
Sleep(10);

// Execute Erase Setup 1
WriteCommand(g_pChip->cmdBulkEraseSetup1);
// Execute Erase Setup 2
WriteCommand(g_pChip->cmdBulkEraseSetup2);



// Commands for 16F84
0x00,   // Load Configuration
0x06,   // Increment Address
0x01,   // Bulk Erase Setup 1
0x07    // Bulk Erase Setup 2
0x08,   // Begin Erase Programming Cycle
0x02,   // Load Data for Program Memory

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\18@234135 by Tony Nixon

flavicon
picon face
Be good if they just had...

EraseChip


Kevin Timmerman wrote:
{Quote hidden}

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
.....salesKILLspamspam.....bubblesoftonline.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\12\19@052504 by Wouter van Ooijen

face picon face
> Right, I have the programming specs from Microchip, but they
> obviously were not designed for the beginner.

I think they are rather clear, but for the 16x84 the erase is not
correctly documented. As I said: check the code of my programmer (or any
other freely available programmer code) for the correct sequence. Or
search the piclits archive, this question is posed & answered
approximately each 6 months, seems to be indicate the number of people
that attempt to design their own programmer.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@112405 by Christopher Dusch

flavicon
face
We're efficiency engineers, we redesign everything

On 12/18/02 4:36 PM, "Gordon Niessen" <EraseMEgordonspam_OUTspamTakeThisOuTGNIESSEN.COM> wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@112619 by Christopher Dusch

flavicon
face
No kidding!

On 12/18/02 9:39 PM, "Tony Nixon" <@spam@tony.nixonKILLspamspamENG.MONASH.EDU.AU> wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@113835 by Kevin Timmerman

flavicon
face
They do...

0x09 Bulk Erase Program Memory
0x0B Bulk Erase Data Memory

But they only work on a few of the newer parts.


At 03:39 PM 12/19/02 +1100, you wrote:
>Be good if they just had...
>
>EraseChip

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@114909 by Wouter van Ooijen

face picon face
> We're efficiency engineers, we redesign everything

And you use 16F84's? Take a look at the 16F628 (and maybe even the
16F630).

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@134256 by Christopher Dusch

flavicon
face
Which parts?

On 12/19/02 9:38 AM, "Kevin Timmerman" <RemoveMElistsTakeThisOuTspamPCMX.NET> wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@134302 by Christopher Dusch

flavicon
face
Good idea, thanks!

On 12/19/02 9:47 AM, "Wouter van Ooijen" <spamBeGonewouterspamBeGonespamVOTI.NL> wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\19@170601 by Tony Nixon

flavicon
picon face
Christopher Dusch wrote:
>
> Which parts?
>
> On 12/19/02 9:38 AM, "Kevin Timmerman" <TakeThisOuTlistsEraseMEspamspam_OUTPCMX.NET> wrote:
>
> > They do...
> >
> > 0x09 Bulk Erase Program Memory
> > 0x0B Bulk Erase Data Memory
> >
> > But they only work on a few of the newer parts.

These are some examples of single erase commands....

16F87xA, 16F7x, 16F62xA

12Fxx, but remember to save OSCAL and BG

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
RemoveMEsalesspamTakeThisOuTbubblesoftonline.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2002\12\20@124202 by Peter L. Peres

picon face
On Thu, 19 Dec 2002, Christopher Dusch wrote:

*>No kidding!

Actually it would not be so good. Several flash and memory products from
other manufacturers had 'self erase' problems in the field afaik, due to
too simple erase and write commands. PICs never suffered of this. At a
price ...

Peter

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

2002\12\20@161343 by Wouter van Ooijen

face picon face
> 12Fxx, but remember to save OSCAL and BG

And who can tell me what those BG bits are for?
- there is no mentioning of 'bandgat' anywhere in the datasheet
- the 12F has no 'absolute' internal voltage reference (only Vcc-derived
references)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

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

2002\12\20@170159 by Spehro Pefhany

picon face
At 10:13 PM 12/20/02 +0100, you wrote:
> > 12Fxx, but remember to save OSCAL and BG
>
>And who can tell me what those BG bits are for?
>- there is no mentioning of 'bandgat' anywhere in the datasheet
>- the 12F has no 'absolute' internal voltage reference (only Vcc-derived
>references)

It does have one "absolute" voltage reference- for the BOD- and note that
it's a fairly tight spec on those devices (+/-50mV compared to +/-300mV
on some other devices). Just a WAG.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffEraseMEspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

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

2002\12\21@042405 by Wouter van Ooijen

face picon face
> It does have one "absolute" voltage reference- for the BOD- and note
that it's a fairly tight spec on those devices (+/-50mV compared to
+/-300mV on some other devices). Just a WAG.

But the best suggestion I have seen so far.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

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

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