How are you writing to the MCUCR ? the default setting for the interrupt pins is low level detect (iscx1 = 0, iscx0 = 0), sounds like you are not actually setting the required value in the MCUCR, can you verify that the value is as you think it is. Regards --- In AVR-Chat@yahoogroups.com, "Brian" <blue_eagle74@...> wrote: > > I have asked this on the codevision site also but wondering if anyone here could help. > > I am using a mega16 Int 0 with an encoder, no sleep, WDT or other special items. > For each detent of the encoder the input to the int 0 goes from 5 - 0.5 - 5 - > 0.5 and so on, like it is designed to do. I have set the MCUCR to 0x01 for any > change, but it only responds to a negative change, so I only get an interrupt > every 2 detents of the encoder, 5 to 0.5 change. Other than this the whole > program works. I have even tried another chip. I have even tried disabling > intrupts upon entering the intrupt and enabling it with exiting. > > Why am I only getting a negative change interrupt? > Is there anything that would interfer with the MCUCR to change the level change > interrupt settings to only negative change? > > If someone could help off forum would be great! (my code is kinda messy since I > am a biginner) > > Brian >
Message
Re: int 0 problem
2009-03-30 by s.holder123@btinternet.com
Attachments
- No local attachments were found for this message.