gilavar
Joined: 03 Mar 2009 Posts: 24
|
Help with CN Interrupt |
Posted: Tue Mar 03, 2009 1:06 pm |
|
|
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? |
|