EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / My goal is to do software

My goal is to do software

|

Microcontroller › AVR › 4×4 Keypad Debounce › My goal is to do software

June 18, 2015 at 7:31 am #12999
Setebwer
Participant

My goal is to do software debounce. I've made this code that's working only for * 0 # D buttons. So while I'm pushing * MCU is waiting. How should I modify this code for debouncing 1, 2 ,3, 4, 5, 6, 7, 8, 9, A, B, C buttons as well?

int main(void)

{

while(1)

{

…

if(keypad==0) // When zero is pushed…

{

while(!(PINC&(1<<PC5))); //Waiting while zero is pushed

_delay_ms(50);

}

}

 

}

My 4×4 keypad hardware connections to AVR

DDRC=0b00001111; //upper 4 bits are declared input and lower 4 bits are declared output(4×4 Keypad is connected)    
PORTC=0b11111111;//lower 4 bits are given high value and pull-up are enabled for upper 4 bits

RSS Recent Posts

  • RC Electronic Speed Control Capacitors February 11, 2026
  • ANOTHER OLD PROJECT REDO February 11, 2026
  • XLR splitter to mono. February 11, 2026
  • CR2/CR123A Batteries In Projects February 11, 2026
  • Variable audio oscillator February 11, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise