Searching \ for '[PIC] IS this faulty?' 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: 'IS this faulty?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] IS this faulty?'
2011\11\04@082334 by jana1972

flavicon
face
I bought PIC16f648A - ICD header.But when I try to check its function, from MPLAB IDE V8.80,
during testing from menu

Debugger - Settings - ICD3 Settings - Status

and here I push the Run ICD 3 Test Interface  button

I receive

ICD3Err0063: Test interface PGC clock line write failure.
Please ensure that the tester is properly connected.
Test interface PGD data line write not tested.
Test interface PGC clock line read not tested.
Test interface PGD data line read not tested.
Test interface LVP control line not tested.
Test interface MCLR level not tested.
ICD3Err0057: Interface test could not be completed. Please contact your local FAE/CAE to SAR the unit.

Is it the problem of PIC16f648A - ICD header?

If I test another header that was supplied with ICD3 , it works OK

Thanks for help
L

2011\11\04@111553 by Dwayne Reid

flavicon
face
At 06:23 AM 11/4/2011, spam_OUTjana1972TakeThisOuTspamcentrum.cz wrote:
{Quote hidden}

As far as I know, the test function works ONLY with the little test adapter that was supplied with the ICD3.  This function exists so that you can verify that the pin drivers are working properly on the ICD3.

One of the common problems with debugging is that when something doesn't work, you don't know what the problem is.  It might be something haywire in the test circuit ** OR ** it might be a problem with the debugger.  Microchip listened to the problems that happen in the field and provided a method for you to test the debugger and make sure that it is working properly.

dwayne

-- Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2011\11\04@121418 by jana1972

flavicon
face
Hi Dwayne,
Thank you for your reply.My problem was that I could not debug my code .( so I tested the function of the header)
The code is here



       LIST P=P16F628A, R=DEC    ; Use the PIC16F628 and decimal system
       #include "P16F628A.INC"  ; Include header file        __CONFIG _CP_OFF & DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_OFF & _XT_OSC                  org 0
               bcf        STATUS,RP1
               bsf STATUS,RP0                
                       movlw 0x0C          
               END


I tried to program ( from Debuger menu and a choice Program)

I could see output Programming...
Programming/Verify complete

but when I tried to debug I got


ICD3Err0040: The target device is not ready for debugging.Please check your configuration bit settings and programthe device before proceeding.Stepping target failed

Can you see any problem with the code?
Thanks

Lad.



{Quote hidden}

> -

2011\11\04@122414 by jim

flavicon
face

Do you have debug mode chosen?


Regards,

Jim

{Quote hidden}

> > --

2011\11\04@134901 by jana1972

flavicon
face
Jim,
Thank you for your reply.
>  Do you have debug mode chosen?

Do you mean a Debug or Release mode from the Drop-down list in the icons line below the menu?
If so, YES, I have the  Debug mode when building project.
But yet, debugging does NOT work

L.

>
>  Do you have debug mode chosen?
>
>
> Regards,
>
> Jim
>
> > ---{Original Message removed}

2011\11\04@201556 by Oli Glaser

flavicon
face
On 04/11/2011 17:48, RemoveMEjana1972TakeThisOuTspamcentrum.cz wrote:
> Jim,
> Thank you for your reply.
>>   Do you have debug mode chosen?
> Do you mean a Debug or Release mode from the Drop-down list in the icons line below the
> menu?
> If so, YES, I have the  Debug mode when building project.
> But yet, debugging does NOT work
>
>

Check your oscillator is working (I noticed you are using XT mode, check with scope or try the internal RC if present)
I have had this problem a few times, and one of them was the primary oscillator being faulty on my chip (switched to internal RC and it worked)
Also, have you got MCLR pulled up to Vdd

2011\11\05@034729 by jana1972

flavicon
face
Oli Glaser ,
Thank you for your reply.
The microchip I used was PIC16f648A - ICD because I needed to debug
PIC16F628A .
In the Select Device menu ( in MPLAB IDE) I chose
PIC16F628A


>Check your oscillator is working (I noticed you are using XT mode, check
> with scope
I used external oscilator.

>or try the internal RC if present)
I think PIC16F628A  should have an internal oscillator, but can you please let me know how to set up the bits in the Config for that internal oscillator?



> Also, have you got MCLR pulled up to Vdd?
I used ICD3 to power up the PIC16f648A - ICD directly.Or do you think I must  connect   Vdd to MCLR too?

Thanks for help
L.



{Quote hidden}

> -

2011\11\05@045156 by Nicola Perotto

picon face
Hi,
to support you we need more complete and organized information!
Please send a schematic of your circuit...
      N

2011\11\05@060253 by jana1972

flavicon
face
Nicola Perotto ,
Thank you for your reply.
My schematic is very simple.

Just header with PIC16f648A - ICD and external oscillator connected together on breadboard.

The header with PIC16f648A - ICD is  connected to ICD3 and powered from ICD3 directly.

I found out that
PIC16f648A - ICD has pins 1-9 compatible with the PIC16f648A  and  20-28 pins of
  PIC16f648A -ICD should be the same as pins  10-18 of PIC16f648A.

