AVR ATMEGA88 PCINT PROBLEM

Feb 26, 2007 2 Replies

Hi,



I am trying to use the PCINT0 interrupt on the Atmega88 chip but an unable to get it working. i want it to work for pin number 12, 13 and 14 ie PCINT0, PCINT1 and PCINT2 respectively.



i am initializing it as



main(){ PCIFR = 0X01; PCMSK0 = 0X07; Sei(); }



AND



ISR(PCINT0_vect){ send_byte(1); }



The ISR is not getting fired using only this code. Am i missing out on some initialization. Kindly help me out.



Thanks, Rohan.



You need to set the interrupt enable bit in the PCICR register, not the PCIFR register.

Thanks a lot. Thats the obvious problem. How small things are overlooked unless someone else looks at it.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required