Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
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: 46

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top