PIC16F648A has pin 15 (RA6)and 16(RA7) for the CLKOUT and CLKIN respectively, so I connected external oscilator to pins 25 and 26 of PIC16f648A - ICD that should be pins of 15 and 16 of PIC16f648A Here it is my very simple program that I tried to debug( after compilling and programming)
(I think that P16F628A =P16F648A)




       LIST P=P16F628A, R=DEC    ; Use the PIC16F628 and decimal system
       #include "P16F628A.INC"  ; Include header file        __CONFIG _CP_OFF & DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_OFF & _XT_OSC                  org 0
               bcf        STATUS,RP1
               bsf STATUS,RP0                ;bank1
                       movlw 0x0C          
               END


But I receive an error

ICD3Err0040: The target device is not ready for debugging.Please check your configuration bit settings and programthe device before proceeding.Stepping target failed

Can anyone help?
Thanks

L.




> Hi,
> to support you we need more complete and organized information!
> Please send a schematic of your circuit...
>        N
>
>
> -

2011\11\05@062442 by Nicola Perotto

picon face


On 05/11/2011 10.02, TakeThisOuTjana1972EraseMEspamspam_OUTcentrum.cz wrote:
> Nicola Perotto ,
> Thank you for your reply.
> My schematic is very simple.
Too simple: I cant see it!

>
> Just header with PIC16f648A - ICD and external oscillator connected together on
> breadboard.
"external oscillator" in this context means nothing: EXACTLY what?

>
> The header with PIC16f648A - ICD is  connected to ICD3 and powered from ICD3 directly.
to do n. 1: search piclist archive for "bypass capacitor"

Engineering is made (also) of details: draw a schematic!

2011\11\05@064830 by jana1972

flavicon
face
Nicola Perotto,
Thank you for your reply.

I use just header with PIC16f648A - ICD and external oscillator connected
together on breadboard.

It is the header that is made by Microchip and bought from  Farnell.com
uk.farnell.com/microchip/ac162053/adaptor-18-pdip-for-icd-
icd2/dp/4766805?Ntt=4766805

> >
> > Just header with PIC16f648A - ICD and external oscillator connected together on
> > breadboard.
> "external oscillator" in this context means nothing: EXACTLY what?
External oscillator is a crystal 4,00MHz



I do not have a schematic
ANd I do not know how/why I should use "bypass capacitor".
Can you please explain?
Thanks


L.


>
> >
> > The header with PIC16f648A - ICD is  connected to ICD3 and powered from ICD3 directly.
> to do n. 1: search piclist archive for "bypass capacitor"
>
> Engineering is made (also) of details: draw a schematic!
>
>
>
> -

2011\11\05@072511 by Jan-Erik Soderholm

face picon face

RemoveMEjana1972spamTakeThisOuTcentrum.cz wrote 2011-11-05 11:48:

> External oscillator is a crystal 4,00MHz
>

Is it an external osciallator or is it a crystal ??
It can *NOT* be both !

>
> I do not have a schematic

To be clear, you have *only* the header right now, right ?
That is, the header is not connected to any target curcuit ?
Or is the header connected to anything ?

> ANd I do not know how/why I should use "bypass capacitor".
> Can you please explain?

http://en.wikipedia.org/wiki/Decoupling_capacitor


{Quote hidden}

>> -

2011\11\05@073737 by jana1972

flavicon
face
Jan-Erik Soderholm,
Thank you for your reply.


>>
> Is it an external osciallator or is it a crystal ??
It is a crystal  HC49U-V , 4 Mhz


>
> To be clear, you have *only* the header right now, right ?
YES

> That is, the header is not connected to any target curcuit ?
Correct.

Only crystal is connected with the header
> Or is the header connected to anything ?

Can you see any problem then?

Thanks

L.

{Quote hidden}

2011\11\05@081455 by Jan-Erik Soderholm

face picon face

For some reason I get double posts from you.
You are not CC'ing me at the same time as posting on-list ?

jana1972EraseMEspam.....centrum.cz wrote 2011-11-05 12:37:

>
>> That is, the header is not connected to any target curcuit ?
> Correct.
>
> Only crystal is connected with the header

This is weird...
See: http://ww1.microchip.com/downloads/en/DeviceDoc/51292R.pdf

As far as I can see, the AC162053 doesn't have any place for a crystal.

I *think* that the header is useless without a target circuit.

It's called "*In* Circuit Debugging", not "Out Of Circuit Debugging"...


>> Or is the header connected to anything ?
>
> Can you see any problem then?

Yes, quite sloopy descriptions from your part !

2011\11\05@083849 by jana1972

flavicon
face
Jan-Erik Soderholm,
Thank you for your reply.

> > Only crystal is connected with the header
>
> This is weird...
> See: ww1.microchip.com/downloads/en/DeviceDoc/51292R.pdf
>
> As far as I can see, the AC162053 doesn't have any place for a crystal.
I put the header to a breadboard and via breadboard I connected crystal with the header.

As far as I understand  ICD circuits consist  functionality of a particular PIC circuit .

For example PIC16f648A - ICD consists functions of PIC16f648A .
And because PIC16f648A can/must  be connected with crystal( CLKIN and CLKOUT - pins 16 and 15) so I connected crystal to PIC16f648A - ICD too.


>
> I *think* that the header is useless without a target circuit.
But what is the smallest target circuit?I thought adding only crystal is OK for starting debugging
>
> It's called "*In* Circuit Debugging", not "Out Of Circuit Debugging"...
>
>
> Yes, quite sloopy descriptions from your part !
Sorry, I have just only  started with microchips  - so a lot  of new knowledge for me to learn.

L.

>
> -

2011\11\05@085736 by Jan-Erik Soderholm

face picon face


EraseMEjana1972spamcentrum.cz wrote 2011-11-05 13:38:
> Jan-Erik Soderholm, Thank you for your reply.
>
>>> Only crystal is connected with the header
>>
>> This is weird... See:
>> ww1.microchip.com/downloads/en/DeviceDoc/51292R.pdf
>>
>> As far as I can see, the AC162053 doesn't have any place for a
>> crystal.
> I put the header to a breadboard and via breadboard I connected crystal
> with the header.
>

OK. Different info. Now it is not "only the header".
Now we have a breadboard also. :-)

>> I *think* that the header is useless without a target circuit.
> But what is the smallest target circuit?I thought adding only crystal is
> OK for starting debugging

Right, but a crystal is useless without capacitors. And it is
a bit unclear how the header is powered.

> Sorry, I have just only  started with microchips  - so a lot  of new
> knowledge for me to learn.

It's not about learing PICs, it's about telling everything and
not hiding details. :-)

2011\11\05@090312 by Nicola Perotto

picon face
part 1 697 bytes content-type:text/plain; charset="iso-8859-1" (decoded quoted-printable)

Find attached a schematic. It's a very simple example.
Note that for the exact value of the two capacitor near the crystal you must read the crystal datasheet!
The bypass (decoupling) capacitor value also is indicative, usually a value from 100nF to 1uF is good BUT place it very close to the Pic.


On 05/11/2011 12.38, RemoveMEjana1972EraseMEspamEraseMEcentrum.cz wrote:
> Yes, quite sloopy descriptions from your part !
> Sorry, I have just only  started with microchips  - so a lot  of new knowledge for me to learn.
>
> L.
The first thing to do is read the pic's datasheet! It's big because it contains a lot of usefull informations.
And draw a schematic!



part 2 5621 bytes content-type:application/pdf; name="Demo 16F628A.pdf" (decode)

part 3 181 bytes content-type:text/plain; name="ATT00001.txt"
(decoded base64)

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
mailman.mit.edu/mailman/listinfo/piclist

2011\11\05@094518 by Isaac Marino Bavaresco

flavicon
face
Em 5/11/2011 10:57, Jan-Erik Soderholm escreveu:
>>> I *think* that the header is useless without a target circuit.
>> But what is the smallest target circuit?I thought adding only crystal is
>> OK for starting debugging
> Right, but a crystal is useless without capacitors. And it is
> a bit unclear how the header is powered.


Not exactly. It may become unstable, or not to oscillate at all, but it may..


>> Sorry, I have just only  started with microchips  - so a lot  of new
>> knowledge for me to learn.
> It's not about learing PICs, it's about telling everything and
> not hiding details. :-)


By my experience with teaching newbies in electronics and
microcontrollers, it takes time to notice that there's missing information.
Because of this, I generally take it easy with them.


Isaac

2011\11\05@095347 by jim

flavicon
face

The main reason for the capacitors in a crystal circuit is to provide an
intentional imbalance between the input of the oscillator and output pin of
the oscillator so that when power is applied, the imbalance causess current
to flow, and thereby guarantees the oscillator will start oscillating.

Jim

{Original Message removed}

2011\11\05@103822 by Jan-Erik Soderholm

face picon face
OK, whatever.

We don't know for sure if there are any capacitors or not.
And if not, isn't it a possible "problem" ?
I think it is.


jim wrote 2011-11-05 14:53:
>
> The main reason for the capacitors in a crystal circuit is to provide an
> intentional imbalance between the input of the oscillator and output pin of
> the oscillator so that when power is applied, the imbalance causess current
> to flow, and thereby guarantees the oscillator will start oscillating.
>
> Jim
>
> {Original Message removed}

2011\11\05@111707 by jim

flavicon
face
Disregarding your sarcasm, I was just stating why capacitors are used in a
crystal circuit.
Whether they are included in the circuit in question is as you say an
unknown.  But for the point I was trying to make, it doesn't matter one way or the other.

As far as it being a problem if they aren't included in this particular
circuit?  Of course it could be.  No one said, at least certainly not me, that it wouldn't be a
problem.  As a matter of fact, my comment only supports the fact that it could be a
problem, not dismisses it.

And now regarding your sarcasm, I don't appreciate it at all.  I was just
trying to make a
circuit design point.  I was not trying to start an argument.

Regards,

Jim



{Original Message removed}

2011\11\05@114452 by jana1972

flavicon
face
Thanks ALL who replied.
I do use capacitors in the schematic.
Please see the schematic here
www.dilynamobily.cz/Media/Uploaded/Normal/Problem.jpg
( the link is case sensitive)

My problem is that I can not debug any program using PIC16f648A - ICD
Please check and let me  know if you can see any problem
Thanks
L.


{Quote hidden}

> > {Original Message removed}

