MC6845 to the reference. It is programmed in character row times. Interlace Mode Register (R8) — This 2 bit write-only register controls the raster scan mode (see Figure 11). When bit 0 and bit 1 are reset, or bit O is reset and bit 1 set, the non-interlace raster scan mode is selected. Two interlace modes are available. Both are interlaced 2 fields per frame. When bit 0 is set and bit 1 is reset, the interlace sync raster scan mode is selected. Also when bit O and bit 1 are set, the interlace sync and video raster scan mode is selected. Maximum Scan Line Address Register (R9) — This 5 bit write-only register determines the number of scan lines per character row including spacing. The programmed value is a max address and is one less than the number of scan lines. OTHER REGISTERS Cursor Start Register (R10) — This 7 bit write-only register controls the cursor format (see Figure 10). Bit 5 is the blink timing control. When bit 5 is low, the blink frequency is 1/16 of the vertical field rate, and when bit 5 is high, the blink frequency is 1/32 of the vertical field rate. Bit 6 is used to enable a blink. The cursor start scan line is set by the lower 5 bits. Cursor End Register (R11) — This 5 bit write-only register sets the cursor end scan line. Start Address Register (H & L) (R12, R13) — Start Address Register is a 14 bit write-only register which determines the first address put out as a refresh address after vertical blanking. It consists of an 8 bit lower register, and a 6 bit higher register. Light Pen Register (H & L) (R16, R17) — This 14 bit read-only register is used to store the contents of the Address Register (H & L) when the LPSTB input pulses high. This register consists of an 8 bit lower and 6 bit higher register. Cursor Register (H & L) (R14, R15) — This 14 bit read/write register stores the cursor location. This register consists of an 8 bit jower and 6 bit higher register. CURSOR The Cursor Start and End Registers allow a cursor of up to 32 scan lines in height to be placed on any scan lines of the character block as shown in Figure 10. Using Bits 5 & 6 of the Cursor Start Register, the cursor is programmed with blink periods of 16 or 32 times the field period. Optional non-blink and non-display modes can also be selected. When an external 2X blink on characters is required, it may be necessary to perform cursor blink externally as well so that both blink rates are synchronized. Note that an invert/non-invert cursor is easily implemented by programming the CRTC for blinking cursor and externally inverting the video signal with an exclusive-OR. The cursor is positioned by changing the contents of registers R14 and R15. The cursor can be placed at any of 16K character positions, thus facilitating hardware paging and scrolling through memory without loss of the cursor’s original position. @) MOTOROLA Semiconductor Products inc. INTERLACE/NON-INTERLACE DISPLAY MODES An illustration of the 3 raster scan modes of operation is shown in Figure 11. Normal syne mode is non-interlace. tn this mode, each scan line is refreshed at the vertical field rate (e.g., 50 or 60 Hz). Frame time is divided into even and odd alternating fields. The horizontal and vertical timing relationship results in the displacement of scan lines in the odd field with respect to the even field. When the same information is painted in both fields, the mode is called “‘Interlace Sync;” this is a useful mode for enhancing readability by filling in a character. When the even lines of a character are displayed in the even field and the odd lines in the odd field, the mode is called “Interlace Sync and Video.” This last mode effectively doubles the character density on a monitor of a given bandwidth. The disadvantage of both interlace modes is an apparent flicker effect, which can be reduced by careful monitor design. There are restrictions on the programming of CRTC registers for interlace operation: 1) Horizontal total character count, Nyy must be odd (i.e., an even number of character times) 2) For Interlace Sync and Video mode only, the max scan line address, Ne}, must be odd (i.e., an even number of scan lines) 3) For Interlace Sync and Video mode only, the Vertical Displayed Total characters must be even. The programmed number, Nyq, must be one-half the actual number required. 4) For Interlace Sync & Video mode only, the Cursor START and Cursor End Registers must both be even or both odd. LIGHT PEN The contents of the CRTC Address Counter are strobed into R16/R17 Light Pen Registers on the next high to low CLK transition afterLPSTB goes high. In most systems, the light pen signal would also cause a processor interrupt routine to read R16/R17. Slow light pen response requires the processor software to modify the captured address read from R16/R17 by a calibration factor. ‘ PROGRAMMING CONSIDERATIONS Initialization — Registers RO-R15 must be initialized after power is turned on. The processor normally loads the CRTC registers sequentially from a firmware table. Henceforth, RO-R11 are not changed in most systems. The 6800 program in Table 3 and Figure 12 shows a typical CRTC initialization. Hardware Scrolling — Registers R12/R13 contents determine which memory location is the first displayed character on the screen. Since the CRTC Linear Address Generator counts from this beginning count, the displayed portion of the screen may be a window on any continuous string of characters within a 16K block or refresh memory. By centering the R12/R 13 pointer in the middle of the available memory space, scrolling up or down is possible... by line, page, or character.