[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Brads Electronic Projects Forum • Pong Table Button Problem
Page 1 of 2

Pong Table Button Problem

Posted: Mon May 30, 2011 8:32 pm
by ibrahim
I finished pong table but buttons don't work.There is number "9" appears and ıf I push the mode button continuously, countdown start and game begins but if I leave the mode button screen come back to number "9".
Has anybody had same problem.If so;Could you please tell me how solve it?Or has anyone finished pong table without buttons problem.(maybe mine is individual problem which caused by my programmer)

Re: Pong Table Button Problem

Posted: Tue May 31, 2011 12:53 pm
by brad
If you could post a video with what happens it would certainly help me see whats going on.

When I get the time I will make the new version of the board and try it out - I have just been tied under with all sorts of other things lately.

Re: Pong Table Button Problem

Posted: Tue May 31, 2011 9:54 pm
by ibrahim
unfortunately, I dont have camera so that I can not post a video :(

All I want to know if anybody finished pong table with new board which has got mode, player select pads.
If anybody done this without button problem it shows me I have got hardware or software problem.
If anybody had same problem as I explained it shows there is a common problem.

Re: Pong Table Button Problem

Posted: Wed Jun 01, 2011 8:07 pm
by brad
I think there has been six or 7 other people who have bought a board, but I have had no emails saying there have been errors.

I will certainly let you know how I go when I test my circuit though.

Re: Pong Table Button Problem

Posted: Tue Jun 07, 2011 3:32 pm
by ibrahim
I am looking forward to hearing from you

Re: Pong Table Button Problem

Posted: Wed Jun 08, 2011 4:56 pm
by brad
I will have some time this weekend to build it. I will let you know what I find :D

Re: Pong Table Button Problem

Posted: Sat Jun 11, 2011 12:38 am
by brad
Okay, I finally got around to rebuilding the project with the new board.

Everything works fine for me - Just use the code as is in the download file (no modifications are needed)

Instead of connecting your buttons to the designated button pads on the board, connect them instead to expansion port pin D and pin E.

You will need to make it so that the buttons will output a logic 0 when not pressed and a logic 1 when pressed.

That's all you (should) need to do to get it to work, because that's how I got mine to work!

Re: Pong Table Button Problem

Posted: Thu Jun 16, 2011 6:22 pm
by ibrahim
My button problem has been solved now.... :D :D :D
Thank you very much..

Re: Pong Table Button Problem

Posted: Fri Jun 17, 2011 1:37 am
by bitfogav
ibrahim wrote:My button problem has been solved now.... :D :D :D
Thank you very much..
What was the problem with your buttons?

Re: Pong Table Button Problem

Posted: Fri Jun 17, 2011 6:06 am
by brad
bitfogav wrote:
ibrahim wrote:My button problem has been solved now.... :D :D :D
Thank you very much..
What was the problem with your buttons?
I'm interested also, how did you fix it in the end?

Re: Pong Table Button Problem

Posted: Mon Jun 20, 2011 3:42 pm
by ibrahim
Hi Bitfogav,

My botton problem was I could not control mode and player select function by using buttons.
Circuit was working as I explained above.

Hi Brad,

How I fixed it;I changed circuit as in schematic.
SuperPongTable1.jpg
SuperPongTable1.jpg (41.9 KiB) Viewed 23496 times
I add 10k resistors from expansion pads D and E to gnd.Without these pull down resistors I could not control buttons.I don't know why , I just only tried and it works...
I also had led problem like, some led were lit randomly.I thougt that it is caused by 74373 vcc and gnd wire thinness so I add capacitor for each 74373 and make vcc and gnd wire thicken.Maybe mine is caused by my led current but if somebody has same problem I would advise that apply what I done...

Re: Pong Table Button Problem

Posted: Mon Jun 20, 2011 8:28 pm
by brad
That is really strange that it works for you like that and not the other way :?

When you press your button, you are actually getting 1/2 VCC applied (due to the voltage divider)

However, I am very glad that it is all working :D

Re: Pong Table Button Problem

Posted: Mon Jun 20, 2011 9:20 pm
by ibrahim
Yes you right,it is very interesting but ıt is the only way that I could control the buttons.Maybe it is related with the expansion port output lojic level.I mean when I check the port D,E by oscilloscope there is 200-150 milivolt (it is lojic 0) without pressing the buttons.By adding pull down resistor expansion D and E outputs goes to real zero and when I press the button I apply 1/2 vcc to port D,E and ıt works.

Thank you so much for all your help I really appreciate it...

Re: Pong Table Button Problem

Posted: Tue Jun 21, 2011 3:37 am
by bitfogav
That is a strange setup for setting up buttons on a PIC. But I think your find that you will need the pull-down resistors for the circuit to work, the Expansion Port is working correctly (the logic levels?, Or pins that are not connected are left floating).

The PIC would read a logic 1 at a voltage around 1.5volts approx and above, so when you press the button you would get about 2.5volts. (with your votage divider)

I think this would be more of a suitable circuit for your buttons (obviously you need to do this with both buttons)
buttoncircuit2.jpg
buttoncircuit2.jpg (8.3 KiB) Viewed 23480 times

Re: Pong Table Button Problem

Posted: Tue Jun 21, 2011 4:29 am
by bitfogav
I think Ive found a problem to another button issue.

While I was looking at the super pong table design and code, Ive noticed that if you connect the buttons to the Mode/Select connections on the board. then no matter what you do the buttons wont work?, as the connections for Mode/Select are not programmed in the code?

These pins (Mode/Select) are connected to PORTA.4 & PORTA.5 (not used in the code, unless im missing something Brad?)

Also if you do connect the buttons to the Mode/Select connections on the board then you will need to make the buttons output a logic 0 when pressed. as the resistors on the board connected to the buttons go to 5volt power supply. As Brad has documented in the schematics.
pongbuttons1.jpg
pongbuttons1.jpg (7.6 KiB) Viewed 23480 times

Heres a picture showing that the resistors for the Mode/Select connections are connected to the 5v power supply
buttonPCB.jpg
buttonPCB.jpg (35.85 KiB) Viewed 23481 times