2011\11\05@114507 by Jan-Erik Soderholm

face picon face
OK, fine.

We'll know better when we have more info about the
actual "ciruit". Right know the best guess is that
load capacitors for the crystal are missing.

If the caps are missing, just add them.

Jan-Erik.


jim wrote 2011-11-05 16:16:
{Quote hidden}

> {Original Message removed}

2011\11\05@121915 by jana1972

flavicon
face

I copied the capacitors into the crystal circuit from one, working connection that also used the same PIC as I do..
Where should I put any other( load ) capacitors?And what capacity size?
Thanks again for help
L.




{Quote hidden}

> > {Original Message removed}

2011\11\05@131800 by Jan-Erik Soderholm

face picon face
It was not clear that you had any caps at all.
Anyway, good luck. I'm leaving this now.
Hope you get it running.

If nothing else helps, there is always Microchip Support.

Jan-Erik.




RemoveMEjana1972spam_OUTspamKILLspamcentrum.cz wrote 2011-11-05 17:19:
{Quote hidden}

>>> {Original Message removed}

2011\11\05@141157 by jim

flavicon
face
Why not stick around and try to help get it going?


-----Original Message-----
From: RemoveMEpiclist-bouncesTakeThisOuTspamspammit.edu [EraseMEpiclist-bouncesspamspamspamBeGonemit.edu] On Behalf Of
Jan-Erik Soderholm
Sent: Saturday, November 05, 2011 11:18 AM
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] IS this faulty?

It was not clear that you had any caps at all.
Anyway, good luck. I'm leaving this now.
Hope you get it running.

If nothing else helps, there is always Microchip Support.

Jan-Erik.




RemoveMEjana1972KILLspamspamcentrum.cz wrote 2011-11-05 17:19:
>
> I copied the capacitors into the crystal circuit from one, working
connection that also used the
{Quote hidden}

be a
>>> problem.  As a
>>> matter of fact, my comment only supports the fact that it could be a
>>> problem, not dismisses it.
>>>
>>> And now regarding your sarcasm, I don't appreciate it at all.  I was
just
{Quote hidden}

Of
{Quote hidden}

an
>>>> intentional imbalance between the input of the oscillator and output
pin
>>> of
>>>> the oscillator so that when power is applied, the imbalance causess
>>> current
>>>> to flow, and thereby guarantees the oscillator will start oscillating.
>>>>
>>>> Jim
>>>>
>>>> -----Original Message-----
>>>> From: KILLspampiclist-bouncesspamBeGonespammit.edu [EraseMEpiclist-bouncesspamEraseMEmit.edu] On
Behalf
>>> Of
>>>> Isaac Marino Bavaresco
>>>> Sent: Saturday, November 05, 2011 7:45 AM
>>>> To: Microcontroller discussion list - Public.
>>>> Subject: Re: [PIC] IS this faulty?
>>>>
>>>> Em 5/11/2011 10:57, Jan-Erik Soderholm escreveu:
>>>>>>> I *think* that the header is useless without a target circuit.
>>>>>> But what is the smallest target circuit?I thought adding only crystal
is
{Quote hidden}

>> -

2011\11\05@141638 by jim

flavicon
face
PGC and PGD are RB6 and RB7 respectively.  In your schematic you show the
PGC and OGD pins going to the OSC1 and OSC2 pins.
This is why there is no ICD functionality with your circuit.

If you connect the ICD pins to OSC1 and 2, you effectively disable the
oscillator.

Try moving the ICD PGC and PGD pins to RB^ and RB&.  You should be able to
use the ICD then.

Regards,

Jim

{Original Message removed}

2011\11\05@143123 by jim

flavicon
face
Let me try this again.

PGC and PGD are RB6 and RB7 respectively.  In your schematic you show the
PGC and PGD pins going to the OSC1 and OSC2 pins.
This is why there is no ICD functionality with your circuit.

If you connect the ICD pins to OSC1 and 2, you effectively disable the
oscillator.

Try moving the ICD PGC and PGD pins to RB6 and RB7.  You should be able to
use the ICD then.

Regards,

Jim

{Original Message removed}

2011\11\05@145626 by jana1972

flavicon
face
Jim ,
Thank you for your reply.
But do you think that I can also use an internal oscilator instead?
I successfully programmed ( into normal PIC16F628A) this code

 #include "P16F628A.INC"  ; Include header file    __CONFIG   _CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTOSC_OSC_NOCLKOUT
               org 10
               movlw        0x07
               movwf        CMCON
               bsf STATUS,RP0                ;bank1
               BCF TRISA,2
               bcf STATUS,RP0                ;bank0
               BSF PORTA,2
               END

As you can see it uses internal oscilator and it works in normal PIC16F628A / 648A
but still it does not work in PIC16F648A - ICD, no debugging possible.
Must I use external oscilator with PIC16F648A - ICD or also internal oscilator must work?
Thanks again
L


{Quote hidden}

> {Original Message removed}

2011\11\05@154215 by Isaac Marino Bavaresco

flavicon
face
Em 5/11/2011 16:56, @spam@jana1972@spam@spamspam_OUTcentrum.cz escreveu:
{Quote hidden}

