402-00005-00
Registers
3–34
Rev 02; February 8, 2002
3.4.4.1 Horizontal Offset (HOFF) R/W
HOFF defines the horizontal offset for the Programmable Window Generator (PWG). The 10-bit value determines
the location of the first valid pixel of each line relative to the selected edge of the Hsync input. Hsync is defined by the
programmed timing mode; XTAL or PLL. The PWG horizontal counter is loaded and enabled with the selected edge
of LEN and will count until the last pixel is loaded into the memory frame. HOFF defines the count that starts loading
memory. Refer to Chapter 2 “Programmable Window Generator” (starting on page 2–29) for details on the relation-
ship of HOFF to HACT and Hsync.
Use the following formula to calculate HOFF:
HOFF = (number of pixels from LEN to active video) – 2
HOFF
Function
0
Start loading memory 1 pixel Clock after LEN edge
1
Start loading memory 2 pixel Clocks after LEN edge
2
Start loading memory 3 pixel Clocks after LEN edge
3
Start loading memory 4 pixel Clocks after LEN edge
. . .
. . .
1023 (0x3FF)
Start loading memory 1024 pixel Clocks after LENedge
3.4.4.2 Horizontal Active (HACT) R/W
HACT determines the amount of valid pixels in each horizontal line. The 12-bit value is the pixel count of the hori-
zontal counter on which to stop loading the memory. The Programmable Window Generator (PWG) horizontal
counter starts counting off the selected edge of Hsync. HACT determines the number of pixel clocks to stop loading
the memory. When the counter stops, the EOL (end of line) is loaded. PCVisionplus uses the EOL to determine the
end of a horizontal line. The horizontal active region (HACT – HOFF) must be a whole multiple of 8.
Use the following formula to calculate HACT:
HACT = # pixels from LEN to end of desired active video region – 2
HACT
Function
0
End loading memory 1 pixel clock after LEN edge
1
End loading memory 2 pixel clocks after LEN edge
2
End loading memory 3 pixel clocks after LEN edge
3
End loading memory 4 pixel clocks after LEN edge
. . .
. . .
4095 (0xFFF)
End loading memory 4096 pixel clocks after LEN edge
NOTE
The number of active pixels must be divisible by 8.
# active pixels = (HACT +2) – (HOFF + 2)
Changing HOFF will change the active region loaded into the memory; therefore, you must compensate any change
in HOFF by an equal amount in HACT. If you increase HOFF by 1 pixel, you must reduce the number of active pixels
loaded into memory by 1. If the active region was previously divisible by 8, the 1 pixel change in offset causes the
active to no longer be divisible by 8. Compensate for the change in HOFF by changing HACT to maintain the 8 pixel
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com