[PIC]: ICD2 loading down RB6/RB7?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[PIC]: ICD2 loading down RB6/RB7?

Philip Pemberton
Hi,
  Seems my ICD2 problems are back. I can program the PIC in circuit now
(thanks to the addition of a few pullups and the repair of a few stupid board
routing errors). The problem is, even when the ICD is in "Programmer" mode,
it loads down the RB6 and RB7 pins to the point of reducing the output
voltage to around the 1V mark. With the ICD unplugged, this rises to the full
5V.
  Is this a sign of a failed output buffer on my ICD, or am I just doing
something stupid? Do I need any resistors between the ICD header and the PIC?
I thought the ICD's outputs were supposed to go Hi-Z when the target was
running (and the ICD was in Programmer mode)...

Thanks.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... Get your grubby hands off my tagline! I stole it first!
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

dave.w.turner
I find that - I have LEDs hooked up to RB6:7 and whenever the ICD2 is
plugged in, they just stay off all the time.  I thought it was just
normal - the manual says the ICD2 required a few on-chip resorces, so
I assumed that this was just another one of them.

Also, I find that with debugger mode enabled, the program doesn't seem
to run if you unplug the ICD2 - it just sits there with a light on
till you plug in the ICD2 and reset it - is this the debug executive's
way of saying it can't talk to MPLAB?

On 6/12/05, Philip Pemberton <[hidden email]> wrote:

> Hi,
>   Seems my ICD2 problems are back. I can program the PIC in circuit now
> (thanks to the addition of a few pullups and the repair of a few stupid board
> routing errors). The problem is, even when the ICD is in "Programmer" mode,
> it loads down the RB6 and RB7 pins to the point of reducing the output
> voltage to around the 1V mark. With the ICD unplugged, this rises to the full
> 5V.
>   Is this a sign of a failed output buffer on my ICD, or am I just doing
> something stupid? Do I need any resistors between the ICD header and the PIC?
> I thought the ICD's outputs were supposed to go Hi-Z when the target was
> running (and the ICD was in Programmer mode)...
>
> Thanks.
> --
> Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
> [hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
> http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
> ... Get your grubby hands off my tagline! I stole it first!
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>


--

Dave
All us base are belong to you.

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

Herbert Graf
On Sun, 2005-06-12 at 22:35 +0100, [hidden email] wrote:
> I find that - I have LEDs hooked up to RB6:7 and whenever the ICD2 is
> plugged in, they just stay off all the time.  I thought it was just
> normal - the manual says the ICD2 required a few on-chip resorces, so
> I assumed that this was just another one of them.

I'm not sure, I've never actually looked into this, but perhaps you
can't have the ICD2 connected during circuit operation if you want to
use those two pins. Doesn't make much sense to me, but it's possible the
ICD2 just can't tristate those lines?

> Also, I find that with debugger mode enabled, the program doesn't seem
> to run if you unplug the ICD2 - it just sits there with a light on
> till you plug in the ICD2 and reset it - is this the debug executive's
> way of saying it can't talk to MPLAB?

Yes, there needs to be two way communication in debug mode with the
ICD2, without it connected and running the PIC just sits there.

TTYL
 

-----------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

Philip Pemberton
In message <1118613434.5665.32.camel@pII266>
          Herbert Graf <[hidden email]> wrote:

> I'm not sure, I've never actually looked into this, but perhaps you
> can't have the ICD2 connected during circuit operation if you want to
> use those two pins. Doesn't make much sense to me, but it's possible the
> ICD2 just can't tristate those lines?

I'm beginning to think "ICD firmware bug". It uses tristate buffers in the
PGD/PGC circuitry and the 16F877 in the ICD2 has full control over the
output-enable state of the buffers. Setting them to Hi-Z (as it does for
reading data from the chip) should tristate it to the point where all you'd
have is normal wire effects (stray inductance, capacitance, signal bounce and
such).
What I want to know is why the hell the MPLAB 7.11 version of the firmware
isn't tristating the pins. It sure as hell can do it - the programming
algorithm REQUIRES it (if the buffers couldn't be tristated, you wouldn't be
able to read the program/data memory out of the PIC).

Heck, the ICD2 cost me £90. I'd expect it to be able to do rapid-cycle
programming... I'll see about filing a problem ticket on support.microchip in
the morning.

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... These aren't my boxers -- they bend !
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: [PIC]: ICD2 loading down RB6/RB7?

Chen Xiao Fan
In reply to this post by Philip Pemberton
RB6 and RB7 both have 4k7 pull down resistors. I just measured it.
Actually I have seen it before from some ICD2 clone circuit.

Xiaofan

-----Original Message-----
From: Philip Pemberton [mailto:[hidden email]]
Sent: Monday, June 13, 2005 8:01 AM
To: [hidden email]
Subject: Re: [PIC]: ICD2 loading down RB6/RB7?


In message <1118613434.5665.32.camel@pII266>
          Herbert Graf <[hidden email]> wrote:

I'm beginning to think "ICD firmware bug". It uses tristate buffers in the
PGD/PGC circuitry and the 16F877 in the ICD2 has full control over the
output-enable state of the buffers. Setting them to Hi-Z (as it does for
reading data from the chip) should tristate it to the point where all you'd
have is normal wire effects (stray inductance, capacitance, signal bounce
and
such).
What I want to know is why the hell the MPLAB 7.11 version of the firmware
isn't tristating the pins. It sure as hell can do it - the programming
algorithm REQUIRES it (if the buffers couldn't be tristated, you wouldn't be
able to read the program/data memory out of the PIC).

Heck, the ICD2 cost me £90. I'd expect it to be able to do rapid-cycle
programming... I'll see about filing a problem ticket on support.microchip
in
the morning.

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... These aren't my boxers -- they bend !
--

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: [PIC]: ICD2 loading down RB6/RB7?

Philip Pemberton
In message <3B8AEFFADD3DD4118F8100508BACEC2C07F77276@spex>
          Chen Xiao Fan <[hidden email]> wrote:

> RB6 and RB7 both have 4k7 pull down resistors. I just measured it.
> Actually I have seen it before from some ICD2 clone circuit.

That doesn't account for the massive voltage drop though. 4k7 at 5V draws
1mA. When both the PIC and the RAM have drive capacities of 20mA, it seems
highly unlikely that 1mA would be enough to drag the voltage down to 1V.

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... I'm writing a book. I've got the page numbers done.
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: [PIC]: ICD2 loading down RB6/RB7?

Howard Winter
In reply to this post by Chen Xiao Fan
On Mon, 13 Jun 2005 13:10:37 +0800, Chen Xiao Fan wrote:

> RB6 and RB7 both have 4k7 pull down resistors. I just measured it.
> Actually I have seen it before from some ICD2 clone circuit.

It's also documented by Microchip!  :-)  If you look at the "Poster" for the ICD2: DS51265c.pdf, under
"Additional Information" it gives the circuit diagram of the ICD2 interface, and as you say, it has 4k7
pulldowns on PGC and PGD.

Cheers,


Howard Winter
St.Albans, England


--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: [PIC]: ICD2 loading down RB6/RB7?

Chen Xiao Fan
In reply to this post by Philip Pemberton
So maybe you need to look at other parts of the circuit
or see if the ICD2 is faulty. Which PIC are you programming?

By all means I think ICD2 is not a very good programmer.
I had lots of problem programming and debugging 12F629
(with the header) so I gave up and use PICkit1 instead.
Regards,
Xiaofan

-----Original Message-----
From: Philip Pemberton [mailto:[hidden email]]
Sent: Monday, June 13, 2005 4:16 PM
To: [hidden email]
Subject: RE: [PIC]: ICD2 loading down RB6/RB7?


In message <3B8AEFFADD3DD4118F8100508BACEC2C07F77276@spex>
          Chen Xiao Fan <[hidden email]> wrote:

> RB6 and RB7 both have 4k7 pull down resistors. I just measured it.
> Actually I have seen it before from some ICD2 clone circuit.

That doesn't account for the massive voltage drop though. 4k7 at 5V draws
1mA. When both the PIC and the RAM have drive capacities of 20mA, it seems
highly unlikely that 1mA would be enough to drag the voltage down to 1V.

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: [PIC]: ICD2 loading down RB6/RB7?

Philip Pemberton
In message <3B8AEFFADD3DD4118F8100508BACEC2C07F7727A@spex>
          Chen Xiao Fan <[hidden email]> wrote:

> So maybe you need to look at other parts of the circuit
> or see if the ICD2 is faulty.

The circuitry is fine. Unplug the ICD and it works fine. Plug the ICD back in
and it fails the EXTRAM selfcheck.

> Which PIC are you programming?

A Rev B4 16F877A.

> By all means I think ICD2 is not a very good programmer.
> I had lots of problem programming and debugging 12F629
> (with the header) so I gave up and use PICkit1 instead.

Great for debugging, crap for rapid-cycle programming it seems.
I really need to get a few more RS232 extension cables and USB-RS232
adapters...

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... I'm no stranger, just a friend you haven't met...
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

Olin Lathrop
In reply to this post by dave.w.turner
[hidden email] wrote:
> I find that - I have LEDs hooked up to RB6:7 and whenever the ICD2 is
> plugged in, they just stay off all the time.  I thought it was just
> normal - the manual says the ICD2 required a few on-chip resorces, so
> I assumed that this was just another one of them.

I don't know which PIC you are on, but RB6 and RB7 are PGC and PGD
respectively on many PICs, so of course the ICD2 will own them during
debugging.

> Also, I find that with debugger mode enabled, the program doesn't seem
> to run if you unplug the ICD2

Right.  Use the ICD2 as a programmer if you want that.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

Olin Lathrop
In reply to this post by Philip Pemberton
Philip Pemberton wrote:
> It sure as hell can do it - the
> programming algorithm REQUIRES it (if the buffers couldn't be
> tristated, you wouldn't be able to read the program/data memory out of
> the PIC).

Actually the programming algorithm only requires the programmer to release
PGD.  PGC is always driven by the programmer, and it's quite possible to
fully program a chip while always driving PGC.  However, I suspect the ICD2
does have the capability to release PGC too.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC]: ICD2 loading down RB6/RB7?

Philip Pemberton
In reply to this post by Olin Lathrop
In message <006e01c57008$3dde1120$[hidden email]>
          [hidden email] (Olin Lathrop) wrote:

> > Also, I find that with debugger mode enabled, the program doesn't seem
> > to run if you unplug the ICD2
>
> Right.  Use the ICD2 as a programmer if you want that.

... Which means the ICD2 is going to hold PGC/PGD low whenever it's
connected. Lose them in debug mode, lose them in programmer mode.

Life, hate it or ignore it, you can't like it...

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
[hidden email]              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... This tagline is freeware, no payment should be made for its distribution.
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist