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

PIC12F635 Startup code

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







PIC12F635 Startup code
PostPosted: Sun May 22, 2005 12:53 pm     Reply with quote

PCM Version 3.221 generated the following code.

Code:

#include <12F635.h>
#fuses INTRC_IO, NOWDT, MCLR, NOPROTECT, NOBROWNOUT

0000 3000       00001 MOVLW  00
0001 008A       00002 MOVWF  0A
0002 2804       00003 GOTO   004
0003 0000       00004 NOP
0004 23FF       00005 CALL   3FF
0005 1683       00006 BSF    03.5
0006 0090       00007 MOVWF  10
0007 3000       00008 MOVLW  00
0008 008A       00009 MOVWF  0A
0009 283D       00010 GOTO   03D


Since there is no oscall at 0x03ff, the "call 3ff" statement seems causing the system wait forever.

If I insert "0x3400" value at 0x03ff address using a programmer, the system runs properly. But I am not able to to do so using ICD-U40.

Is there a way to overcome this 'bug'(?) by forcing the compiler insert '0x3400' at 0x03ff address?

Rob
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun May 22, 2005 2:52 pm     Reply with quote

Read my post near the end of this thread. It tells how to use the #ROM
statement to fix this type of bug in the CCS compiler.
http://www.ccsinfo.com/forum/viewtopic.php?t=22280&highlight=rom+osccal
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