Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

int 0 problem

2009-03-30 by Brian

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.