SerialGmr8
Joined: 30 Nov 2007 Posts: 13
|
Int_RA |
Posted: Thu Jan 31, 2008 1:50 pm |
|
|
Hello all,
I've been trying to use the interrupt on change on the port A pins, but the compiler states that it doesnt recognise "#define int_ra".
Im using PCW Compiler versions 4.057.
my code is as follows:
Code: |
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
int8 value = 0;
#INT_RA
void portchange_isr ()
{
value= input(PIN_A0);
}
void main()
{
output_low(pin_c5);
enable_interrupts(GLOBAL);
enable_interrupts(INT_RA);
while(1)
{
if(value == 0)
{
output_low(PIN_C5);
}
else
{
output_high(PIN_C5);
}
}
}
|
I've used the same code as above for port b, except that I change int_ra to int_rb in both lines and it works fine...
can anyone please advise ? |
|