+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 6
    Points: 921, Level: 6

    Join Date
    May 2010
    Location
    bangladesh
    Posts
    11
    Helped
    1 / 1
    Points
    921
    Level
    6

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

    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...

    •   AltAdvertisment

        
       

  2. #2
    Full Member level 4
    Points: 1,802, Level: 9

    Join Date
    Aug 2014
    Location
    Buenos Aires, Argentina
    Posts
    214
    Helped
    38 / 38
    Points
    1,802
    Level
    9

    Re: Need debouncing code for individual o/p w.r.t individual input (pic16F676)

    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.



--[[ ]]--