There's an errata for some -ICD devices (including the PIC16F648A-ICD)
about the use of the internal oscillator and disabling MCLR (doesn't
seem to be your case though). If the internal oscillator is selected and
MCLR is disabled, then the device may not be able to enter debug mode.
There's another errata saying that one of the PORTB pins (I don't
remember which) must be pulled down for the device to enter debug mode.


Isaac

2011\11\05@160342 by jim

flavicon
face
Regarding using the internal oscillator, I don't know right off hand, but I don't see why not.   However, when developing a circuit and/or software, don't change direction in the middle of an effort.   In this case, keep working with the external oscillator until you get it to
work.  Then change oscillators.  That way, you start at a known starting point
where the hardware and software already work.
If, when you change to an internal oscillator, and the circuit no longer
works, you know the problem lies in that last step.  You can then work backwards to
find the cause.  
If you change in the middle of something, you don't know where you are
regarding Functionality.  You have just entered another variable into the equation.
And you haven't solved the first part of the problem yet.

With that said, I have added a few lines to your initial program below.
These extra Lines toggle the output on and off.  The way you had it in your post, as
soon as the
Program gets to the last line, it then keeps going through memory executing
whatever is there.  In most cases, that will be 0x3ff, which happens to be generally speaking,
undefined.  However, it could be "ADDLW"

One other thing I just remembered, when using the ICD, location '0x00' has
to be a NOP.

I have added that in the code I have included here.  Although what I am
about to say goes
Against what I said above about not changing in midstream, you might want to
try the code
I have included to see if it works.

Let me know what you find out.

My code snippet is...



#include "P16F628A.INC"  ; Include header file ;   CONFIG=CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON
& _INTOSC_OSC_NOCLKOUT
       _CONFIG = 0x2170                        ; I like writing it this way
to save space.  But that's just me.
                                               ; It does the same thing as
the "CONFIG" line above.
               org 0x0                        ; Start at location zero, not 0x10
start        
               nop                                ; For ICD use, location zero
has to be a 'nop'
               movlw        0x07
               movwf        CMCON
               bsf        STATUS,RP0                ;bank1
               bcf        TRISA,2
               bcf        STATUS,RP0                ;bank0
toggle                
               bsf        PORTA,2
               call        delay                        ; Sets up a short (20us)
delay to give a little time between flashes
               bcf        PORTA,2                ; Added this to give more operations
to look at
               call        delay
               goto        toggle                ; Causes the program to repeat the
flashing action
               goto        start
               
               
               
delay
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               goto        $+1
               return
                               
               
               END

Regards,

Jim












{Original Message removed}

2011\11\05@192157 by jim

flavicon
face
Any word on your progress?
Is the ICD working now.

Jim

-----Original Message-----
From: spamBeGonepiclist-bouncesspamKILLspammit.edu [.....piclist-bouncesspam_OUTspammit.edu] On Behalf Of
TakeThisOuTjana1972.....spamTakeThisOuTcentrum.cz
Sent: Saturday, November 05, 2011 12:56 PM
To: Microcontroller discussion list - Public.
Subject: RE: [PIC] IS this faulty?

Jim ,
Thank you for your reply.
But do you think that I can also use an internal oscilator instead?
I successfully programmed ( into normal PIC16F628A) this code

 #include "P16F628A.INC"  ; Include header file    __CONFIG   _CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTOSC_OSC_NOCLKOUT
               org 10
               movlw        0x07
               movwf        CMCON
               bsf STATUS,RP0                ;bank1
               BCF TRISA,2
               bcf STATUS,RP0                ;bank0
               BSF PORTA,2
               END

As you can see it uses internal oscilator and it works in normal PIC16F628A
/ 648A
but still it does not work in PIC16F648A - ICD, no debugging possible.
Must I use external oscilator with PIC16F648A - ICD or also internal
oscilator must work?
Thanks again
L


{Quote hidden}

Of
{Quote hidden}

an
> > > intentional imbalance between the input of the oscillator and output
pin
> of
> > > the oscillator so that when power is applied, the imbalance causess
> current
> > > to flow, and thereby guarantees the oscillator will start oscillating..
> > >
> > > Jim
> > >
> > > -----Original Message-----
> > > From: spamBeGonepiclist-bounces@spam@spamspam_OUTmit.edu [TakeThisOuTpiclist-bouncesspamspammit.edu] On
Behalf
> Of
> > > Isaac Marino Bavaresco
> > > Sent: Saturday, November 05, 2011 7:45 AM
> > > To: Microcontroller discussion list - Public.
> > > Subject: Re: [PIC] IS this faulty?
> > >
> > > Em 5/11/2011 10:57, Jan-Erik Soderholm escreveu:
> > >>>> I *think* that the header is useless without a target circuit.
> > >>> But what is the smallest target circuit?I thought adding only
crystal
> is
> > >>> OK for starting debugging
> > >> Right, but a crystal is useless without capacitors. And it is
> > >> a bit unclear how the header is powered.
> > >
> > >
> > > Not exactly. It may become unstable, or not to oscillate at all, but
it
{Quote hidden}

> > --

2011\11\05@202552 by Jan-Erik Soderholm

