• AVR Freaks

AnsweredHot!Cannot Program PIC18F45K50. (I tried everything I know)

Author
Francesco C
Senior Member
  • Total Posts : 151
  • Reward points : 0
  • Joined: 2010/08/08 14:33:14
  • Location: UK
  • Status: offline
2019/08/02 07:45:50 (permalink)
0

Cannot Program PIC18F45K50. (I tried everything I know)

Hi.
I am developing a project using a PIC18F45K50, connected as shown in the picture below.
 

 
I am using MPLABX IDE V5.20 and PICKIT3 Programmer.
I am powering from the target PCB itself.
I have measured the voltages and signals using a scope.
Vpp is 8.5V. Vcc is 5.01V. And the Clock and Data signal are really good on scope.
 
MPLABX is not able to read the Device ID (it gets a 0).
I have also replaced the PIC18F45K50.
I have tried the PICKIT3 on another device and it works fine.
I have followed a similar thread on this forum and tried various suggestions made by other members.
 
Could you please help me in solving this problem?
 
Regards
 
Francesco
 
 
 

Attached Image(s)

#1
Jim Nickerson
User 452
  • Total Posts : 6187
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:02:08 (permalink) ☼ Best Answerby Francesco C 2019/08/02 08:27:02
0
Have you tried the USB Tool Connection Diagnostics ?
Like mentioned in this post https://www.microchip.com/forums/FindPost/1106888
#2
Francesco C
Senior Member
  • Total Posts : 151
  • Reward points : 0
  • Joined: 2010/08/08 14:33:14
  • Location: UK
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:28:29 (permalink)
+1 (1)
Hi Jim,
thanks for the advice.
I have tried USB diagnostics. NO faults reported.
 
Regards
Francesco
#3
Jerry Messina
Super Member
  • Total Posts : 418
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:29:50 (permalink)
0
I haven't used the TQFP package... don't you have to connect the ICRST/ICVPP (pin 33) instead of MCLR?
 
Also, the way I read the datasheet you need to have a pullup on ICRST when the ICPRT config bit is set.
 
#4
concertinaman
Bug Sorter
  • Total Posts : 250
  • Reward points : 0
  • Joined: 2007/06/14 05:56:58
  • Location: UK
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:34:22 (permalink) ☄ Helpfulby Francesco C 2019/08/02 08:46:28
0
From the programming data sheet:
 
For high-voltage programming, if high-voltage is detected on the ICDVPP pin first, the standard MCLR/ VPP pin will be ignored and programming must be performed using the ICDPGC and ICDPGD pins. If high-voltage is detected on the MCLR/VPP pin first, the dedicated ICDVPP pin will be ignored and programming must be performed using the PGC and PGD pins. These same rules apply to the low-voltage programming sequence.
#5
Francesco C
Senior Member
  • Total Posts : 151
  • Reward points : 0
  • Joined: 2010/08/08 14:33:14
  • Location: UK
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:49:56 (permalink)
0
concertinaman
From the programming data sheet:
 
For high-voltage programming, if high-voltage is detected on the ICDVPP pin first, the standard MCLR/ VPP pin will be ignored and programming must be performed using the ICDPGC and ICDPGD pins. If high-voltage is detected on the MCLR/VPP pin first, the dedicated ICDVPP pin will be ignored and programming must be performed using the PGC and PGD pins. These same rules apply to the low-voltage programming sequence.


Hi, thank you.
That means my connection are correct.
Regards
Francesco
 
#6
mbrowning
USNA79
  • Total Posts : 1511
  • Reward points : 0
  • Joined: 2005/03/16 14:32:56
  • Location: Melbourne, FL
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 08:54:17 (permalink)
0
Francesco C
That means my connection are correct.

I think it means they are not correct. You should have pin 33 connected to the PICkit, not 19.
 

Go Navy! Beat Army!
#7
NorthGuy
Super Member
  • Total Posts : 5586
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 11:28:42 (permalink)
0
You connect either to regular pins (16,17,18), or the alternative pins(12,13,33), but you cannot mix them.
 
It is better to connect to regular ICSP pins, because if ICPRT is 0 then the alternative pins become LVP only and cannot be used for debuggig. Thus, if you connect to alternative pins and HVP doesn't work, try LVP.
 
I have tested all the combinations of these pins, and I posted it here (scroll down to "Alternative ICSP pins in TQFP-44 package"):
 
https://www.northernsoftware.com/dev/pic18f/pic18f45k50.htm
 
#8
Francesco C
Senior Member
  • Total Posts : 151
  • Reward points : 0
  • Joined: 2010/08/08 14:33:14
  • Location: UK
  • Status: offline
Re: Cannot Program PIC18F45K50. (I tried everything I know) 2019/08/02 11:53:35 (permalink)
+1 (1)
Hi guys,
I had another look at the data sheet, and I realized I made the wrong connection.
I think I changed my mind, half way, when choosing which set of lines to use.
 
I have cut the trace from MCLR and connected to pIn33.
Programming is now OK.
THANK YOU VERY MUCH to all of you.grin: grin
 
Regards
 
Francesco
#9
Jump to:
© 2019 APG vNext Commercial Version 4.5