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

unstable PIC18F452 In-Circuit Serial Programming

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Wei Deng
Guest







unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Mon Dec 23, 2002 4:55 pm     Reply with quote

Merry christmas everyone. I have some problems with ICSP using MPLAB ICD2. (I upgraded ICD2 fireware to the latest one.) It programs perfectly with my PICDEM.net board. We designed a PCB using the same schematic given in the user guide of PICDEM.net (connecting MCLR/Vpp, VDD, GND, RB7, RB6 to a 6-pin RJ11 jack). However, when we plug in ICD2 to program the PIC18F452, it always reports "Program memory not match". I tried to read the flash content to MPLAB IDE, looks like a lot of bytes are corrupted (0xFF), while some of them are still correct. (My hex image has some static strings so I can easily tell whether they're correct.) To make things worse, each time I read the flash content, the corrupts show up in different places. Have anyone met the same situation before and can give me some hints?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10241
Kurt Franke
Guest







Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Mon Dec 23, 2002 5:18 pm     Reply with quote

I've had this problem before. I had a bad connection from
the ICD to the PIC (cable was bad). I think you could also
get this problem if you are using B6,B7 for something besides
debugging. If anything else is using B6,B7 try disconnecting
it and see if the ICD works. (You can try reconnecting them
later with some resistance in-line when you get the ICD
working.)

Good luck,

Kurt


:=Merry christmas everyone. I have some problems with ICSP using MPLAB ICD2. (I upgraded ICD2 fireware to the latest one.) It programs perfectly with my PICDEM.net board. We designed a PCB using the same schematic given in the user guide of PICDEM.net (connecting MCLR/Vpp, VDD, GND, RB7, RB6 to a 6-pin RJ11 jack). However, when we plug in ICD2 to program the PIC18F452, it always reports "Program memory not match". I tried to read the flash content to MPLAB IDE, looks like a lot of bytes are corrupted (0xFF), while some of them are still correct. (My hex image has some static strings so I can easily tell whether they're correct.) To make things worse, each time I read the flash content, the corrupts show up in different places. Have anyone met the same situation before and can give me some hints?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10243
Wei Deng
Guest







Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Mon Dec 23, 2002 5:57 pm     Reply with quote

Thanks for your information. I checked my 6-wire cable, it's fine since I can use it for programming PIC18 on PICDEM.net demo board. I don't use anything else on my application PCB for RB6 and RB7 pins, they're directly connected to the 6-pin RJ-11 jack. I suspect that there're some interferences with RB6 and RB7 pins because some of the bytes get programmed correctly. I found an application note on Microchip's website (TB016: How to Implement ICSP Using PIC16F8X FLASH MCUs). It mentions that MCLR/Vpp, RB6 and RB7 need to be isolated from the rest of the circuit. My current layout routes RB6 and RB7 underneath some other chips, which might be the problem. Kurt, if you have successfully done ICSP circuit before, can I see your PCB layout? Thank you very much.

:=I've had this problem before. I had a bad connection from
:=the ICD to the PIC (cable was bad). I think you could also
:=get this problem if you are using B6,B7 for something besides
:=debugging. If anything else is using B6,B7 try disconnecting
:=it and see if the ICD works. (You can try reconnecting them
:=later with some resistance in-line when you get the ICD
:=working.)
:=
:=Good luck,
:=
:=Kurt
:=
:=
:=:=Merry christmas everyone. I have some problems with ICSP using MPLAB ICD2. (I upgraded ICD2 fireware to the latest one.) It programs perfectly with my PICDEM.net board. We designed a PCB using the same schematic given in the user guide of PICDEM.net (connecting MCLR/Vpp, VDD, GND, RB7, RB6 to a 6-pin RJ11 jack). However, when we plug in ICD2 to program the PIC18F452, it always reports "Program memory not match". I tried to read the flash content to MPLAB IDE, looks like a lot of bytes are corrupted (0xFF), while some of them are still correct. (My hex image has some static strings so I can easily tell whether they're correct.) To make things worse, each time I read the flash content, the corrupts show up in different places. Have anyone met the same situation before and can give me some hints?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10244
Kurt Franke
Guest







Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Mon Dec 23, 2002 10:31 pm     Reply with quote

Hmm, I've always put the connector for the ICD right next to the PIC. I use some 2mm or 1.25mm connectors instead of the rj11 and make an adapter cable to go to the ICD. I never have more than 1/2 inch of trace between the B6,7 pins and the connector. I can send a screenshot of a very small layout done as a home project and featuring a 12F675 (let me know..).

I can program the 18f452 in 5 seconds (guess). The 18F452 has 32K of FLASH, so the speed is something like 50kbits/s. You could try connecting the ICD2 through the serial port and dropping the communication speed down to 4800 or 9600. I'm not sure this will slow down the bitrate between the ICD2 and the PIC but it's worth a shot.

Good luck,

Kurt

----

:=Thanks for your information. I checked my 6-wire cable, it's fine since I can use it for programming PIC18 on PICDEM.net demo board. I don't use anything else on my application PCB for RB6 and RB7 pins, they're directly connected to the 6-pin RJ-11 jack. I suspect that there're some interferences with RB6 and RB7 pins because some of the bytes get programmed correctly. I found an application note on Microchip's website (TB016: How to Implement ICSP Using PIC16F8X FLASH MCUs). It mentions that MCLR/Vpp, RB6 and RB7 need to be isolated from the rest of the circuit. My current layout routes RB6 and RB7 underneath some other chips, which might be the problem. Kurt, if you have successfully done ICSP circuit before, can I see your PCB layout? Thank you very much.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10247
HENRY
Guest







Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Wed Dec 25, 2002 3:14 pm     Reply with quote

Make sure you have a pull-up resister on RB5 (low voltage prog).

ICD2 can't prog in low volts mode.








:=Merry christmas everyone. I have some problems with ICSP using MPLAB ICD2. (I upgraded ICD2 fireware to the latest one.) It programs perfectly with my PICDEM.net board. We designed a PCB using the same schematic given in the user guide of PICDEM.net (connecting MCLR/Vpp, VDD, GND, RB7, RB6 to a 6-pin RJ11 jack). However, when we plug in ICD2 to program the PIC18F452, it always reports "Program memory not match". I tried to read the flash content to MPLAB IDE, looks like a lot of bytes are corrupted (0xFF), while some of them are still correct. (My hex image has some static strings so I can easily tell whether they're correct.) To make things worse, each time I read the flash content, the corrupts show up in different places. Have anyone met the same situation before and can give me some hints?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10256
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Thu Dec 26, 2002 1:17 pm     Reply with quote

:=Make sure you have a pull-up resister on RB5 (low voltage prog).
:=
:=ICD2 can't prog in low volts mode.
:=
------------------------------------------------

This link discusses problems that can occur if the PGM pin
is left floating. The link is about the 16F87x, but it
likely applies to the 18F series as well. It recommends
using a pull-down resistor on the PGM pin (not a pull-up).
<a href="http://www.sxlist.com/techref/microchip/16F877/hvprog.htm" TARGET="_blank">http://www.sxlist.com/techref/microchip/16F877/hvprog.htm</a>


___________________________
This message was ported from CCS's old forum
Original Post ID: 10262
Guest








Re: unstable PIC18F452 In-Circuit Serial Programming
PostPosted: Wed Nov 16, 2005 5:38 am     Reply with quote

HENRY wrote:
Make sure you have a pull-up resister on RB5 (low voltage prog).

ICD2 can't prog in low volts mode.








:=Merry christmas everyone. I have some problems with ICSP using MPLAB ICD2. (I upgraded ICD2 fireware to the latest one.) It programs perfectly with my PICDEM.net board. We designed a PCB using the same schematic given in the user guide of PICDEM.net (connecting MCLR/Vpp, VDD, GND, RB7, RB6 to a 6-pin RJ11 jack). However, when we plug in ICD2 to program the PIC18F452, it always reports "Program memory not match". I tried to read the flash content to MPLAB IDE, looks like a lot of bytes are corrupted (0xFF), while some of them are still correct. (My hex image has some static strings so I can easily tell whether they're correct.) To make things worse, each time I read the flash content, the corrupts show up in different places. Have anyone met the same situation before and can give me some hints?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10256
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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