PIC16F877 programmation

Problems or tips related to the use of WxPic

PIC16F877 programmation

Postby sebFox » 13, 2010 May Thu 4:13 pm

Hello,

I am using this PIC programer (http://www.tavernier-c.com/programmateur_de_pic.htm) with WxPic 1.2.1 R194 and i am able to program and read 16f84A and 16f628.
But i tried with a 16f877 and it's doesn't work.

I have debugged and i am surpise because, VPP1 (parallel port bit D4) and VPP (parallel port D3) are activated both when read/write operations. I read 16f877 datasheet and only VPP1 need to be apply (pin 1 on the pic). In our case, we appliy 13V on pin 1,6 and 15 of the pic.

Coiuld someone help me to understand if it is normal?

Thanks for your answers
SebFox
sebFox
 
Posts: 8
Joined: 13, 2010 May Thu 3:12 pm

Re: PIC16F877 programmation

Postby admin » 18, 2010 May Tue 8:10 am

Hello,

I suppose that what you have observed is not normal for the 16F877. This may even have burnt your component because the 13V on pins clamped to 5v can led to either burn the clamping diodes or to raise the chip 5v VDD supply to 13v burning the whole chip. I hope your power supply was weak enough to fail providing enough current for burning the component, or that the power limitation integrated in the 78L08 was sufficient.

This problem comes from your interface definition file that allows to drive the Tavernier's programmer. The author does not provide it so I don't know how you get it but the error probably comes from here.
It seems that the Tavernier's programmer uses 2 different port outputs to drive 2 different VPP depending on the programmmed PIC. Only one of these outputs should be used for a particular PIC model. Unfortunately WxPic does not allow to attach a VPP port definition to a PIC model. So it seems that the programmer configuration file writer has chosen to attach the 2 ports to VPP.

To solve your issue, you should write 2 different interface definition files for your programmer. One file that drives VPP with D4 and one to drive VPP with D3. You will then have to select the right file depending on the PIC model you are using. An error in selecting the right model may be dangerous for your PIC device.

Regards,
Philippe
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: PIC16F877 programmation

Postby sebFox » 18, 2010 May Tue 8:49 am

Hi, thanks for your answer.

If i understood , i have to write a new definition file for the WxPIc prog. I don't know how to do that.
I am surprise because, the programer i used is especially design to work with P16PRO, an old software program.

In the this adress (http://www.tavernier-c.com/realisation_prog_pic.htm), the author explain that the programer is
like a "ProPic 2 Programmer" and is recognized by Ic-Prog.

I don't use Ic-Prog because it is less stable than WxPic. But Wxpic should integrate "ProPic 2 Programmer" configuration at least?

Thank for your answer.

SebFox
sebFox
 
Posts: 8
Joined: 13, 2010 May Thu 3:12 pm

Re: PIC16F877 programmation

Postby admin » 18, 2010 May Tue 9:14 am

I am surprised that you seem to know nothing about the interface definition file because WxPic does not include a built-in definition for the Tavernier's programmer or even for the ProPic 2 Programmer. So which interface configuration have you used? The answer of this question is the text in the upper combox in the Interface panel of WxPic below the text "Interface type" ("Type de l'interface" dans la traduction Française).
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: PIC16F877 programmation

Postby sebFox » 18, 2010 May Tue 11:27 am

In fact i am using the Tait 7406 (inverter) + PNP transistor which is very similar with the Tavernier's programer.
And it 's was working well with the 16f84 / 628. But it is when i tried to read a 16f877 that i realise that VPP pin was set to 13V.

Do you plan to add ProPic2 programer in you configuration?

Thanks
SebFox
sebFox
 
Posts: 8
Joined: 13, 2010 May Thu 3:12 pm

Re: PIC16F877 programmation

Postby admin » 18, 2010 May Tue 11:56 am

sebFox wrote:In fact i am using the Tait 7406 (inverter) + PNP transistor which is very similar with the Tavernier's programer.
And it 's was working well with the 16f84 / 628. But it is when i tried to read a 16f877 that i realise that VPP pin was set to 13V.

So with this setting you should never have D4 activated by WxPic. Unfortunately for programming (or reading that's almost the same thing) the 16F877 D4 is the right VPP command and D3 MUST not be used. You may have found that D4 is on through the clamping diodes but if you remove the device D4 should be no longer on.

sebFox wrote:Do you plan to add ProPic2 programer in you configuration?

I need to verify first the capability of this programmer and in any case this won't be in the short term. But I will try to come back to you soon with a custom configuration file that should work with Tavernier's programmer for 40-Pin devices.
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: PIC16F877 programmation

Postby admin » 18, 2010 May Tue 12:35 pm

Attached is a zipped XML file that should work with your 16F877. But it will not work with the other devices you have already used. In fact it is compatible only with 40-pin devices but fortunately won't hurt the other devices.

You must unzip and install in WxPic directory (or in any place you want). Then select "Custom, on LPT port, defined by FILE" in the interface Type list (or "Port Parallèle défini par fichier" en Français). Ignore the error about the missing file (I should have caught this one!). Click on Select button below and search for the XML file. Once selected try to Initialize the interface (left button at the top of the panel). This should succeed.

Play with the Vpp checkbox and verify that this is VPP1 that switches and that VPP stay low. Avoid to plug a device during this operation in case there would be an error.

The content of the xml file is listed below

Philippe

Code: Select all
<programmer-control-lines
DataIn="!ack"
OkButton="nc"
VppOnOff="D4"
VddOnOff="D2"
Connect="nc"
ClockOut="!D1"
DataOut="!D0"
DataOutWhileReading="1"
PullMclrDown="nc"
ClkEnable="nc"
OutEnable="nc"
RedLed="nc"
GreenLed="nc"
/>
Attachments
Tavernier40Pins.zip
Custom Interface definition file for Tavernier's Programmer parallel port interface.
(287 Bytes) Downloaded 344 times
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: PIC16F877 programmation

Postby sebFox » 18, 2010 May Tue 12:49 pm

Tank you Philippe,

I will try this new configuration file.
SebFOx
sebFox
 
Posts: 8
Joined: 13, 2010 May Thu 3:12 pm

Re: PIC16F877 programmation

Postby sebFox » 18, 2010 May Tue 6:51 pm

Hello,

I just tried the configuration file and there is a mistake. In fact the D2 led is always on and when i insert my pic, D2 seems pull down.
In the configuration file, i don't see where the 3 pin is activated. If there is a 0 V login on pin D3, +13 V is apply on the pin 6 and 15 of the 16f877.

I didn't see any change on the problem.

SebFox
sebFox
 
Posts: 8
Joined: 13, 2010 May Thu 3:12 pm

Re: PIC16F877 programmation

Postby admin » 19, 2010 May Wed 12:42 am

I had a doubt on the solution because the D3 pin is not used and must stay low. But WxPic has not been designed to drive an unused pin. The solution I used with the configuration file is to let the pin in its default state. I expected that this would be Low.
As your test failed, I dig in the software and I found that the default value is 1 for unused pins.
I cannot propose you to drive Low the D3 pin when the programming starts because this would mean that at the end of programming the D3 pin would be brought back high with the risk to burn the device.

So as a quick workaround, I made for you a modified WxPic executable that drives unused pins low by default. You must decompress the executable and place it in the WxPic installation directory to replace the old binary. You must still use the configuration file attached to the above post.

I hope that I can do a better fix later in a future version. Nevertheless this programmer stays very risky because it might apply VPP on wrong pin if there is a problem with the software. It would have been better to use a hardware switch to route the VPP to the right pin rather than relying on the programming software.
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Next

Return to WxPic Usage

Who is online

Users browsing this forum: No registered users and 1 guest

cron