O'Reilly logo

Designing Embedded Systems with PIC Microcontrollers, 2nd Edition by Tim Wilmshurst

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

APPENDIX 2. The electronic ping-pong program
This small embedded system is a game for two players, each of whom has a push-button ‘paddle’. Either player can start the game by pressing his/her paddle. The ball, represented by the row of eight LEDs, then flies through the air to the opposing player, who must press his/her paddle only when the ball is at the end LED and at none other. The ball continues in play until either player violates this rule of play. Once this happens, the non-violating player scores and the associated LED is briefly lit up. When the ball is out of play, an ‘out-of-play’ LED is lit.
A picture of the ping-pong game is shown in Figure 1.3. Its circuit diagram appears in Figure A2.1, with its program listing forming the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required