Page 1 of 3

Start Btach Programming Bug

PostPosted: 08, 2011 Mar Tue 11:27 pm
by ata
I started using your WxPic software successfully with my LPT interface programmer...

But when I select PIC 12F675 and start program it... everything works OK
The software reads the osc-cal value originally placed at address 3FFh, replaces it on the code buffer and progs the PIC well..

When you program the second pic (with the same code and settings) again, it reads the original osc-cal value of the second PIC, replaces it on the buffer and progs the pic well... (so every 12F675 will be programmed prreserving its original osc-cal value)

If you Start Batch Programming (my programmer has the OK-Button and RED/GREEN Leds installed)
The software start programming the PIC but doesn´t read the original osc-cal value of the PIC and always programs the default value: 3480h on every PIC12F675!!!!!.. which (as you know) each has different osc cal value preprogrammed at factory..

On the other hand, WinPic works correctly (preserving the original osc cal value of each pic) in the Start Btach programming mode and normal mode.

I need to work with both (WinPic on LPT1 and WxPic on LPT2) so the same PC can use to LPT-interface programmers at the same time. And only WinPic and WxPic software allows the use of the button and Red/Green leds..

So If you can help me solve the issue of the Start Batch programming Bug... It will help me a lot.

Thanks in advance for your good work doing this code and share it with us.

Re: Start Btach Programming Bug

PostPosted: 09, 2011 Mar Wed 11:51 pm
by admin

Could you confirm that you are using the V1.2.1.
At first glance I see no problem in the current code (which is not the code of the V1.2.1 exactly).
I have also made a test and did not reproduce the problem (still with the version in development). Though I have only one PIC to try, so my batch is really short! But according to your report the problem happens starting at the first PIC so I should be able to reproduce it.

I will try with V1.2.1 tomorrow if this is the version you use and I will review the corresponding code.


Re: Start Btach Programming Bug

PostPosted: 12, 2011 Mar Sat 6:51 pm
by ata
Thanks a lot for your response.. Yes I'm using version 1.2.1 Rev 194

The first 12F675 is programmed correctly in the Start Batch programming mode... the problem begins with the second and the rest..

If you continue with the same pic (the first one) there is no problem because WxPic will see the match of the pic's osc-cal value with the corresponding value saved at 3FFh...

The Wxpic did not take the new osc-cal word corresponding to each new pic to be programmed...
Although the pics are indeed programmed, the osc-cal error makes it work at freq very different from 4MHz +/- 5% as should be.

It only happens in the Start batch programming mode...
In normal mode, pressing the "Program Device" icon, every pic is programmed with its osc-cal value preserved correctly.
But I need to use the Ok button in the programmer, thus my need to work in Start Batch Prog Mode.

Re: Start Btach Programming Bug

PostPosted: 16, 2011 Mar Wed 10:38 pm
by ata
Trying not to bother you too much with this....
I wonder if you have found any solution to the Start Batch Programming Mode issue with the 12F675 osc-cal value not preserved..

Thanks in advance for any help on this regard

Re: Start Btach Programming Bug

PostPosted: 16, 2011 Mar Wed 11:34 pm
by admin

I was quite busy these last days but I took some time to investigate the new direction given in your second message. Unfortunately it is difficult for me to reproduce the problem because I lack the hardware. So I decided to try to debug the batch mode to check if the OscCal word is correctly saved at the second and subsequent loops.
But again the bad luck is that since last June I have switch the WxPic development a new environment and it is very difficult to switch back to V1.2.1 environment to debug it.
So I debugged the version in development instead of the V1.2.1. I found no issue. Of course the OscCal value is always the same because I have only one piece but I have verified that the code that read the OscCal is called at each loop and re-read correctly the value.

So with the new version I have not been able to observe the problem.

I propose you to try this new version in verbose mode (Check box in the Option panel). If you observe again the problem please send me the traces.
The new executable is NO LONGER here.
Just rename it WxPic.exe and replace your current version in Program Files/WxPic


Re: Start Btach Programming Bug

