lomex1 / arduino-pinchangeint

Automatically exported from code.google.com/p/arduino-pinchangeint
0 stars 0 forks source link

Issues with Arduino Mega #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, ran the 2560 example on my arduino mega, and also another code derived from 
the same example , which counts the falling edges at two pins but it 
is giving wrong results e.g if i press the button 3 time it'll give higer
values i.e 10, 15 etc and not give 3. Code and the screenshot of the output is 
attached. Please help and i have to use it in my final year project.

Regards, Jani.

Original issue reported on code.google.com by jani.r7...@gmail.com on 13 Feb 2015 at 9:12

Attachments:

GoogleCodeExporter commented 8 years ago
You have a bouncy switch. The count is correct. See 
https://github.com/GreyGnome/EnableInterrupt/blob/master/Interrupt%20Timing.pdf 
whereby I discuss a typical bouncy switch, and http://code.google.com/p/tigger/ 
whereby I have written code to compensate for the bounciness.

Do you have an oscilloscope so you can see the bounces for yourself?

Original comment by m...@schwager.com on 14 Feb 2015 at 1:47