hello all,I am using atmega328(without arduino,but programmed using arduino) in my project where in I am checking input from sensor on analog pin.if it is HIGH necessary action is taken.But even when no input is given by sensor,atmega shows HIGH signal.Is this related to analog reference?

hello all,I am using atmega328(without arduino,but programmed using arduino) in my project where in I am checking input from sensor on analog pin.if it is HIGH necessary action is taken.But even when no input is given by sensor,atmega shows HIGH signal.

What sensor, what circuit, what code? My crystal ball isn't working today.

Yes if you hold down the button for say one second it will be executed about 1000 times.All it does is check if the button is down, it does not check that it has just gone down. In other words it checks for a level not an edge.