face picon face
Aren't the connection between the programmer/debugger used
and the -ICD version of the PIC correct simply by using
the supplied cable between the programmer/debugger and
the header ? The header itself would internaly connect
to the correct pins, not ?

The fact that the standard chip and the debug-enabled chip
has different pin-out is something internal to the header.

And what is connected to the *breadboard* would be the
correct pinout of a real 627A/628/648A. And the crystal
would have to be connected to the target-connector of the
header just as if the header *was* a real processor.

I also saw the schematic, but it didn't help me understand
how things are setup. The "unusal" pin numbers of the debug-
enabled PIC is of no concern for the target circuit. If not,
it wouldn't be usable for in circuit deebugging.

Just connect the header to the programmer/debugger as the
docs says and connect the header to the target circuit just
as *if* it was a standard 628A/648A.

Or have I completely missunderstod how the ICD-header works ?

Jan-Erik.







jim wrote 2011-11-05 19:16:
{Quote hidden}

> {Original Message removed}

2011\11\05@223903 by jim

flavicon
face
Everything you say makes sense to me.  But the photo that was given shows the PGC and PGD pins going to the oscillator pins on the chip.
Surely, this can't be correct, can it?

Jim


{Original Message removed}

2011\11\05@225554 by Isaac Marino Bavaresco

flavicon
face
Em 6/11/2011 00:38, jim escreveu:
> Everything you say makes sense to me.  But the photo that was given
> shows the PGC and PGD pins going to the oscillator pins on the chip.
> Surely, this can't be correct, can it?
>
> Jim


Are you referring to this link? :
<http://www.dilynamobily.cz/Media/Uploaded/Normal/Problem.jpg> (image below)

I could not see any reference to PGC or PGD in it. Everything seems fine
there, except for the lack of decoupling capacitor and the floating MCLR.


Isaac


2011\11\06@065805 by Jan-Erik Soderholm

face picon face


Isaac Marino Bavaresco wrote 2011-11-06 03:55:
> Em 6/11/2011 00:38, jim escreveu:
>> Everything you say makes sense to me.  But the photo that was given
>> shows the PGC and PGD pins going to the oscillator pins on the chip.
>> Surely, this can't be correct, can it?
>>
>> Jim
>
>
> Are you referring to this link? :
> <http://www.dilynamobily.cz/Media/Uploaded/Normal/Problem.jpg>  (image below)
>

That was the "schematic" I was refering to. I didn't saw that as a "photo".

I don't get why the pin numbers in red are of any interest at all.
They are all hard-wired internaly in the header, not ?

And the connections to the target circuit (in this case a crystal
and a pair of caps) are done using the *standard* pin-out (the
pin numbers in black).

Connections from the ICD is done by a pre-configured cable/connector
and you never have to worry about pin-outs.


Jan-Erik.





> I could not see any reference to PGC or PGD in it. Everything seems fine
> there, except for the lack of decoupling capacitor and the floating MCLR.
>
>
> Isaac
>
>
>

2011\11\07@140602 by jana1972

flavicon
face
Hi Jim,
Thanks a lot for your time and help( my thanks to others who replied too)

Unfortunatelly, I can NOT still use  PIC16F648A - ICD
for the debugging of  PIC16F628A.

I can program code into PIC16F628A( using PICkit3) and it works as it should.

But I can not program code ( using debugger ICD3 ) into PIC16F648A - ICD header and debug  the code with ICD3.

I receive the error
ICD3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.

Stepping target failed

Can anyone help?
Thanks
L.








>
> One other thing I just remembered, when using the ICD, location '0x00' has
> to be a NOP.
Is that nescessary or just a good advice?
{Quote hidden}

> {Original Message removed}

2011\11\07@141502 by jim

flavicon
face

L.,

regarding your question...  "Is that nescessary or just a good
advice?",
according to Microchip, it is necessary.

Just as an FYI, your are programming your code into the 648 pod, or at  least trying to, before you try to debug it, correct?

Regards,

Jim

{Quote hidden}

> > {Original Message removed}

2011\11\07@143011 by Jan-Erik Soderholm

face picon face
You have several times beeng asked to describe your
setup (better). How are things connected ?
What does the pin numbers in *red* have for meening ?

Maybe you can supply a simple photo of the setup.
That might sometimes tell more then a 1000 words... :-)

Jan-Erik.


@spam@jana1972RemoveMEspamEraseMEcentrum.cz wrote 2011-11-07 20:05:
{Quote hidden}

>> {Original Message removed}

2011\11\07@144034 by Isaac Marino Bavaresco

flavicon
face
Em 7/11/2011 17:05, EraseMEjana1972spam@spam@centrum.cz escreveu:
{Quote hidden}

Did you read my previous post?

There are issues about this ICD part and header.

There is one pin in PORTB (I think it is RB4) that must be kept at logic
level zero (at least until the ICD detects the device and enters debug
mode) for the debugger to work.
Besides, you must not use internal oscillator together with MCLR
disabled or else it won't enter debug mode.


Isaac

2011\11\07@145541 by Isaac Marino Bavaresco

flavicon
face
Em 7/11/2011 17:05, @spam@jana1972spam_OUTspam.....centrum.cz escreveu:
{Quote hidden}

