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 CCS Technical Support

12F629 issues

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



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

12F629 issues
PostPosted: Sun Mar 11, 2007 4:42 pm     Reply with quote

I don't understand why the MCLR fuse is ignored and reset to NoMCLR when the
#DEVICE ICD=TRUE statement is included
The ICD40 will program the chip and it will run but the CCS debugger errors out No MCLR or Clock I'm assuming its because the MCLR FUSE was ignored and overridden to NOMCLR turning GP3 into an I/O pin.
I know the ICD40 and the CCS IDE with built in debugger takes over
GP0(PG data) GP1(PG clock) GP3(MCLR) and another GP for debug printing to the monitor window. Leaving only two application pins so its not ideal but it should at least work.
Is there a way to override CCS's override of the FUSES statement.
Code:

CCS PCM C Compiler, Version 3.249

               

               ROM used: 60 words (8%)
                         Largest free fragment is 708
               RAM used: 3 (6%) at main() level
                         4 (8%) worst case
               Stack:    1 locations

*
0000:  NOP
0001:  MOVLW  00
0002:  MOVWF  0A
0003:  GOTO   004
0004:  CALL   3FF
0005:  BSF    03.5
0006:  MOVWF  10
0007:  MOVLW  00
0008:  MOVWF  0A
0009:  GOTO   01F
.................... #include <12F629.h>
.................... //////// Standard Header file for the PIC12F629 device ////////////////
.................... #device PIC12F629
.................... #list
....................
.................... #device ICD=TRUE
.................... #fuses INTRC_IO, NOWDT, MCLR, PUT, BROWNOUT
.................... #use delay(clock=4000000)
000A:  MOVLW  24
000B:  MOVWF  04
000C:  MOVF   00,W
000D:  BTFSC  03.2
000E:  GOTO   01E
000F:  MOVLW  01
0010:  MOVWF  21
0011:  CLRF   20
0012:  DECFSZ 20,F
0013:  GOTO   012
0014:  DECFSZ 21,F
0015:  GOTO   011
0016:  MOVLW  4A
0017:  MOVWF  20
0018:  DECFSZ 20,F
0019:  GOTO   018
001A:  NOP
001B:  NOP
001C:  DECFSZ 00,F
001D:  GOTO   00F
001E:  RETLW  00
....................
.................... //==========================
.................... //#rom 0x3FF = {0x3480} //// sets the internal oscillator to mid freq near 4mhz
....................                       ///  if the location 0x3FF is erased in error the osc won't run
.................... // config word at 0x2007  should be {0x31E4}
....................
.................... void main()
.................... {
001F:  CLRF   04
0020:  MOVLW  1F
0021:  ANDWF  03,F
0022:  MOVLW  07
0023:  MOVWF  19
....................
.................... while(1)
....................    {
....................     output_high(PIN_A4);
0024:  BSF    03.5
0025:  BCF    05.4
0026:  BCF    03.5
0027:  BSF    05.4
....................     delay_ms(500);
0028:  MOVLW  02
0029:  MOVWF  23
002A:  MOVLW  FA
002B:  MOVWF  24
002C:  CALL   00A
002D:  DECFSZ 23,F
002E:  GOTO   02A
....................     output_low(PIN_A4);
002F:  BSF    03.5
0030:  BCF    05.4
0031:  BCF    03.5
0032:  BCF    05.4
....................     delay_ms(500);
0033:  MOVLW  02
0034:  MOVWF  23
0035:  MOVLW  FA
0036:  MOVWF  24
0037:  CALL   00A
0038:  DECFSZ 23,F
0039:  GOTO   035
....................    }
003A:  GOTO   024
....................
.................... }
003B:  GOTO   03B

Configuration Fuses:
   Word  1: 3184   NOWDT NOCPD NOPROTECT NOMCLR PUT INTRC_IO NOBROWNOUT
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

Found it
PostPosted: Sun Mar 11, 2007 6:18 pm     Reply with quote

The device editor allows the ICD debug profile to be edited and the override of MCLR was there and can be edited.
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