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

INT_RTCC Undefined...

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



Joined: 09 Oct 2008
Posts: 16

View user's profile Send private message

INT_RTCC Undefined...
PostPosted: Wed Nov 30, 2011 10:47 am     Reply with quote

Here is a little test program which illustrates the issue, zero function to it.
I'm using MPLAB 8.80 and CCS 4.124.

The compiler says, 'Invalid pre-processor directive' and 'Undefined identifier INT_RTCC'
I have looked in the datasheet and this part appears to have interrupts, as this was the reason for this error in a previous topic. I'm a little stumped.
Code:
#include <12F1840.h>

int i;

#INT_RTCC
void clock_isr()
{
  i++;   
}

void main()
{
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   set_rtcc (0);
   
   enable_interrupts (GLOBAL);
   enable_interrupts (INT_RTCC);

   while(1);
}
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 11:00 am     Reply with quote

Try #INT_TIMER0 instead. CCS have been trying to wean folks off the old style RTCC definitions for ages. The reason for this is probably as many PICs have a true RTC peripheral these days. Though not the PIC12F18740.

RF Developer
Wipster



Joined: 09 Oct 2008
Posts: 16

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 11:10 am     Reply with quote

Ahha yep, golden. Cheers for that! Going to go over the .h with a fine tooth comb and check everything next time, would have spotted the lack of RTCC.
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