Hello to everyone in this forum. I am a beginner at learning assembly programming. My question is regarding the following assembly code that was written for ATmega328P using Atmel studio. Whenever the PD2 is low, output at PB5 is toggled.
HERE: JMP HERE
I uploaded this to AVR controller and now I having bouncing(occasionally more than one input is taken) issues with the switch. I am aware that the two solutions are either using a capacitor or using a delay. I would really appreciate if someone here could help with implementing a delay to this program.
Thank you very much for your time and attention.