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

Help with CN Interrupt

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



Joined: 03 Mar 2009
Posts: 24

View user's profile Send private message

Help with CN Interrupt
PostPosted: Tue Mar 03, 2009 1:06 pm     Reply with quote

I am new in CCS and C compilers in general and need some help. Currently I am running some project with PIC24FJ32GA002 and facing a strange problem setting-up interrupt on pin change.
At the top I have:
Code:
#pin_select INT1=PIN_B4

Somewhere below in initialization I have:
Code:

set_pullup(true,Pin_B4);
enable_interrupts(INTR_CN_PIN|Pin_B4);

To test this interrupt I am activating LED:
Code:
#INT_CNI
void Button()
 {
   B_LED = ~B_LED;
 }

When I am trying to compile the code I am getting Error 27 for both lines were initializing Pin_B4 :
Quote:
“**** Expression must evaluate to a constant :: NOT a CN pin.”

Pin B4 is a CN1 pin.
Any help?
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