PostPosted: 17, 2011 Mar Thu 7:01 pm
by ata

Thanks for your soon answer... Again apologize me for taking so much time with this.

I download the attached WxPic-R107.exe ... Then rename it WxPic.exe and copy it to the ...\ProgramFiles\WxPic\.. where the former version was installed..

When trying to run it, shows the following error message: Can't find Translator.txt
Can't find DocWriter.txt
Please re-install the Program

So, I could not test the new version... Then rechecked with the former version... And the problem remains the same starting with the second 12F675 to be programmed in the Start Batch mode.

Hope you can find somthing... and thanks again

Re: Start Btach Programming Bug

PostPosted: 17, 2011 Mar Thu 7:37 pm
by ata
Hello Phillipe

I did the following... First I have 5x 12F675 with the following osc-cal values:
1: 342C
2: 3434
3: 34EC
4: 3444
5: 3428

Then (with verbose active) I programmed in normal mode the 5 cpu in the listed order.
The Verbose generated message is the "Normal-mode.txt" file attached.
As you can see... the 5 cpu were programmed correctly.

Later I closed Wxpic, rerun it on Start Batch mode..
The verbose generated message is the "StartBatch-mode.txt" file attached.
Where you can see the error reading the osc-cal value of each cpu.

Hope it can help you.

Re: Start Btach Programming Bug

PostPosted: 17, 2011 Mar Thu 7:41 pm
by ata
Jaust in case I failed the attachment... I resend them in one zip file

Re: Start Btach Programming Bug

PostPosted: 18, 2011 Mar Fri 1:13 pm
by admin

I had forgot that with new version some installation files have been moved to ease the porting to Unix. This is the reason why using the new binary in the environment of the old one was not possible. It fact I had suspected the problem so I tested quickly if that could work. But a bug in the un-installer avoided the deletion of the file you missed. So, as those files were still there, I had no problem to run the new binary after having re-installed the V1.2.1.

I fixed the un-installer anomaly. But that won't help you except the full installer that I provide you here will un-install correctly... But more important it will install the files you missed last time. It has switched from Revision 107 to 108 due to the change of the un-installer but there is no other change (except the revision number string itself)

Using your traces I realized that the problem is not that WxPic forgets to read the OscCal value but that it fails to do it. I strongly hope that this is fixed in the version above because else the bug seems to be adapter specific (I have no problem reading the Oscal Value in Batch mode with my Adapter). And Adapter specific bugs are really difficult to track since I don't have the adapter.


Re: Start Btach Programming Bug

PostPosted: 18, 2011 Mar Fri 9:06 pm
by ata
Thanks a lot for your help..

I uninstalled wxpic 1.2.1 and install the new version wxpicR108 you sent..

Unfortunatly the problem remains the same...
Why do you think the adapter is the problem... Both wxpic version work ok in normal mode, both always read before erase the osc-cal value correctly.
Only in Start Batch mode is when both version fail reading it...

I've also tested pics like 18F4620, 16F88, 12F615, and both wxpic version works correctly (even in start batch mode because there is no osc-cal value to preserve)
But If I try with 12F629, 12F675, etc... pics with osc-cal value at the end of prog mem... Start batch mode fails.

I've also tried on Win XP (SP2 and SP3) and Win7... and the behavior is the same.

If it is the adapter... Then both wxpic version would not work in normal mode..
Also... Why it works ok in WinPic in normal and Start Batch mode???

Only WinPic and Wxpic allow the use of the OK-Button... And I have not found a way to use two instances of WinPic on the same PC with two programmers connected to LPT1 and LPT2 respectively. That is why I was trying to use WinPic (on LPT2) and Wxpic (on LPT1) on the same PC as a solution to use two programmers at the same time. (on production job)

This is the adapter's xml file of my programmer... My adapter works on Winpic, Icprog and Wxpic (and many other) correctly... except for the Wxpic Start batch mode.
Maybe it can help

My Adapter uses two 74LS06 with pnp transistor to switch VPP and VDD. Vpp can be driven by D3 or D4 in order to be compatible with other pic programming software.