I have introduced a delay of ms Mili-Second. For example, if you do not introduce delay and press the push button, it will process a single press as multiple presses. We need to debounce the switch because it prevents from processing multiple presses. We are going to check the status of the particular pin- declared as the input pin. The program is pretty much straightforward. Then according to the status of the pin, we will command LED to turn on or off. If the button is pressed or released, its value is going to change. Then continuously monitoring the status of the pin it is connected. It is used to give user input to the microcontroller. A push-button works just like a switch works. We can do this by declaring a suitable value to DDR register. ![]() ![]() In this tutorial post, I am going to guide you about interfacing of push button with Atmega16 microcontroller.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |