Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Name:- EX4_2_INT_RB0_Pin_DeBounce Description:- The previous exercise is prone to switch bounce, when using a mechanical switch as the input to the interrupt pin (i.e.

image text in transcribed

Project Name:- EX4_2_INT_RB0_Pin_DeBounce Description:- The previous exercise is prone to switch bounce, when using a mechanical switch as the input to the interrupt pin (i.e. RB0), when used on a real hardware implemention as a single press of PB0 can result 2 it triggering multiple interrupts. This exercise also uses a pushbutton (PB0) connected to the external INT input (i.e. on pin RB0) of the PIC16F188 to trigger an interrupt everytime the hutton is pressed. However, within the ISR after an interrupt occurs from a button press, this program will disable the interrupt so multiple interrupts cannot occur. It also sets a global software flag (i.e. variable) to alert the main while loop that the button is pressed. Inside, the main while loop you can detect the button has been pressed by checking the global flag bit, and then use the get_PBO previously used in Exercise 2 to check that the switch has a stable low (i.e. switch is released) to ensure that it has been released. Once the button has been released with no further glitches occuring, then the Interrupt can be turned back on again

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

Identify how culture affects appropriate leadership behavior

Answered: 1 week ago