CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Not reading any device code
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
edaou



Joined: 07 Jul 2023
Posts: 5

View user's profile Send private message

Not reading any device code
PostPosted: Fri Jul 07, 2023 7:47 am     Reply with quote

Hi, I'm not sure which information to post So I hope I provide enough relevant info.

I'm using ICD-U64 programmer with the ICD interface.

ICD software version - 5.082
ICD firmware version 3.57
Hardware rev 3

I keep getting the "read" device ID as 0x0 when I should be reading 0x6180 (PIC18F25K80).

There is a rev 1 of the board that I can program fine. This rev2 had no major changes to the wiring of the programmer or any pins on the chip.

I found two things in my schematic that could have affected it:
1. I accidentally wired pin 9 (RA7/ OSC1/ CLKIN) to ground through a resistor. I removed the resistor (making it floating). I am using the internal OSC.
2. I put a small 0.1uF capacitor for Vss (both grounds pins 8 and 19) which I removed and replaced with a 0ohm resistor.

This comes from a reputable board house. The chip has the PIC18F25K80 I/SS printed on it with the microchip logo and a batch number. It doesn't SEEM counterfeit? I tried reinstalling the programmer but I don't think that is the issue because I was able to use it to program the rev1 board.

In the diagnostics area of the ICD interface there is a section "if the device ID is wrong use a DVM to test each pin" and i am able to force MCLR down to VSS and up to VDD. I have not tested the PGD/PGC pins.

Is it possible that when i powered the chip, the capacitor to ground caused a permanent issue? I have one more board left that I can test but i don't want to do anything on it yet since it's my last unadultered board.

Any help is appreciated! Thanks
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 11:41 am     Reply with quote

Can you provide a schematic showing what connects to the PIC?
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 11:53 am     Reply with quote

It would be fastest for you to correct the hardware issues on your 2nd board, then attempt to power & program.

Regarding whether the processor is legitimate or not, try rubbing the processor with a q-tip that has been soaked in flux remover. In my experience, the markings on counterfeit parts can be easily removed in this manner.
edaou



Joined: 07 Jul 2023
Posts: 5

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 1:30 pm     Reply with quote

Quote:
It would be fastest for you to correct the hardware issues on your 2nd board, then attempt to power & program.


I already did. I replaced the capacitor to ground with a 0 ohm resistor and i removed the resister for clkin making the pin free floating (my code will drive that pin). It still couldn't read the device ID, unless the device id was corrupted when i powered it on the first time which i doubt.

Quote:
Can you provide a schematic showing what connects to the PIC?


I don't know where i can host image to link here but i can verbalize.

    1. RA0,1,2,3,5,6,7 are outputs to resistor+led circuit being driving by the PIC
    2. RB0,1,2,3,4,5 are inputs with a jumper to ground.
    3. RB6 and 7 are PGC, PGD for programming
    4. Both Vss (pin 8 and 19) are connected to ground (now)
    5. Both Vdd (pin 6 and 20) are connected to 5V Vcc
    6. MCLR is connected to VCC with a jumper to ground it to reset.
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 1:56 pm     Reply with quote

Over the years I've had a number of ICD-U64s stop working/burn out somehow. Try another ICD-U64. If that one can't read the device ID either, then I suspect you either have counterfeit processors or there's something else wrong with the assemblies.

Last edited by newguy on Fri Jul 07, 2023 2:00 pm; edited 1 time in total
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 2:00 pm     Reply with quote

Through the IDE, Tools -> CCSLoad to launch the loader separately from the IDE. Diagnostics tab, 3rd box down "If the device ID is wrong, use a DVM to test each pin." Use the controls to assert each of the pins to different levels and confirm with a voltmeter. If that's okay and you can confirm the pins change state through that control (proper state), then it would seem as though the processor is the problem.
edaou



Joined: 07 Jul 2023
Posts: 5

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 2:04 pm     Reply with quote

I'm not sure if you read in my original post:

Quote:
In the diagnostics area of the ICD interface there is a section "if the device ID is wrong use a DVM to test each pin" and i am able to force MCLR down to VSS and up to VDD. I have not tested the PGD/PGC pins.


I am able to change the state of the MCLR pin.


I also don't think something is wrong with the ICD-U64 programmer because i was able to program the original version of the board with the chip using the ICD interface. I also use that ICD-U64 to program other boards with older PICs.
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 2:27 pm     Reply with quote

Quote:
6. MCLR is connected to VCC with a jumper to ground it to reset.


This does not sound like a proper connection. Could you provide more detail?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 07, 2023 4:01 pm     Reply with quote

MCLR should have a 10K pullup resistor on it. You said Vdd for the PIC
is +5v, so the pullup should also go to +5v.

When running the 18F25K80 at 5v, pin 6 (Vddcore/Vcap) should be connected
to a ceramic 10 uF, low ESR capacitor. This is in Section 2.4 of the 18F25K80
data sheet. You could substitute a 10 uF tantalum capacitor temporarily.


To post an image, you upload it to a free image hosting service such as:
https://imgbb.com/
Then get the hotlink for it (it will say the link for a forum), and post that here.
Ttelmah



Joined: 11 Mar 2010
Posts: 19524

View user's profile Send private message

PostPosted: Sat Jul 08, 2023 8:09 am     Reply with quote

As PCM Programmer says, the glaring pin missing in your list of
connections is Vddcore/Vcap.
This is unlike almost any other PIC of similar size. It is a low voltage
chip internally. It runs the CPU at 3.3v. This is generated for you by an
internal regulator, and this must have a suitable capacitor on the
Vddcore/Vcap pin. The chip will not run correctly without it.
This capacitor, must be a low ESR type (ideally a ceramic), and quite close
to the chip (ideally right adjacent to the chip). If running instead from
a 3.3v supply, this pin must instead have it's own 0.1uF capacitor, and
the chip is then programmed with the ENVREG bit turned off.
The chip will not run without this connection. Your verbalized list
omits this pin... Sad
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Sat Jul 08, 2023 10:50 am     Reply with quote

Re: Vddcore/Vcap low ESR capacitor.... Some years back I used a processor from the 18 family (can't remember which one), and I originally placed an 0603 10uF X7R ceramic cap for this connection. The processor behaved so strangely, and in desperation I finally placed a 10uF 1206 package X7R cap. That made it behave.

When it comes to ESR, remember that ESR is inversely related to capacitor footprint with ceramics. The larger the capacitor's physical size, the smaller the ESR.
Ttelmah



Joined: 11 Mar 2010
Posts: 19524

View user's profile Send private message

PostPosted: Sat Jul 08, 2023 11:25 am     Reply with quote

A very good point. Teeny little capacitors have to throw away 'something'
to get that small size. ESR is a common thing that disappears... Sad
edaou



Joined: 07 Jul 2023
Posts: 5

View user's profile Send private message

PostPosted: Mon Jul 10, 2023 6:53 am     Reply with quote

I figured out where to host the picture but i can't embed it here. I put two pictures, one is the pinout i CAN program and one is the one i cannot. Vcc on the one i CAN program is 3.3V. this is the link:

https://imgur.com/a/ImUKlSu

The two power pins (VDDCORE/ VCAP (pin 6) and VDD (pin 20)) are connected to Vcc (5V) and a 0.1uF cap to ground.

The previous version of this same board (that I CAN program) only have 3.3V direct to Vddcore/ Vcap / Vdd with no cap to ground.


MCLR is connected to Vcc (5V) and a 10k pullup. The pin is also connected to a jumper so i can short it to ground and reset it (same as previous version of the board)


Is it possible that the 5V is just too much for this PIC?
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Mon Jul 10, 2023 7:45 am     Reply with quote

Chapter 2 of the PIC's data sheet, specifically section 2.4. One of the first lines there recommends reading section 28.3. I'll come back to that.

First bullet point at the top of the second column talks about some devices not having the ENVREG pin (as with your processor), and require a 0.1uF cap on the Vcap/Vddcore pin. Your design has this. Right after that, "The Vdd level of these devices must comply with the "voltage regulator disabled" specification for Parameter D001 in Section 31.0..."

Figure 31-2 shows that the max voltage for such a processor is 3.6V. This is the graph mentioned above.

I encourage you to have a look at section 28.3.

Back to section 2.4, second bullet point in the 2nd column:
"Some devices permanently enable the voltage regulator. These devices also do not have the ENVREG pin."

A PIC18F25K80 can run from up to 5V but requires the 10uF low ESR cap on the Vcap/Vddcore pin. This pin is not connected to the 5V rail for this processor.

A PIC18LF25K80 can only run from a max 3.6V rail but the Vcap/Vddcore pin must be fed the same ~3.3V Vdd as everything else, and in this case it requires a 0.1uF cap, same as for any other Vdd pin.

I suspect that the original board rev, which runs from a 5V rail, uses an F processor.

I suspect that the second board rev, which still runs from a 5V rail, was *supposed* to have an LF part fitted and for the rail to be reduced to 3.3V. Because the board directly connects 5V to the Vcap/Vddcore pin, that processor is now toast, no matter if it's an F or LF variant.
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Mon Jul 10, 2023 7:47 am     Reply with quote

Quote:
The two power pins (VDDCORE/ VCAP (pin 6) and VDD (pin 20)) are connected to Vcc (5V) and a 0.1uF cap to ground.


You have most likely damaged the processor. From the data sheet:

VDDCORE/VCAP 3 6 P
VDDCORE External filter capacitor connection.
VCAP External filter capacitor connection

Also read section 28.3 On-Chip Voltage Regulator
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group