Searching \ for '[PIC] Problems programming a 16F628A' 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/devprogs.htm?key=programming
Search entire site for: 'Problems programming a 16F628A'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Problems programming a 16F628A'
2007\07\29@170643 by Rikard Bosnjakovic

picon face
There seems to be an error in MPLAB v7.52 regarding the configuration
bits. Yesterday for another project, I programmed 16F886-devices
without problem, but today in a new project, programming 16F628A is
weird.

I'm using ICD2, compile my assembler-code without problems, select
ICD2 from the programmer menu, then "connect". The result:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC16F628A found, revision = Rev 0x8
...Reading ICD Product ID
Running ICD Self Test
...Passed

The device is found. I program the device, and get this result:

Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x8F)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Failed (and stopped)
ICD0161: Verify failed (MemType = Config, Address = 0x2007, Expected
Val = 0x3F38, Val Read = 0x3FFF)
ICD0275: Programming failed.

Then, I try programmer->connect (as I did above), and get this:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x1FF)
...Reading ICD Product ID
Running ICD Self Test
...Passed

I thought the chip in question was bad, so I tried another 16F628A.
Same behaviour, ICD2 find the chip, goes error when programming and
cannot find the chip afterwards. It looks like it's been code
protected in some way, despite I have _CP_OFF & _CP_DATA_OFF in my
__CONFIG.

Are the chips really code protected (and wasted), or what is happening here?

I tried again with a new chip, same result. I have eight 16F628A
total, but after seven chips I gave up, leaving me only one left. I
don't dare trying it as well, because this problem looks like a real
money waster. I've contacted Microchip for help but no response yet.


--
- Rikard - http://bos.hack.org/cv/

2007\07\29@171845 by Dario Greggio

face picon face
Rikard Bosnjakovic wrote:

> There seems to be an error in MPLAB v7.52 regarding the configuration
> bits. Yesterday for another project, I programmed 16F886-devices[...]

I can suggest you download latest 7.61a version.


--
Ciao, Dario

2007\07\29@173232 by Jan-Erik Soderholm

face picon face
Rikard Bosnjakovic wrote:

> There seems to be an error in MPLAB v7.52....
> ...
> I've contacted Microchip for help but no response yet.

And since the current version is 7.60/7.61
you already know the answer, not ?

Show the "error" with the latest version, *then*
call Microchip.

Regards,
Jan-Erik.

2007\07\29@174537 by Jan-Erik Soderholm

face picon face
And, it's easy enough to verify by looking into
the HEX file. Compare to what should be there
according to the datasheet, the INC file symbols
and your actual CONFIG settings in the code.

Jan-Erik.

Dario Greggio wrote:
> Rikard Bosnjakovic wrote:
>
>> There seems to be an error in MPLAB v7.52 regarding the configuration
>> bits. Yesterday for another project, I programmed 16F886-devices[...]
>
> I can suggest you download latest 7.61a version.
>
>

2007\07\29@175014 by Jinx

face picon face
> Are the chips really code protected (and wasted)

Dry those tears. A bulk erase will get them back to useable

Your problem at the moment is the programmer, not the chips,
which are probably fine

Can't help with the ICD2 BTW, sorry

2007\07\29@183704 by Rikard Bosnjakovic

picon face
On 29/07/07, Jan-Erik Soderholm <spam_OUTjan-erik.soderholmTakeThisOuTspamtelia.com> wrote:

> And since the current version is 7.60/7.61
> you already know the answer, not ?

Yep, the problem exists in v7.60 as well.


--
- Rikard - http://bos.hack.org/cv/

2007\07\29@214206 by Thilo Klein

flavicon
face
Dear Rikard,

    in which business are you in that you use a different controller
    everyday - and even finish a project everyday ?

    I can tell from my experiences that with my exprogrammer, a quick
    and dirty one, 16f628 worked but 16f628a did not. There was a
    verification error aswell. I found that no data was written to it
    at all.

    Having assembled and soldered my new programmer, it worked
    immediately.

    And normally, the pics are not damaged. Buy a programmer suitable
    for this special controller and the problem is gone.

    Or

    Develop your own. I finally gave this approach up and bought one.
    I prefer to focus on programming and the final device instead of
    programming a program that runs a programmer to program my
    program which might be programmed indirectly by a remote control
    program ...

    TK

{Quote hidden}

2007\07\29@230023 by Jinx

face picon face
> in which business are you in that you use a different controller
> everyday - and even finish a project everyday ?

