Arduino Uno 7 segement help

Discussion in 'Programmer's Corner' started by DannyKemp, Sep 3, 2014.

  1. DannyKemp

    Thread Starter New Member

    Jun 23, 2014
    Hello everyone for a basic project i wanted to create a basic circuit with the UNO and a 7 segement LED Display (common anode) i will like to a have a simple push switch that works like a simple counter with the LED display so everytime i press it the numerical value goes up by 1 on the display. As im still learning the basics can anyone help me out with the wiring setup and the code i need to get this to work?
  2. pwdixon


    Oct 11, 2012
    Easiest would be to wire the common anode to the positive rail and the segment LEDs via suitable resistors to 7 output pins. Wire a button and a pullup resistor to another processor input pin for an increment button.

    The code would be check input button for press increment a count then work out the translation of count to individual segments energised and drive those segments low to turn on the segment LEDs.
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    Also, a little more complicated hardware but simpler software is to use 4 pins for BCD and a 4511 BCD to 7 segment decoder.

    This way, you don't have to decode which segments for which number in your code.

    Just as aside, you do realize you'll have to debounce your push switch?
  5. DannyKemp

    Thread Starter New Member

    Jun 23, 2014
    Thanks guys i think im getting there :)