Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location,

about Tennis For Two on scope

edited March 2013 in Microcontrollers


I just finish building Tennis For Two based on ATMEGA µc according on this article :

But I have a strange problem. Scope display all I need but the ball goes to the opposite and don't pass above the net. For example, when the left player serves, the ball goes to the... left.

All seem to be well wired, the display is good. I don't find why the ball goes to the wrong way. Any idea ?


  • This may have to do with the "paddle" inputs.  If they are at the edge of the range, IIRC, they can serve backwards.
  • edited March 2013

    Thank for your help ;)

    The range of the paddle don't change. The ball always goes to the opposite side. I notice when paddle is unpluged, scope displays the ball that changes side continuously, like if the players always pushed the button. But same thing, ball goes in the wrong way. 

    I have good voltage on ADC lines from 0 to 5v when I turn the knob. Other thing, at the serve :

    at the left side, ball goes on upper left.
    at the right side, ball goes to bottom right.

    Both paddles share the same vcc and gnd. It's good ?

  • Do you have the 10k pull-up resistor in place?

    And, are you sure that your buttons are "normally-open" types?

    Check to be sure that the button input pins on the AVR show 5V until hou press the button.
  • edited March 2013

    Yes, I have mounted the 10k resistor and the push button is open type.

    On the right player side, PC5 pin shows :

    - 4.3v when button is open

    - 0v when button is pushed

  • What is your power supply voltage?

    And, are you sure that there's a good ground connection between the paddles and the AVR?

    If no buttons are pressed, what happens?
  • Also, double check that you have +V at pins 20 and 21.
  • edited March 2013

    I feed with 5v provided by a PC PSU, but I can test with batery.

    Ground connection is OK, my multimeter show 0 ohm everywhere on ground circuit

    When no buttons are pressed the ball don't move, floats and falls automatically after 30s.

    I wonder if it comes from pot. I bought this one :

    I plug wires like this :

    - brown (ADC) in center
    - green (GND) at left
    - orange (VCC) at right with 10k resistor

    On button :

    - blue (PC) with 10k resistor
    - green GND

    V+ is independent on each paddle or can I use one V+ for both ?

  • Pin 20 shows 0v

    pin 21 shows 4.3v

  • You need to connect pin 20 to V+.
  • Yes ! You'r right. Indeed pin 20 was not connected, I thought according the diagram that pins 20 et 21 had the same purpose and I connected only pin 21 to provide power to paddle. Now it works flawlessly.

    Very thank for your help and your work and effort to resitute this first video game.

  • Great-- glad to hear it!
This discussion has been closed.