Jump to content







Photo

Horizontal counter

Posted by , 11 May 2005 · 71 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.

Attached Images

  • Attached Image: Hsync2.jpg





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?
  • Report
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

EricBall, on Fri May 13, 2005 10:45 AM, said:

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?
  • Report

EricBall, on Fri May 13, 2005 10:45 AM, said:

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

May 2012

S M T W T F S
  12345
6789101112
13141516171819
202122 23 242526
2728293031  

Recent Entries

Recent Comments

Tags