Page 1 of 1

Programming 16F887 SMD chip with ICSP interface .. need help

Posted: Mon Jan 07, 2013 9:03 am
by picnewbie
Hello to all specialists,

as newbie to pic SMD devices I would need some help for the programming of a SMD 16F887 device.

As somebody told me I would just need the ICSP Data and ICSP Clk Signals for programming the SMD device, I wired the device as follows:

Pin VSS (Gnd) from Voltage Regulator
Pin VDD (5V) from Voltage Regulator

Pin MCLR attached to pin 18 of the chip through resistance to 5V (pullup resistance 390 Ohm)

Pin ICSP Data attached to the pin 17 of the chip - connected to pin 40 of the MatrixMultiprogrammer board.
Pin ICSP Clk attached to the pin 16 of the chip - connected to pin 39 of the MatrixMultiprogrammer board.

When trying to transfer the programm from FlowChart the following error appears:

Could not ID the onboard chip - assuming it is the one specified in the configuration screen i.e.16F887

Followed by the message:

pic micro has not beed erased ... Continue

Here the resume of the Flowchart messages:


File name: D:\Documents\FlowCode (Pic)\Test1 PIC16F88 Analog In et LED Out et Switch In\Flowcode 16F887 TEST D0.c
Title:
Description:
Generated by: Flowcode v5.4.0.0
Date: Monday, January 07, 2013 09:00:44
Licence: Professional
Registered to: MartinMaximilianMayr
Licence key: ZM06Y5
http://www.matrixmultimedia.com
Compilation is up-to-date
Linking is up-to-date
Launching the programmer...
D:\Program Files (x86)\Flowcode\v5\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F887 -nogui "Flowcode 16F887 TEST D0.hex"
Sending program...

.......................................................................................................................................................................................................................................................................

Erasing the PICmicro
NOTE: EEPROM data will also be erased!

....................................................................................................................................................................................................................................................................................................

Writing program memory
Writing configuration memory
Programming failed: <config1> & <config2>
That took 151.274 seconds
Return code = 0

FINISHED

Now my question how can I program a smd chip soldered onto an external circuit with the ICSP Interface - what do I have to connect otherwise then what I did ?

Hope to get a response from you specialists, or maybe some explanation what else happens when the Chip is on the programmer instead of being connected a side through ICSP Interface ?

I tried something more - still without success: I connected pin 1 from J5 to pin VPP of the Microcontroller (pin 18 of the 44pin SMD chip) I expeted from the documentation that the VPP should move to 13.25 V during programming, but it only moved from 5.01 to 5.25V. And still the same error messages ...

Please I need some help to get my chip ICSP programmed now ...

Anyone with a schematics on how to cable and configure correct the Multiprogrammer (my revision is the Multiprogrammer EB-006-00-8

Best regards

Max

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 1:22 pm
by medelec35
Hi Max,
I could be wrong, but 390R from VPP to +5V sounds way too low in value.
This would cause too much current sinking into +5V (avout 2.3mA if VPP =14V).
Since their may not be enough current available for programming, then VPP will no be able to rise to correct programming voltage.
The 5V supply is clamping the VPP pin in a way.
Maybe this is why target device is failing to be programmed?
10K is more of a typical value.

Martin

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 2:13 pm
by picnewbie
Hello Martin,

thanks allready for your reply - unfortunately I'm not sure if I understand you correct, the VPP pin I connected directly to the pin 1 of the programmer and this gave the same result (programming error).

In this case the Pin from the VPP from the programmer comes to a open Jumper through the famous 390Ohm resistance.

There is though no connection from the other side of the jumper ...

I removed the 390Ohm Resistance and make a new test ... Now the Vpp moves to 11 V during the programming phase but the device still doesn't get programmed ...

New Message comes now:
PIC micro not found from ID0x3041
Please enter the chip name:

When entering PIC16F887 the dialog disappears and ...

The new message appears: PICmicro has not been erased...

Continue ... Yes ...

The rest of the summary shows that the chip again didn't program :

File name: D:\Documents\FlowCode (Pic)\Test1 PIC16F88 Analog In et LED Out et Switch In\Flowcode 16F887 TEST D0.c
Title:
Description:
Generated by: Flowcode v5.4.0.0
Date: Monday, January 07, 2013 14:15:15
Licence: Professional
Registered to: MartinMaximilianMayr
Licence key: ZM06Y5
http://www.matrixmultimedia.com
Compilation is up-to-date
Linking is up-to-date
Launching the programmer...
D:\Program Files (x86)\Flowcode\v5\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F887 -nogui "Flowcode 16F887 TEST D0.hex"
Sending program...

...........................................................................................................................................................................................................................................................................................................................................................

Erasing the PICmicro
NOTE: EEPROM data will also be erased!

...............................................................................................................................................................................

Writing program memory
Writing configuration memory
Programming failed: <config1> & <config2>
That took 142.445 seconds
Return code = 0

FINISHED

....

SOS please ;)

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 2:44 pm
by medelec35
picnewbie wrote:
New Message comes now:
PIC micro not found from ID0x3041
Please enter the chip name:

When entering PIC16F887 the dialog disappears and ...

The new message appears: PICmicro has not been erased...

Continue ... Yes ...
That's a step further. The resistor was affecting the voltage as you noticed voltage now rises to 11V instad of 5.25

