|
|
View previous topic :: View next topic |
Author |
Message |
ritchie
Joined: 13 Sep 2003 Posts: 87
|
12F629 Problem? |
Posted: Thu Apr 15, 2004 9:05 pm |
|
|
Hi,
I got a problem with my 12F629?
1] I download my code... just simply make the LED on/off every 500ms.
2] I press the run button or remove the downloader such that I can see the effect of the LED blinking.
3] Next I made another program using timer0 that will a timer interrupt for my blinking LED.
4] I download it again...
5] the LED is not blinking this time...
so, to check...
I decided to download again my blinking LED code- the first one but to no avail- the LED would not blink anymore...
I got a new 12F629 and download the second code and LED is blinking using timer0 interrupt.
Anybody have experience this? I need your comments please...
Thnx |
|
|
Guest
|
|
Posted: Thu Apr 15, 2004 11:48 pm |
|
|
If you erased the code at ROM address 0x3FF, then the entire
program might not work. Maybe that's what is happening.
See this article by Mr. Hamlett on how to fix this problem:
http://www.pic-c.com/forum/general/posts/9234.html |
|
|
ritchie
Joined: 13 Sep 2003 Posts: 87
|
|
Posted: Thu Apr 15, 2004 11:56 pm |
|
|
The link doesn't work!!!!
Anyone who can provide me this info regarding this article?
Thnx |
|
|
Prezydent Guest
|
|
|
Guest
|
Re: just search for topic |
Posted: Fri Apr 16, 2004 1:15 am |
|
|
Prezydent wrote: | http://www.ccsinfo.com/forum/viewtopic.php?t=16164&highlight=9234 |
Do u have any idea what is the calibration value of the 12F629 (factory set)?
thnx |
|
|
Ttelmah Guest
|
Re: just search for topic |
Posted: Fri Apr 16, 2004 5:17 am |
|
|
Anonymous wrote: | Prezydent wrote: | http://www.ccsinfo.com/forum/viewtopic.php?t=16164&highlight=9234 |
Do u have any idea what is the calibration value of the 12F629 (factory set)?
thnx |
It is unique to each chip...
It is a simple 'RETLW x' instruction. You can put a RETLW 0x80, and the system will again work, but the clock will be off frequency. You can write a little 'test' program, to change the value fed to the clock configuration register, and toggle an output pin, till the sysem gives the 'right' frequency, then save the number used.
If the frequency is not important, then just go with 80. This is the 'power on default' value, used till the trimmed value is transferred into the OSCCAL register. The register uses the high six bits, with 0x80, giving the 'centre' frequency, 0, giving the lowest frequency, an 0xFC giving the highest frequency.
Best Wishes |
|
|
ritchie
Joined: 13 Sep 2003 Posts: 87
|
Re: just search for topic |
Posted: Fri Apr 16, 2004 6:16 pm |
|
|
Ttelmah wrote: | Anonymous wrote: | Prezydent wrote: | http://www.ccsinfo.com/forum/viewtopic.php?t=16164&highlight=9234 |
Do u have any idea what is the calibration value of the 12F629 (factory set)?
thnx |
It is unique to each chip...
It is a simple 'RETLW x' instruction. You can put a RETLW 0x80, and the system will again work, but the clock will be off frequency. You can write a little 'test' program, to change the value fed to the clock configuration register, and toggle an output pin, till the sysem gives the 'right' frequency, then save the number used.
If the frequency is not important, then just go with 80. This is the 'power on default' value, used till the trimmed value is transferred into the OSCCAL register. The register uses the high six bits, with 0x80, giving the 'centre' frequency, 0, giving the lowest frequency, an 0xFC giving the highest frequency.
Best Wishes |
Would it be possible if u can give a sample code snippet on your suggestions?
Thank u. |
|
|
|
|
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
|