Jump to content
  • entries
    39
  • comments
    57
  • views
    123,390

Horizontal counter

Sign in to follow this  
Guest

1,520 views

The next stage is the horizontal counter.

 

 

 

 

The 7 MHz clock signal enters F8 which is a 4-bit binary counter. The clock is divided in half producing the 1H signal which is the low bit of the horizontal counter. Each stage of F8 divides the signal in half again producing 2H, 4H, and 8H. F9 continues the division producing 16H, 32H, 64H and 128H. Finally the clock is divided in half one more time by F6 to produce 256H and an inverted version called /256H. (I use the ‘/’ before a signal name to indicate that it’s an active low signal).

 

The NAND gate F7 is used to reset the counters when the end of a horizontal line has been reached. The gate is connected to 256H, 128H, 64H, 4H and 2H, so the output of the gate goes low when count 454 is reached (256+128+64+4+2). The output of the NAND gate will get clocked through E7 on the next rising edge of CLK (actually the 455th count), to the HRESET signal. HRESET will reset the horizontal counter back to 0. On the next clock the output of the NAND will be high, which will be clocked through E7 and return HRESET high, thus allowing the counters to start counting again.

Sign in to follow this  


3 Comments


Recommended Comments

Interesting - 455 pixels per line. That's a familar number to anyone who's worked with NTSC. I'm going to take a guess that there is a similar vertical counter which resets after 262 lines.

 

One question; why is QA looped back to CLKB?

Share this comment


Link to comment

Yes you are correct, the vertical counter counts to 262 lines before reset.

 

The 7493 is a four bit binary counter, but the first stage of the counter is not connected internally to the other three stages. The output of the first stage comes out on QA and the clock for the second stage is CLKB, so they need to be connected together to form the full 4-bit counter.

 

Dan

 

Interesting - 455 pixels per line.  That's a familar number to anyone who's worked with NTSC.  I'm going to take a guess that there is a similar vertical counter which resets after 262 lines.

 

One question; why is QA looped back to CLKB?

Share this comment


Link to comment
Interesting - 455 pixels per line. That's a familar number to anyone who's worked with NTSC. I'm going to take a guess that there is a similar vertical counter which resets after 262 lines.

Hmm - and that's twice the 2600's pixel clock count, so that would mean the 2600 uses pixels that are twice the width of pixels used in Pongs.

Share this comment


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...