"
PIC16F648A Family Limitations
PIC16F648A, PIC16F628A, PIC16F627A
Headers are required for debug when using these devices. See the "Debug
Header Specification" for details. Header limitations are as follows:

General Debug Limitations
General Programming Limitations
You cannot single step through an interrupt Due to hardware restrictions the debugger/emulator cannot jump to the
interrupt vector memory location in single step or animate mode.

Program Memory standard flash Program memory not enhanced flash. You cannot program in low voltage
mode (Vdd<4.5V.) See device programming specification for more information.

RCIF is cleared when RCREG is interrogated by software, except when
Freeze on Halt is enabled.
RBIF is cleared when PORT is interrogated by software.
When driving a clock oscillator of more than 4 MHz into OSC1 in HS
oscillator mode, the device will not go into debug mode. Therefore
crystal caps will be required. The 32 kHz to 4 MHz range does not have
this issue.
Above 16MHz, in EC mode, a Reset executes the first few instructions
instead of only 1 instruction. The workaround is to add 3 NOPs at the
reset vector.
Freeze on Halt Limitations
This device family requires a header for debug. Header limitations are
as follows:

Timer0 will not freeze using the internal clock.
Timer0 will not freeze using external clock.
CMOUTx Pins do not freeze, status bits and interrupt flags do freeze.
"


Most important in my opinion:

- You cannot program in low voltage mode (Vdd<4.5V.)
- When driving a clock oscillator of more than 4 MHz into OSC1 in HS
oscillator mode, the device will not go into debug mode.

>From another section in the help:

"
If your code makes use of port pins that correspond to clock and data
pins* in programming mode, you may not be able to reprogram your device. When Internal MCLR is used with the debugger/emulator for programming,
both Vpp and Vdd are powered together, and then Vpp is pulled high to
Vihh to enter programming mode. This means that your code will be
running before Vpp goes to Vihh. If that code makes use of port pins
that correspond to clock and data pins in programming mode, there is a
chance their values may not be 0, as necessary to enter programming
mode. Therefore, the device could not be reprogrammed.
"


Isaac

2011\11\07@145807 by jana1972

flavicon
face
Jim and others
Thank you ALL for your replies
@Jim. I programmed code into my PIC16F628A with PICkit3 and saw it worked - LED was
shining on a particular port

@Jan-Erik Soderholm  - I used only PIC16F628A  itself no other parts .I used internal
oscilator.Red numbers are the pin numbers of PIC16F648A-ICD, black numbers are pin
numbers of PIC16F628A.

@Isaac
>There is one pin in PORTB (I think it is RB4) that must be kept at logic
>level zero (at least until the ICD detects the device and enters debug
>mode) for the debugger to work.
Do you think connecting that port RB4  to the ground would be OK?

>Besides, you must not use internal oscillator together with MCLR
>disabled or else it won't enter debug mode.
But I do not think I disabled  MCLR.
__CONFIG   _CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF
&_PWRTE_ON & _INTOSC_OSC_NOCLKOUT

Thanks again for help
L.



{Quote hidden}

> > > {Original Message removed}

2011\11\07@151115 by Isaac Marino Bavaresco

flavicon
face
Em 7/11/2011 17:57, RemoveMEjana1972@spam@spamspamBeGonecentrum.cz escreveu:
> Jim and others
> Thank you ALL for your replies
> @Jim. I programmed code into my PIC16F628A with PICkit3 and saw it worked - LED was
> shining on a particular port
>
> @Jan-Erik Soderholm  - I used only PIC16F628A  itself no other parts .I used internal
> oscilator.Red numbers are the pin numbers of PIC16F648A-ICD, black numbers are pin
> numbers of PIC16F628A.
>
> @Isaac
>> There is one pin in PORTB (I think it is RB4) that must be kept at logic
>> level zero (at least until the ICD detects the device and enters debug
>> mode) for the debugger to work.
> Do you think connecting that port RB4  to the ground would be OK?


Pull it down with a resistor.


>> Besides, you must not use internal oscillator together with MCLR
>> disabled or else it won't enter debug mode.
> But I do not think I disabled  MCLR.
>  __CONFIG   _CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF
> &_PWRTE_ON & _INTOSC_OSC_NOCLKOUT

Then keep it high.


Isaac

2011\11\07@164525 by Isaac Marino Bavaresco

flavicon
face
I have finally found the document with the errata on the ICD header of
PIC16F627A/628A/648A.

It is a leaflet that came along with the ICD header. The document
reference is DS80166A.

It states explicitly on the first page that RB4/PGM must be kept
grounded while at the same time bit 7 LVP of the configuration word is
cleared to zero.


Best regards,

Isaac




Em 7/11/2011 18:11, Isaac Marino Bavaresco escreveu:
{Quote hidden}

>

2011\11\07@171027 by Jan-Erik Soderholm

face picon face
Isaac Marino Bavaresco wrote 2011-11-07 21:11:
> Em 7/11/2011 17:57, .....jana1972RemoveMEspamcentrum.cz escreveu:
>> Jim and others
>> Thank you ALL for your replies
>> @Jim. I programmed code into my PIC16F628A with PICkit3 and saw it worked - LED was
>> shining on a particular port
>>
>> @Jan-Erik Soderholm  - I used only PIC16F628A  itself no other parts .I used internal
>> oscilator.Red numbers are the pin numbers of PIC16F648A-ICD, black numbers are pin
>> numbers of PIC16F628A.

