From: manfer1984 on
Hi all>

I have some troubles with programing the 16f628A with mplab icd2

i configured all bits configured, i don't have any pull up resistor in RB6
and RB7, the voltage suply is ok for Vdd and Vpp. the dispositive pass all
the self test and the voltage have a rigth value. also i configured de
bits configured in the program like this:

__CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _MCLRE_OFF &
_CP_OFF & _LVP_OFF & _DATA_CP_OFF

I tried with two tipes of communication with usb an with serial mode but
it continue wrong.

This is the error show in my output window.

Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure
that the target device is connected and properly powered. Select "OK" to
continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x2F)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure
that the target device is connected and properly powered. Select "OK" to
continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val =
0x2820, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready

in this text there are two warnings, the one is ICDWarn0052 and i check
all my connections ande the suply voltage of the pic and all are fine.

And the second warning is ICD0161 is something for the verification part
of the icsp protocol, but i don't know what it read a cer value?

I don't what is the problem in my circuit or in the mplab icd2
configuration if anybody know something about this problem please i need
some help


From: Aly on

"manfer1984" <manolofblanco(a)hotmail.com> wrote in message
news:W96dnThs59d5OdzbnZ2dnUVZ_uKknZ2d(a)giganews.com...
> Hi all>
>
> I have some troubles with programing the 16f628A with mplab icd2
>
It should tell you what it is expecting, and what it has found.

#ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)

That warning message is from my ICD2 with nothing connected to it.

The ICD2 will report the following with no chip connected when you first
connect to the ICD2;

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

I don't really know what to tell you apart from the obvious such as having
the pins hooked up properly. It's quite foolproof. I have had similar to
you in the past and it has always been poor connections. An IC test clip is
quite handy really as it means you don't have to stress the RJ11 on the
ICD2.

Connections.


From: Steve at fivetrees on
"manfer1984" <manolofblanco(a)hotmail.com> wrote in message
news:W96dnThs59d5OdzbnZ2dnUVZ_uKknZ2d(a)giganews.com...
> Hi all>
>
> I have some troubles with programing the 16f628A with mplab icd2
>
> i configured all bits configured, i don't have any pull up resistor in RB6
> and RB7, the voltage suply is ok for Vdd and Vpp. the dispositive pass
> all
> the self test and the voltage have a rigth value. also i configured de
> bits configured in the program like this:
>
> __CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _MCLRE_OFF &
> _CP_OFF & _LVP_OFF & _DATA_CP_OFF

I don't know your device at all, but this looks odd to me - it's a series of
bit masks ANDed with one another. If you're configuring a bit field,
shouldn't you be ORing them together? (I guess it could be inverse logic...)

Possibly totally missing the point. but hey...

Steve
http://www.fivetrees.com


From: Anon on
On Wed, 09 May 2007 05:39:32 -0500, "manfer1984"
<manolofblanco(a)hotmail.com> wrote:

>Hi all>
>
>I have some troubles with programing the 16f628A with mplab icd2
>
>i configured all bits configured, i don't have any pull up resistor in RB6
>and RB7, the voltage suply is ok for Vdd and Vpp. the dispositive pass all
>the self test and the voltage have a rigth value. also i configured de
>bits configured in the program like this:
>
>__CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _MCLRE_OFF &
>_CP_OFF & _LVP_OFF & _DATA_CP_OFF
>
>I tried with two tipes of communication with usb an with serial mode but
>it continue wrong.
>
>This is the error show in my output window.
>
>Programming Target...
>ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure
>that the target device is connected and properly powered. Select "OK" to
>continue, or "CANCEL" to abort the operation
>..Validating configuration fields
>..Erasing Part
>..Programming EEPROM Memory
>..Programming Program Memory (0x0 - 0x2F)
>..Programming User IDs
>Verifying...
>ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure
>that the target device is connected and properly powered. Select "OK" to
>continue, or "CANCEL" to abort the operation
>..Program Memory
>ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val =
>0x2820, Val Read = 0x0)
>ICD0275: Programming failed.
>MPLAB ICD 2 Ready
>
>in this text there are two warnings, the one is ICDWarn0052 and i check
>all my connections ande the suply voltage of the pic and all are fine.
>
>And the second warning is ICD0161 is something for the verification part
>of the icsp protocol, but i don't know what it read a cer value?
>
>I don't what is the problem in my circuit or in the mplab icd2
>configuration if anybody know something about this problem please i need
>some help
>

might be a problem with the crystal.
Have you tried reading a chip?
Are you powering the target board from the ICD2?
From: Paul E. Schoen on

"manfer1984" <manolofblanco(a)hotmail.com> wrote in message
news:W96dnThs59d5OdzbnZ2dnUVZ_uKknZ2d(a)giganews.com...
> Hi all>
>
> I have some troubles with programing the 16f628A with mplab icd2
>
> i configured all bits configured, i don't have any pull up resistor in
> RB6
> and RB7, the voltage suply is ok for Vdd and Vpp. the dispositive pass
> all
> the self test and the voltage have a rigth value. also i configured de
> bits configured in the program like this:
>
> __CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _MCLRE_OFF &
> _CP_OFF & _LVP_OFF & _DATA_CP_OFF
>
> I tried with two tipes of communication with usb an with serial mode but
> it continue wrong.
>
> This is the error show in my output window.
>
> Programming Target...
> ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make
> sure
> that the target device is connected and properly powered. Select "OK" to
> continue, or "CANCEL" to abort the operation
> ..Validating configuration fields
> ..Erasing Part
> ..Programming EEPROM Memory
> ..Programming Program Memory (0x0 - 0x2F)
> ..Programming User IDs
> Verifying...
> ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make
> sure
> that the target device is connected and properly powered. Select "OK" to
> continue, or "CANCEL" to abort the operation
> ..Program Memory
> ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val =
> 0x2820, Val Read = 0x0)
> ICD0275: Programming failed.
> MPLAB ICD 2 Ready
>
> in this text there are two warnings, the one is ICDWarn0052 and i check
> all my connections ande the suply voltage of the pic and all are fine.
>
> And the second warning is ICD0161 is something for the verification part
> of the icsp protocol, but i don't know what it read a cer value?
>
> I don't what is the problem in my circuit or in the mplab icd2
> configuration if anybody know something about this problem please i need
> some help
>
>
I have had similar problems that were caused by improper circuitry on the
target board. It is helpful to look at the 3 active lines for clean
waveshape and voltage levels. Capacitors and pullup resistors can cause
problems. Particularly, the MCLR line pullup and capacitor (if any) should
be connected via a signal diode so the ICD2 can apply the programming
voltage (which is about 12-13 V). The other two lines are data and clock,
and they should have clean waveforms during programming and verification.
Finally, the target power supply and clock should be correct.

It is a good idea also to run the self test on the target board with the
ICD2 from MPLAB. It will show the voltages it reads.

Paul