Help in 8051 simple project ..

Discussion in 'Embedded Systems and Microcontrollers' started by duck, Nov 15, 2010.

  1. duck

    Thread Starter New Member

    Sep 6, 2010
    I want to make a simple program of adding two numbers through microprocessor and have to show its output.

    I want to use a dipswitch at input and LEDs for output. I am done with processor programming and want help in hardware circuitry.

    How do we connect dipswitch and LEDs ? do we ground them through resistor or give VCC through resistor ??
  2. mik3

    Senior Member

    Feb 4, 2008
    Generally, you can do both as far as the outputs of the device are not of the open collector type. Which method is better depends on the circuit and the current source/sink capability of the device driving the LEDs.
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    you would sink your port to ground with switches/resistors, and you'd sink your LED current through your port, but only if it had the drive capability.