ICSP cable length

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

User avatar
Jan Lichtenbelt
Posts: 794
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 261 times
Contact:

ICSP cable length

Postby Jan Lichtenbelt » Tue Oct 22, 2019 2:22 pm

I use the PIC multiprogrammer BL0080 in connection with the PIC16(L)F188857 microchip. The microchip is situated on another PCB board. To program the chip, I use an ICSP cable, but not always with success. Remark: There are no external components connected to B6 or B7 (ICSP data and Clock line)

I started with an ICSP cable length of about 35 cm. To chip will be recognised, but the program is not stored well. No error is given, only the warning that "the flash memory has not been verified, may be due to code protect". The same cable and PICTIK4 as programmer, does not give any problem.

It gets even worse using the BL0080 in connection with the PIC16(L)F1847 microchip by means of an ICSP cable of 10 cm length. Now I get the message that the microchip has not been recognised. Here also the PICKIT4 did not give problems.

Using the older programmer EB-006 I used even cable lengths up to 50 cm.

Conclusion so far is that using the BL0080 and ICSP cable lengths to 10 cm maximum are advised. If you need longer lengths, it may be possible that you have to use the PICKIT4 with MPLAB X IPE.

Or is there an other (better) solution?

Kind regards

Jan

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: ICSP cable length

Postby medelec35 » Tue Oct 22, 2019 3:44 pm

Hi Jan,
Have you tried placing a small load of about 4K7 between data & 0V + clock & 0V?
Not sure if it will make a difference, but it could be electrical noise is changing the programming waveform with longer lengths of cable?
These users thanked the author medelec35 for the post:
AbhijitR (Wed Oct 23, 2019 9:24 am)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Jan Lichtenbelt
Posts: 794
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 261 times
Contact:

Re: ICSP cable length

Postby Jan Lichtenbelt » Wed Oct 23, 2019 11:42 am

Hi Martin

I tried the 4k7 resistance, but no better results, or even worse results.

Can it be the voltage level of Vpp?

Kind regards

Jan

User avatar
Benj
Matrix Staff
Posts: 14373
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4447 times
Been thanked: 4150 times
Contact:

Re: ICSP cable length

Postby Benj » Wed Oct 23, 2019 4:01 pm

Hi Jan,

The longer the cable the more a simple wire becomes like a transmission line with things like capacitance, inductance and resistance all playing a more significant part (reactance).

Transmission lines are complex things to deal with. You may need specific capacitor values at either end to stop reflections. You may also need grounded shielding around the conductors. The MCLR current from the PICkit is likely quite small and so if the resistance of the cable is significant then this may lead to issues where the VPP is not being raised high enough. The additional capacitance may also slug the MCLR rise time which can also cause issues.

By far the easiest thing to do is to reduce the length of the wire but this may not be an option for you.
These users thanked the author Benj for the post:
Jan Lichtenbelt (Thu Oct 24, 2019 10:57 am)
Rating: 5.26%