Need Suggestions about Push Buttons

Discussion in 'Embedded Systems and Microcontrollers' started by DJ57, Mar 29, 2012.

  1. DJ57

    Thread Starter New Member

    Oct 12, 2011
    9
    0
    Hi..
    I am designing PCB containing MCU(At-Xmega32A4) as major part..
    For Reset function we can use RC Circuitry as R=10K & C=100nF using push buttons..I want to use push buttons for other purposes(to execute specific area of code(recievedata etc)). how should I connect the Push Button in this regard..

    waiting for Your Kind Suggestions.
    Thanks in Advance.
     
  2. Stuntman

    Active Member

    Mar 28, 2011
    181
    47
    It depends on how you actually implemented this RC circuit as it could do one of two things. A.) the RC circuit would be there simply to provide a time delay to avoid the reset going high before Vcc stabilized. B.) To debounce the reset button when pressed.

    As for extra buttons, they can be a simple as a pullup resistor and a button to ground. If your MCU has internal pullups, you may not even need an external resistor. But in this case, you would need to debounce the button in software.

    Before making any decisions, do some quick reading on debouncing switches.
     
    DJ57 likes this.
  3. DJ57

    Thread Starter New Member

    Oct 12, 2011
    9
    0
    Thanks allot for suggestions..
    If there are integrated pull-up resistors in the device (MCU) then we can directly connect one end of the switch to the pin and the other to ground?
     
  4. Stuntman

    Active Member

    Mar 28, 2011
    181
    47
    Yes, I do this if I am pressed for space for external components. Just remember, although this is great for keeping the component count down, you need to activate the internal pull-ups, and as previously mentioned, debounce the button in software.
     
Loading...