T O P I C R E V I E W |
ceut |
Posted - 11/09/2008 : 14:42:37 Hello! I try to program my PIC12F508 with the QG-4X with this information from ZLM on another topic: "1. Select chip type from the software. 2. Open a .hex file 3. Place the chip. 4. Click on ID, it should give good ID info. 5. After erase the chip, click Write button. The chip should be write and verified correctly. 6. Click on CFG button and the CFG window should be opened. 7. Click on Write button under CFG Value edit box. 8. Remove the chip and test it in your circuit.
However, the CFG information in the .hex files are assumed correct. If it is not correct, then the chip may not work."
I do all this(I always keep the osccal value before erasing) and it seems to be ok, but my PIC doesn't want to run my code. "ID" shows me "fonction not supported on this device" If I write my simple code(leds flashing) using my old serial JDM programmer with ICProg and same .hex, all is ok.
What must I do to correctly burn my PIC chip? Thanks! |
8 L A T E S T R E P L I E S (Newest First) |
ceut |
Posted - 11/10/2008 : 14:36:21 quote: Originally posted by ceut
Yes I understand your line, I have modded the line of 12C508 too. It's just the 0204 value, I don't understand where you find this...(it seems to be size of eeprom+4) So for 12x508A,509,509A, I don't know which value to add
Ok, I have read your post toooo fast Many thanks to you and your great knowledge on this great gq4x programmer |
ZLM |
Posted - 11/10/2008 : 14:33:53 The 12F508 OSCCAL value is stored at chip absolate address 204h.
See datasheet of 12F508.
|
ceut |
Posted - 11/10/2008 : 14:27:56 Yes I understand your line, I have modded the line of 12C508 too. It's just the 0204 value, I don't understand where you find this...(it seems to be size of eeprom+4) So for 12x508A,509,509A, I don't know which value to add |
ZLM |
Posted - 11/10/2008 : 14:20:33 The 12F508 chip has OSCCAL value in chip. But it will be erased then doing chip erase. Your chip OSCCAL been erased with old "PIC12F508" device type when you erase the chip. So, you have to write it back to chip manually in CFG window.
With "PIC12F508*New", you do not need to write the OSCCAL. Because this "PIC12F508*New" type is able to write back the OSCCAL value automatically after erase.
The 12F508 OSCCAL value is stored at chip absolate address 204h. See datasheet of 12F508.
Most of PIC chips do not erase the OSCCAL value when doing erase. So, not all chips need to take care the OSCCAL. |
ceut |
Posted - 11/10/2008 : 13:39:40 quote: Originally posted by ZLM
What is your remembered OSCCAL value during the erasing?
Did you write back the value after chip erased?
Here is the new chip definition for 12F508.
Name="PIC12F508*New",ID="XXXX",Class="PIC12F508",Category="MCU",MFG="Microchip",Package="DIP8",ENDPRG_COMMAND="0E",BEGERASECHIP_COMMAND="",PRG_MODE="0",OSCCALAddress(Decimal)="516";
Just copy this line into devices.txt file. Restart the software, then select "PIC12F508*New" to try.
With this new line, the software is able to backup and restore the OSCCAL automatically when erasing the chip.
I don't understand very well your trick about adress 000204 for OSCCAL but it's works! I always do a Read of OSCCAL on all my new PIC before any write and put it with a pen on the back of the chip. I have tested with your PIC12F508*NEW and the original PIC12F508, both works with this strange trick... Can you explain this? (The OSCCAL adress is 05h on microchip datasheet, so I don't understand) And, all PIC with an OSCCAL must be modded too I think? Thanks again
|
ZLM |
Posted - 11/10/2008 : 09:07:04 What is your remembered OSCCAL value during the erasing?
Did you write back the value after chip erased?
Here is the new chip definition for 12F508.
Name="PIC12F508*New",ID="XXXX",Class="PIC12F508",Category="MCU",MFG="Microchip",Package="DIP8",ENDPRG_COMMAND="0E",BEGERASECHIP_COMMAND="",PRG_MODE="0",OSCCALAddress(Decimal)="516";
Just copy this line into devices.txt file. Restart the software, then select "PIC12F508*New" to try.
With this new line, the software is able to backup and restore the OSCCAL automatically when erasing the chip.
If your chip missed OSCCAL value, then you can write it back from CFG window, see:
|
ceut |
Posted - 11/10/2008 : 00:44:54 quote: Originally posted by ZLM
can you post your hex file here? So that I can test it. I have 12F508. Also, I need to know which pin is connted to LED.
No problem, my test program is quite simple, 2 blinking leds on pin 7&6 using internal oscillator: Hex:
:020000040000FA :10000000060C25009F0C0200FF0C26000000080CC7 :1000100006006800060517090604170926051709D2 :10002000260417090A0A2700E702140A0008280014 :080030001309E802180A000898 :021FFE00EA0FE8 :00000001FF
http://morpheus.stigmata.free.fr/elec/blinkled.hex
It works without problem without my old JDM serial programmer, but with GQ4X, and your process that I have posted before, nothing happens Hope you can help me
Edit: Strange thing with CRC, when I open .hex in ICProg without doing anything else, I have "D4A9". Opening the .hex in GQ Usb prog gives "0xCA5B". I check all adress, exactly the same on both side, even config word (0FEA). Is it a software bug?
|
ZLM |
Posted - 11/09/2008 : 17:05:36 can you post your hex file here? So that I can test it. I have 12F508. Also, I need to know which pin is connted to LED. |
|
|