When several projects are in development it's more than likely that
each uses a different PIC. I'm working on a project now that uses a
12F675, an 18F4550 and a bunch of 18F1320s. I'm sure if I tried
I could work some 10Fs in there as well

> And normally, the pics are not damaged. Buy a programmer suitable
> for this special controller and the problem is gone

ICD2 *IS* suitable for the 628A



'[PIC] Problems programming a 16F628A'
2007\08\01@174731 by alan smith
picon face
I've seen this before...maybe not exactly the same error but similar.  Usually for me, it has to do with wonderful windows and usb drivers.  If im in the debugger, I'll go select the programmer mode for ICD, and then back to the debugger and the issue will usually go away.  Sometimes if the USB port goes to sleep (laptop goes to sleep) it wakes up and can't find the port as well...which means a reboot.  But try the swap between debugger and programmer.  I'll pay more attention to what I do and the exact error when I see it, but it does sound familiar.  Oh...this isnt using the same device, but I've seen it on just about every device ive worked with and just assumed it was a USB port thing with MPLAB.

Rikard Bosnjakovic <.....rikard.bosnjakovicKILLspamspam@spam@gmail.com> wrote:  On 29/07/07, Jan-Erik Soderholm wrote:

> And since the current version is 7.60/7.61
> you already know the answer, not ?

Yep, the problem exists in v7.60 as well.


--
- Rikard - http://bos.hack.org/cv/

2007\08\02@030108 by Rikard Bosnjakovic

picon face
On 01/08/07, alan smith <micro_eng2spamKILLspamyahoo.com> wrote:
> If im in the debugger, I'll go select the programmer mode for ICD, and then back to the debugger and the issue will usually go away.

By debugger mode, do you mean the menu selection Programmer->Select
programmer->None?

I tried switching between None and ICD2 a couple of times, but the
programmed chips won't be recognized. I have never used the ICD2 in
debug-mode in a "live" circuit.


--
- Rikard - http://bos.hack.org/cv/

2007\08\02@053217 by Jan-Erik Soderholm

face picon face
You have the special ICD2 header with
the special PIC16F648A-ICD version ?

Jan-Erik.

Rikard Bosnjakovic wrote:

> I have never used the ICD2 in
> debug-mode in a "live" circuit.

2007\08\02@122033 by Rikard Bosnjakovic

picon face
On 02/08/07, Jan-Erik Soderholm <.....jan-erik.soderholmKILLspamspam.....telia.com> wrote:

> You have the special ICD2 header with
> the special PIC16F648A-ICD version ?

No. That header is only needed for debugging (according to both
Microchip support and DS51292N). But now when I was reading the
document a bit more carefully, I just happened to find this that may
be of relevance:

"If PIC16F627A or PIC16F628A devices are selected for MPLAB ICD 2
development in MPLAB IDE, the warning "ICDWarn0020: Invalid target
device id" may be received in the build window and as a dialog. The
reason is the PIC16F648A-ICD device supports PIC16F648A, PIC16F627A
and PIC16F628A, but only reports the device ID for the PIC16F648A.
Ignore this warning or disable it under the Warnings tab on the ICD
programming dialog."

So the chip may actually have been programmed. Weird.


--
- Rikard - http://bos.hack.org/cv/

2007\08\02@144551 by wouter van ooijen

face picon face
> But now when I was
> reading the document a bit more carefully, I just happened to
> find this that may be of relevance:

As I understand it that warning is only about using the special debug
chip/board, not for using a "bare" chip.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\08\03@112935 by alan smith

picon face
OK, this morning I came across a similar issue.  I don't have a resonable explanation but...I was driving into T1CLK from a freq generator, 250Hz or so.  On this device its on PORTC, so it doesnt have anything to do with the programming pins...but.....it caused a similar issue where it failed programming. Disconnected the generator and it programmed fine.  So, maybe...your issue might be related.  Are you by chance driving anything externally?

Jinx <EraseMEjoecolquittspam_OUTspamTakeThisOuTclear.net.nz> wrote:  > in which business are you in that you use a different controller
> everyday - and even finish a project everyday ?

When several projects are in development it's more than likely that
each uses a different PIC. I'm working on a project now that uses a
12F675, an 18F4550 and a bunch of 18F1320s. I'm sure if I tried
I could work some 10Fs in there as well

> And normally, the pics are not damaged. Buy a programmer suitable
> for this special controller and the problem is gone

ICD2 *IS* suitable for the 628A


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