Can you try again, if you see:
PICmicro has not been erased...
Click no, then select send to target again.
That message is saying there is going to be an issue with the programming.

I have noticed that chips don't always get programmed first time.

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 2:46 pm
by picnewbie
I tried the same programming with a DIL 40 pin chip directly on the programmer this one worked correct.

No I reduced to a strict minimum all wiring to the external board with the SMD chip but still can't program it:

I have only 5 wires connected (plus a LED for testing):

From the controller side to the SMD board side the pinout is as follows:

12V (from Matrix 14V Connector to the LM7805) From the 5V Out put of the LM7805 it continues to VDD on the Pic 16F887.
Gnd (from Matrix external GNd connector ) to Gnd of LM7805 and to Pic16F887 VSS pin.

Programmer J5 Pin 1 - to Vpp on the 16F887

Programmer J5 Pin 2 - to Pin 17 on the 16F887 (ICSPDAT)

Programmer J5 Pin 4 - to pin 16 on the 16F887 (ICSPCLK)

Led between Pin VSS (0V/Gnd) and Pin 38 (RD0) Pin should blink if programming succeeds ... but still problems during programming ...

Anybody can tell me what I'm doing wrong ?

I thought this was the minimum required for programming the PIC ?

Why is it working with a inside Programmer plugged chip but not with the configuration with this ICSP Interface ?

Please help !!!

Best regards

Max

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 3:17 pm
by picnewbie
Hello thanks once more for your help, but it still doesn't work out correct :(

I still have a message telling that programming faild and I still bave no program on the chip ... (no LED blinking :( )

Any wrong parameters in the chip configuration possible ?

I tell you my parameters:

Project Options:

8000000 Hz

Internal RC Clockout
Watchdog Timer Off
Power Up Timer On (tried Off too - same problem)
Master Clear Enable /MCR is external
Code Protect Off
Data EE Read protect Off
Brown Out Detect BOD and SBOREN disabled
Internal External Switch Over Mode Disabled
Monitor Clock Fail Safe Disabled
Low Voltage Program Disabled
Background Debug Disabled
Self Write Enable : No Protection
Brown Out Reset Sel Bit : Brown out at 2.1V

The other parameters are not really readible in the menu due to a problem with the dialog (menu problem - I told allready a few weeks ago per email to matrixmultimedia support )

Best regards

Max

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Mon Jan 07, 2013 5:35 pm
by picnewbie
Hello again,

I found something new now, I tried with a 16F887 DIL (40 pin Chip) which is huge but works correct with the programming interface as I described it before. But and this is horrible the same type of SMD TQFP device is not working eventhough I checked out the pinouts, compared 100 times with the datasheets and tried over and over again (with different devices - just to be sure it's not a hardware problem !) but nothing to do with the SMD device I can't get anything programmed through the ICSP Inerface.

I connected the same 5 pins of the DIL Device as from the SMD device, Vpp, ICSPData, ICSPClk, Vss and Vdd lines - nothing else ... and I tried using the pins directly on the chip - I tried with a TQFP Adapter to DIL Interface, no way to get the SMD device programmed !

What could be the problem ? From the datasheets the device should be exactly interchangable - there are no differences in Voltage ? There are no specialties for the SMD device marked in the datasheets ... So is there anybody who ever used such a TQFP 16F887 SMD device and got it programmed ?

Please SOS !!!

Best regards

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Tue Jan 08, 2013 11:58 am
by picnewbie
Microchip told me that the pins 6 and 29 (both Vss) and 7 and 28 (both Vdd) must be connected - but this was allready the case and still I can't get the SMD device programmed !!!

Anybody with an idea ?

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Tue Jan 08, 2013 3:31 pm
by picnewbie
Found a solution now by myself - thanks anyhow for your help ...

The Reason is not yet clear, but the Multiprogrammer uses the VSS and Vdd lines in a strange way ... During programming the lines change their values (The Vdd becomes in intervalls the same Voltage as Vss) When using the Vdd fix with 5V on my card it won't work, so I had to put a jumper to seperate the power lines from my circuit and use only the Power from the Programmer during programming the SMD Chip - what was strange because with the DIL Chip I didn't encounter this problem - because the DIL I allways could take out of my card for programming. Since the SMD was fix on the card the power was allways attached through the LM7805 :(

Looks like this will work when I disconnect the Ppowerlines through jumpers and connect the programming interface with 5 pins ...

Now one little unclear detail stays for me : With the DIL whenever I changed the program the new program started running immediately ... with the SMD chip the new program sometimes starts, sometimes it requires a Reset Button on the programmer to start ... Whenever the Power is switched the program allways starts running in both cases ... ;) Timing effect in programming different from SMD to DIL version ?

Best regards
Max

Re: Programming 16F887 SMD chip with ICSP interface .. need

Posted: Fri Jan 11, 2013 3:55 pm
by Benj
Hi Max,

Yes I think all the devices need some kind of power cycle to start programming. If you connect the VCC of the board through to the VCC of the ICSP then it should work ok.

Regarding the startup after programming issue again this sounds like a voltage issue. Maybe the device is not being power cycled correctly or maybe it just becomes stuck. Again doing the mod to connect the chip's VCC to the ICSP header should fix this issue.