[PIC] Need debouncing code for individual o/p w.r.t individual input (pic16F676)

Status
Not open for further replies.

khaled01819

Newbie level 6
Joined
May 27, 2010
Messages
11
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,283
Location
bangladesh
Visit site
Activity points
1,370
I am trying to connect 6 switch on PORT A of Pic 16F676 and need debouching output on PORT C according to PORT A. Please help me with micro c code...
 

Attachments

  • 676 debouncing.rar
    5.7 KB · Views: 66

Try reading each switch with a delay and once a change is detected don't read (or increase the delay) that switch for 20ms (actually it depends the switch size, maybe the datasheet can give a maximum bounce time).

Another way is with a memory being activated when a change is detected generate a delay to read that switch for the next time.

Actually I don't have time to show a code, maybe another day.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…