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

PIC12F629 & ENABLE_INTERRUPTS()

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



Joined: 30 Mar 2006
Posts: 5

View user's profile Send private message

PIC12F629 & ENABLE_INTERRUPTS()
PostPosted: Thu Mar 30, 2006 10:15 am     Reply with quote

Today I was examining a .lst produced by the compiler and was puzzled so I made the minimum example:

Code:

#include<C:\Program Files\PICC\Devices\12F629.h>
#FUSES NOWDT,PUT,NOPROTECT,BROWNOUT,INTRC_IO,NOMCLR

void main(void)
  {
  ENABLE_INTERRUPTS(INT_RA0|INT_RA1|INT_RA3|INT_RA4|INT_RA5)
  }

produced (with my comments added after ;'s) :
Code:

CCS PCM C Compiler, Version 3.249, 30611               30-Mar-06 16:38

....snip....

..........ENABLE_INTERRUPTS(INT_RA0|INT_RA1|INT_RA3|INT_RA4|INT_RA5);   
000F:  BSF    03.6   ; Set bit RP1 in status - reserved on 12F629!
0010:  BSF    0B.3   ; set GPIE in INTCON - ok
0011:  MOVLW  3B     ; mask for RA bits - ok,3B is the right mask
0012:  BSF    03.5   ; Set bit RP0 in status - ok back switch to bank1
0013:  BCF    03.6   ; Clear bit RP1 in status - reserved on 12F629!
0014:  IORWF  16,F   ; OR mask in W with IOC and keep in IOC
....snip....

What are the instructions at 000F and 0013 doing setting and clearing RP1 on a 12F629? The microchip data sheet says 'This bit is reserved and should be maintained as ‘0’'

No where else in my code (the real code not this little example Confused) does 03.6 or 03.7 get used only 03.5

Regards, Mark Leman
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 30, 2006 12:50 pm     Reply with quote

You may have found a long-term bug. I checked PCM vs. 3.191 and
it does the same thing.
markleman



Joined: 30 Mar 2006
Posts: 5

View user's profile Send private message

PostPosted: Thu Mar 30, 2006 3:08 pm     Reply with quote

Question is : is it actually going to stop the code working?

So far I think not but I can't rely on that being the case so I think for the moment a little inline assembler might have to go in Sad
markleman



Joined: 30 Mar 2006
Posts: 5

View user's profile Send private message

PostPosted: Thu May 11, 2006 7:34 am     Reply with quote

This problem has been comfirmed by CCS and they say

"This problem is fixed in our version 4 release. We are late getting it out.
Sorry for the delay."
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