Jump to content
  • entries
    39
  • comments
    57
  • views
    124,808

Score Part 2


Guest

969 views

Next we will look at where the digit inputs to the score decoder come from. As I mentioned before there are two, two digit scores displayed in Pong, one for each player. Since there is only one score decoder, there needs to be a way to select which digit is being fed to the decoder at each point on the screen. The circuit that performs this function is composed of two 4-line to 1-line data multiplexer chips:

 

blog-184-1123706825_thumb.jpg

 

The inputs to the multiplexers come from the score counters, which we will cover at a later date. The counters have a 5 bit output, and are labeled SCORE1_1, SCORE1_2, SCORE1_4, SCORE1_8, SCORE1_10 for player one and SCORE2_1, SCORE2_2, SCORE2_4, SCORE2_8, SCORE2_10 for player two. The outputs, labeled A, B, C, and D go to the inputs of the score decoder. The selection signals to the multiplexers are connected to 32H and 64H. When both inputs are low, the tens digit of player one’s score is fed to the decoder. When 32H is high and 64H is low, the ones digit of player one’s score is fed to the decoder. 64H high and 32H low selects player two’s tens digit, and 64H high and 32H high select player two’s ones digit. So let’s look at the two states for player one’s score. 32H low, 64H low A = High, B = /Score1_10, C = /Score1_10, D = /Score1_10 This state generates the tens digit for player one’s score. When SCORE1_10 is high (score is greater the 9), B, C, D are going to be low. Since A is tied high the output of the mux will be 1. When SCORE1_10 is low, A, B, C and D are all going to be high, and as we discussed earlier, when all ones are present at the input of the decoder it turns off all the segment outputs. The result of this is that when the score is less then 10, the tens digit gets blanked out instead of displaying a zero. 32H high, 64H low A = SCORE1_1, B = SCORE1_2, C = SCORE1_4, D = SCORE1_8This state generates the ones digit for player one’s score. This simply applies the four low bits of the score counter to the decoder to produce the digits 0 to 9.32H low, 64H high and 32H high, 64H high, work the same way, just with player two’s score.

3 Comments


Recommended Comments

I like this blog! When is the next bit due?

 

It helps me learn how a Pong game works (i've got a broken Clone one here).

 

Thanks!

Link to comment

New chapter is up now!

 

I takes me a while to put each chapter together since I am posting things as I go along. Drawing the schematics based on the really poor quality scans I have is the hardest part and takes a bit of time.

 

Dan

 

I like this blog! When is the next bit due?

 

It helps me learn how a Pong game works (i've got a broken Clone one here).

 

Thanks!

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...