CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

can't program a 12F629 with code running ok on emulator!!!!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Testicky



Joined: 22 Nov 2003
Posts: 12
Location: South Africa / Taiwan

View user's profile Send private message Send e-mail Visit poster's website

can't program a 12F629 with code running ok on emulator!!!!
PostPosted: Tue Jan 06, 2004 12:58 pm     Reply with quote

I have a small application running on a 12F629. I used the latest CCS compiler, latest MPLAB, ICD2 with the small adaptor to emulate the 12F629/675.
All work fine and do what it's supposed to do when running in emulation mode.
Now I just want to program a chip (would like to).
I try to program a chip ICSP, and it can't verify, I try to program using the ICD2 programmer ( with the dip adaptor ), same thing, I try using the WRAP13, same thing... I must be doing something wrong...but what????
Any idea? I checked with a few chips....

Thanks in advance for your ideas.

Jacques
_________________
Testicky
Douglas Richard



Joined: 08 Sep 2003
Posts: 49
Location: Concord NH

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Jan 06, 2004 1:16 pm     Reply with quote

First off if you have not done so already turn off the code protection and see if you can write and verify.

Are you using the internal 4Mhz clock? If so make sure you are not overwriting calibration memory. Example:

#ifdef emulator

#ROM 0x3ff = {0x3480} // for calibration only

#endif

My ICE 2000 will not work if I don't have this statement. However I don't want to use the #ROM when using the normal part because it will blow away the calibration.

Hope this helps.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 06, 2004 1:24 pm     Reply with quote

This thread on Microchip's board says that for MPLAB vs. 5.70.40
you have to erase the 12F629 first, before programming.
Have you tried that ? What version do you have ?

http://forum.microchip.com/tm.asp?m=5604&mpage=1&key=12f629&anchor#5609

In case you didn't know, Microchip has completely redone
their forum, and it's now excellent. They got rid of the
awful old forum software. They must have changed
webmasters. Go here and search their archives for
answers to your type of question:
http://forum.microchip.com/
Testicky



Joined: 22 Nov 2003
Posts: 12
Location: South Africa / Taiwan

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Jan 06, 2004 1:57 pm     Reply with quote

I don't use the code protection (I check this also before programming), for oscillator, I use an external crystal running at 8.388608 Mhz, the oscillator is running fine with the emulator etc... I also try to erase the part before programming it, I have been to the microchip forum too, but have not found something which would give me a solution. I was thinking to revert to an early mplab version, but this would not explain why italso does not programm using wrap13.
It's should be so simple that it's disturbing me. I am nearly sure that I must be doing something wrond somewhere.

Thanks for your help and time.

Jacques
_________________
Testicky
Testicky



Joined: 22 Nov 2003
Posts: 12
Location: South Africa / Taiwan

View user's profile Send private message Send e-mail Visit poster's website

RE installing the complete CCS package fixed it!!!!!!!
PostPosted: Tue Jan 06, 2004 2:16 pm     Reply with quote

I re-installed the complete PCWH and now it's fine!!!
So it must be have been doing something wrong during
compilation.
This is the second time that I had to re-install this compiler.
(latest one). A few weeks ago, I could not use the 16F628 too,
ccs advised to re-install it, then it worked!!!!!! Why it was emulating
is still a mistery to me!!!!!
_________________
Testicky
Testicky



Joined: 22 Nov 2003
Posts: 12
Location: South Africa / Taiwan

View user's profile Send private message Send e-mail Visit poster's website

the problem was the ICD-2.... (programming the 12F629)
PostPosted: Wed Jan 07, 2004 3:20 pm     Reply with quote

INFO ONLY:
This morning, again, same problem as described before!!!! I re-installed again...etc...(as above) no change this time!!!!! (so re-installing was not really solving the problem, ...maybe lucky once....)
What else could I do? I re-programmed the wrap 13, and since then, it program everytime correctly, on the socket (when trying the dip part)and using the ICSP for the smd on my board.
However,the ICD2 only work correctly when using the small emulator pod, but I can't get reliable programming ICSP (actually never program ICSP), and some time program correctly the dip part.
I changed the ICD-2 to the second one, and it's fine now. The problem was my ICD-2. Something is not correct on my first ICD-2 when trying to program.

Thanks for your time.
_________________
Testicky
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group