| View previous topic :: View next topic |
| Author |
Message |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Tue Oct 03, 2006 10:49 am Post subject: Unable to program EEPROM in12F629 with WinPicProg 1.91 |
|
|
I have a David Tait type programmer with 7406 and PNP and can program the program memory OK but cannot program the EEPROM. Any attempt to do so results in a verify failure. I can change the EEPROM programatically and read it OK with WinPicProg.
I am using windows 2000 with the parallel port driver.
Paul |
|
| Back to top |
|
 |
KC
Joined: 05 May 2006 Posts: 99 Location: Victoria BC Canada
|
Posted: Thu Oct 05, 2006 1:37 am Post subject: |
|
|
When you load the HEX file in WinPicPro, do you see the proper EEPROM values in the upper right hand window? ie 0x2100 - 0x2178?
Can we see the code where you define the EEPROM values? _________________ KC |
|
| Back to top |
|
 |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Thu Oct 05, 2006 2:39 pm Post subject: |
|
|
ORG 2100 ;Start of CVs in EEPROM
DW h'01' ;CV 513 - bits 0-5 lower six address bits, 6-7 sub address
DW h'FF' ;CV 514 - bits 0-7 auxiliary activation, 1=active (not used)
DW h'0A' ;CV 515 - F1 function on time in 10mS increments, 0=cont (not used)
DW h'0A' ;CV 516 - F2 function on time in 10mS increments, 0=cont (not used)
DW h'0A' ;CV 517 - F3 function on time in 10mS increments, 0=cont (not used)
DW h'0A' ;CV 518 - F4 function on time in 10mS increments, 0=cont (not used)
DW h'00' ;CV 519 - Version number like CV8
DW h'00' ;CV 520 - Manufacturer's ID like CV9
DW h'00' ;CV 521 - bits 0-2 upper three address bits
ORG 2120 ;Start of EEROM up table
DW h'FF' ;
ORG 2160 ;Start of EEROM down table
DW h'FF' ;
I see the values OK in the data memory window. The values of data memory locations that are programaticaly changed can be read OK. I have had some success just double clicking the locations in WinPicProg and adjusting the values 1 bit at a time, if only one bit has changed they tend to get programmed and verify OK.
I suspect there is some sort of timing quirk with my programmer and I have just discovered that it does not switch the Vdd on pin 1, there is 5V avaliable all the time.
Paul |
|
| Back to top |
|
 |
KC
Joined: 05 May 2006 Posts: 99 Location: Victoria BC Canada
|
Posted: Fri Oct 06, 2006 2:45 am Post subject: |
|
|
| Quote: | | I suspect there is some sort of timing quirk with my programmer and I have just discovered that it does not switch the Vdd on pin 1, there is 5V avaliable all the time. |
Your source code looks good which is confirmed by the fact that you can see the data in WinPicPro. You should fix it so Vdd is switched, but I suspect this is not the root of your EEPROM problem.
Have tried adjusting Vpp Delay or Prog Delay in WinPicPro? _________________ KC |
|
| Back to top |
|
 |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Sun Oct 08, 2006 7:33 pm Post subject: |
|
|
I have tried adjusting both the delays but they just stop the program memory from programming succesfully. I have not tried adjusting both at the same time because 14*19 combinations looked a bit daunting. Any tips on how to go about this scientificly?
Paul |
|
| Back to top |
|
 |
KC
Joined: 05 May 2006 Posts: 99 Location: Victoria BC Canada
|
Posted: Mon Oct 09, 2006 11:20 pm Post subject: |
|
|
| Quote: | | Any tips on how to go about this scientificly? |
You could try it with another 12F629.
If that fails, then try it with another family of chip such as the 16F872 etc.
If that fails, we come back to suspecting your programmer hardware again.  _________________ KC |
|
| Back to top |
|
 |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Tue Oct 10, 2006 8:47 am Post subject: |
|
|
It is consistent with other 12F629s, I will have to get another processor to try.
Thank You
Paul |
|
| Back to top |
|
 |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Sun Oct 15, 2006 8:15 pm Post subject: Some observations |
|
|
I have not yet go hold of another type of processor, but after a bit of perseverence I have noted the following:-
1. If I define all the 128 EEPROM locations in the source code programming is more likely to suceed. Is this because WinPicProg only processes those locations specified in the source, but verifies all locations assuming those left unprogrammed are FF?
2. The programmer appears to be unable to program any location to FF if it was a value other than FF prior to programming. Does it assume that all locations are FF prior to programming?
3. The Erase Pic button does not erase the EEPROM. The only way I can see to erase all locations back to FF is to set the Data Protect fuse and program an EEPROM location, then unset the Data Protect.
So I appear to have a workaround. Not sure if what I am seeing is a feature of WinPicProg or my hardware.
Thanks for your help
Paul |
|
| Back to top |
|
 |
KC
Joined: 05 May 2006 Posts: 99 Location: Victoria BC Canada
|
Posted: Sun Oct 15, 2006 11:10 pm Post subject: |
|
|
| Quote: | | Is this because WinPicProg only processes those locations specified in the source, but verifies all locations assuming those left unprogrammed are FF? |
I believe you are correct on the first part; WinPicPro will only program those locations defined in the HEX file..... As for the verification of the other locations, that is a question for Nigel...
Nigel?
| Quote: | | The Erase Pic button does not erase the EEPROM. The only way I can see to erase all locations back to FF is to set the Data Protect fuse and program an EEPROM location, then unset the Data Protect. |
Good way of making use of the code protection feature! The PIC will erase the eeprom when you try to read/write a code protected chip.
Well, it's good you found a work around for it. I kinda suspect a bug in WinPicPro at this point. _________________ KC |
|
| Back to top |
|
 |
Nigel Goodwin Site Admin
Joined: 03 May 2006 Posts: 135 Location: Lower Pilsley, North Derbyshire
|
Posted: Sun Oct 15, 2006 11:33 pm Post subject: |
|
|
| I'll try and find my 12F629 and have a look what's going on!. |
|
| Back to top |
|
 |
PaulH
Joined: 01 Oct 2006 Posts: 9 Location: Essex, England
|
Posted: Mon Oct 23, 2006 10:44 am Post subject: |
|
|
Nigel
Beta 1.95E does not have a problem writing to the EEPROM so far. I suspect that I will be OK now with the beta version.
Thank you
Paul |
|
| Back to top |
|
 |
Nigel Goodwin Site Admin
Joined: 03 May 2006 Posts: 135 Location: Lower Pilsley, North Derbyshire
|
Posted: Tue Oct 24, 2006 6:32 pm Post subject: |
|
|
Thanks, I probably corrected it a while back then!  |
|
| Back to top |
|
 |
|