Yes yes... :-)

But why bother with the pin numbering of the -ICD part at all ?
All that is internal to the header.

Let me ask, are you using the PIC16F648A-ICD *itself* directly on the
breadboard *without* the header ??

Jan-Erik

2011\11\07@190143 by Isaac Marino Bavaresco

flavicon
face
Em 7/11/2011 19:45, Isaac Marino Bavaresco escreveu:
> I have finally found the document with the errata on the ICD header of
> PIC16F627A/628A/648A.
>
> It is a leaflet that came along with the ICD header. The document
> reference is DS80166A.
>
> It states explicitly on the first page that RB4/PGM must be kept
> grounded while at the same time bit 7 LVP of the configuration word is
> cleared to zero.


Weird, the search engine in Microchip's site could not find the
document. Weirder, Google found only two references in the whole
Internet, one in Microchip's site but not the real document.


Here is the link for the only instance of the document:
<http://tom.poub.free.fr/blog/XUFO/Pics/micro4you_cd/PICmicro%20DataSheet/PIC16CXXX/PIC16C433/Errata_DS-80166a.pdf>

I saved one copy, just to be sure (Oh my God! Now I'm afraid that they
will come after me!)


Isaac

2011\11\08@015224 by jana1972

flavicon
face
Hi Jan-Erik,
and thanks for the reply.
> Let me ask, are you using the PIC16F648A-ICD *itself* directly on the
> breadboard *without* the header ??
No , I am using it as I bought, that is PIC16F648A-ICD *itself* + header( PCB+socket)
as you can see here
uk.farnell.com/microchip/ac162053/adaptor-18-pdip-for-icd-
icd2/dp/4766805?Ntt=AC162053+ADAPTOR

L.


>
> Jan-Erik.
> -

2011\11\08@022542 by jana1972

flavicon
face
Hi  Isaac,
Thank you for your reply.
So I used 1k resistor to ground RB4,also use 5V( direct power from ICD3 debugger menu in MPLAB) but still the same.I can not debug  this very short program ( for programming I use Programmer choice in the Debugger menu).
Or must I programm it first via a programmer from Programmer menu ( not Debugger menu) in MPLAB IDE?

#include "P16F628A.INC"  ; Include header file     __CONFIG   _CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF &_PWRTE_ON & _INTOSC_OSC_NOCLKOUT ;__config  _XT_OSC &_LVP_OFF & _WDT_ON & _PWRTE_ON & _BODEN_OFF
               org 0
               NOP
               movlw        0x07
               movwf        CMCON
               bsf STATUS,RP0                ;bank1
               BCF TRISA,2
               bcf STATUS,RP0                ;bank0
               BSF PORTA,2
               END

Do you have any other idea?
Thanks
?



{Quote hidden}

> -

2011\11\08@032111 by Jan-Erik Soderholm

face picon face
jana1972@centrum.cz wrote 2011-11-08 07:52:
> Hi Jan-Erik,
> and thanks for the reply.
>> Let me ask, are you using the PIC16F648A-ICD *itself* directly on the
>> breadboard *without* the header ??
> No , I am using it as I bought, that is
> PIC16F648A-ICD *itself* + header( PCB+socket)
> as you can see here
> uk.farnell.com/microchip/ac162053/adaptor-18-pdip-for-icd-
> icd2/dp/4766805?Ntt=AC162053+ADAPTOR
>

OK, fine.

But then, what was the point with the pin numbers in red on your
schematic ? As far as I understand, those are internal to the
header and not of any concern when connecting the header to the
target circuit (in your case the breadboard, crystal and caps) ?


Jan-Erik.



> L.
>
>
>>
>> Jan-Erik.
>> -

2011\11\08@032819 by Jan-Erik Soderholm

face picon face


jana1972EraseMEspam@spam@centrum.cz wrote 2011-11-08 08:25:
> Hi  Isaac,
> Thank you for your reply.
> So I used 1k resistor to ground RB4,also use 5V( direct power from ICD3 debugger menu in
> MPLAB) but still the same.I can not debug  this very short program ( for programming I use
> Programmer choice in the Debugger menu).
> Or must I programm it first via a programmer from Programmer menu ( not Debugger menu)
> in MPLAB IDE?


Program first, then debug.
You can not debug if there is no program in the processor to debug.

{Quote hidden}

>> -

2011\11\08@041704 by jana1972

flavicon
face
Jan-Erik ,
Thank you for your reply.
> Program first, then debug.
> You can not debug if there is no program in the processor to debug.
Sure.I first programmed it but from  the Debuggger menu of MPLAB IDE and choice Program.
That was my experience,when using PICkit3 and to debug  PIC18F44K20, I had to program it , first but not from  the Programmer menu but from  the Debugger menu.
If I programmed PIC18F44K20 from the Programmer menu, I was unable to debug it.
But when I programmed it from the Debugger menu ( choice Program)I was able to debug it.
The same I try to do now when I use ICD3 and header with PIC16F648A-ICD.
But NO success yet

L.

{Quote hidden}

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