Phytec pciGrabber4x4 User manual

A product of a PHYTEC Technology Holding company
Grabber-4x4
Hardware-Manual
Edition January 2009

pciGrabber-4x4
PHYTEC Messtechnik GmbH 2008 L-720e_0
In this manual are descriptions for copyrighted products that are not explicitly
indicated as such. The absence of the trademark () and copyright () symbols
does not imply that a product is not protected. Additionally, registered patents and
trademarks are similarly not expressly indicated in this manual.
The information in this document has been carefully checked and is believed to be
entirely reliable. However, PHYTEC Messtechnik GmbH assumes no
responsibility for any inaccuracies. PHYTEC Messtechnik GmbH neither gives
any guarantee nor accepts any liability whatsoever for consequential damages
resulting from the use of this manual or its associated product. PHYTEC
Messtechnik GmbH reserves the right to alter the information contained herein
without prior notification and accepts no responsibility for any damages which
might result.
Additionally, PHYTEC Messtechnik GmbH offers no guarantee nor accepts any
liability for damages arising from the improper usage or improper installation of
the hardware or software. PHYTEC Messtechnik GmbH further reserves the right
to alter the layout and/or design of the hardware without prior notification and
accepts no liability for doing so.
Copyright 2009 PHYTEC Messtechnik GmbH, D-55129 Mainz.
Rights - including those of translation, reprint, broadcast, photomechanical or
similar reproduction and storage or processing in computer systems, in whole or
in part - are reserved. No reproduction may occur without the express written
consent from PHYTEC Messtechnik GmbH.
EUROPE NORTH AMERICA
Address: PHYTEC Technologie Holding AG
Robert-Koch-Str. 39
D-55129 Mainz
GERMANY
PHYTEC America LLC
203 Parfitt Way SW, Suite G100
Bainbridge Island, WA 98110
USA
Ordering
Information:
+49 (800) 0749832
Technical
Support: +49 (6131) 9221-31
Fax: +49 (6131) 9221-33 1 (206) 780-9135
Web Site: http://www.phytec.de http://www.phytec.com
1
rd
Edition January 2009

Contents
PHYTEC Messtechnik GmbH 2008 L-720e_0
1
Introduction.........................................................................................1
2
Delivery Contents/ Technical Data....................................................4
2.1
Accessories...................................................................................5
2.2
Technical Data VD-012(-X1)(-X2)..............................................6
2.3
Field of Applications and Safety Regulations............................10
2.4
Addresses and Resources ...........................................................11
2.5
Socket Pinout..............................................................................13
2.5.1
Composite Inputs ..........................................................15
2.5.2
S-Video Connection......................................................16
2.6
I
2
C Interface ...............................................................................17
2.7
Jumper on pin header row X900 ................................................17
2.8
Notes on CE-Conformance and Immunity against Interference 18
2.9
Option Port .................................................................................19
3
Installation of the Grabber Card.....................................................20
3.1
Installing the Grabber Card........................................................20
3.2
Installing the Driver ...................................................................22
3.2.1
Additional Drivers (optional)........................................24
3.3
Installing the Demo Program .....................................................25
4
Connecting Video Sources................................................................26
4.1
Possible Video Connections.......................................................28
4.1.1
The S-Video Cable........................................................30
4.1.2
The Composite Cable....................................................30
4.2
Extension Card VZ-012 .............................................................31
4.3
Overview about all video inputs.................................................34
5
Start-Up of the Grabber with Demo Programs .............................37
5.1
The parallel image processing....................................................45
5.2
Demo Program Description........................................................48
5.3
Image Control.............................................................................54
5.4
Additional Functions Under Image............................................55
5.5
Crosshair function (Overlay)......................................................56
5.6
Special Functions .......................................................................56
5.7
Storing Images, Ending the Program .........................................64
5.8
Getting Started with Linux.........................................................64
6
Driver Software.................................................................................66
6.1
Technical Basics.........................................................................67
6.1.1
Block Diagram of the pciGrabber-4x4..........................67
6.1.2
The Videosignal and Digitization .................................70
6.1.3
Transfer and storage of color ........................................72
6.1.4
Data storage by DMA and RISC-Program ...................74
6.2
Driver for Microsoft Windows...................................................78
6.2.1
Requirements.................................................................79

pciGrabber-4x4
PHYTEC Messtechnik GmbH 2008 L-720e_0
6.2.2
Application of the Device Driver for Windows NT4.0 80
6.2.3
Application of the Device Driver for Windows 2000 /
XP / VISTA................................................................... 84
6.2.4
Application of the DLL................................................. 85
6.2.5
Application of the Windows XP/VISTA
TM
Windows
NT4.0
TM
/ Windows 2000
TM
DLLs............................... 86
6.2.6
Programming under Delphi .......................................... 87
6.2.7
Description of the DLL in Existing Functions.............. 89
7
Trouble-Shooting ............................................................................ 143
Index ......................................................................................................... 148

Contents
PHYTEC Messtechnik GmbH 2008 L-720e_0
Index of Figures
Figure 1:
Accessory Cables ....................................................................... 5
Figure 2:
Connectors of the pciGrabber-4x4 (VD-012) .......................... 13
Figure 3:
Connectors of the pciGrabber-4x4 (VD-012-X1)....................14
Figure 4:
Connectors of the pciGrabber-4x4 (VD-012-X2)....................14
Figure 5:
Pin Formation of the Option Port............................................. 19
Figure 6:
Inserting the Card into the PCI Express Slot ........................... 21
Figure 7:
PHYTEC Install Menu.............................................................25
Figure 8:
Overview of the pciGrabber-4x4 Connectors (VD-012) ......... 26
Figure 9:
Overview of the pciGrabber-4x4 Connectors (VD-012-X1)...27
Figure 10:
Overview of the pciGrabber-4x4 Connectors (VD-012-X2)...27
Figure 11:
Video Connector Cables - (Description and PHYTEC Order
Number) ...................................................................................28
Figure 12:
Connectors for the pciGrabber-4x4.......................................... 29
Figure 13:
Extension Card VZ-012 with ribbon cable ..............................31
Figure 14:
How to connect the extension cards......................................... 32
Figure 15:
Jumper settings for three VZ-012 for VD-012 und VD-012-X133
Figure 16:
Jumper settings for VZ-012 for VD-012-X2 ...........................33
Figure 17:
Video inputs VD-012............................................................... 34
Figure 18:
Video inputs VD-012-X1.........................................................35
Figure 19:
Video inputs VD-012-X2.........................................................35
Figure 20:
Overview of the Demo Program ..............................................37
Figure 21:
Basic Settings Menu................................................................. 38
Figure 22:
Menu Option: Image ................................................................40
Figure 23:
Configuring the Image Parameters ..........................................41
Figure 24:
Live Image from the Video Source..........................................43
Figure 25:
Overloaded PCI bus ................................................................. 47
Figure 26:
„Image Setting“ Menu .............................................................48
Figure 27:
Creating a Full Image: Two Fields, Each with 7 rows ............51

pciGrabber-4x4
PHYTEC Messtechnik GmbH 2008 L-720e_0
Figure 28:
Comb Effect That Occurs with Quick Moving Objects .......... 52
Figure 29:
The Image Control Window .................................................... 54
Figure 30:
Histogram................................................................................. 56
Figure 31:
Color Meter.............................................................................. 58
Figure 32:
Arithmetics Menu .................................................................... 60
Figure 33:
Selecting the Normalization Factor ......................................... 61
Figure 34:
Number of Images ................................................................... 61
Figure 35:
Option Port Menü .................................................................... 62
Figure 36:
Option Port Menü (Jumper)..................................................... 63
Figure 37:
Block diagram VD-012............................................................ 67
Figure 38:
Block diagram VD-012( part 2)............................................... 68
Figure 39:
InterlacedIimage (Example with 9 Lines) ............................... 70
Figure 40:
Fields and Frames .................................................................... 71
Figure 41:
Moving Objects Cause Comb Effects...................................... 71
Figure 42:
Pixel- and Control Data Flow (Overview)............................... 76
Figure 43:
Directory for Window’s Driver ............................................... 78
Figure 44:
Windows NT Registration Editor ............................................ 81
Figure 45:
Entering a Device Driver ......................................................... 81
Figure 46:
Configuring the Driver............................................................. 82
Figure 47:
Scaling and Cropping............................................................. 112
Figure 48:
Example of Scaling: Only the ppl Value is Different............ 113
Figure 49:
Color Format of the pciGrabber-4x4 ..................................... 120
Figure 50:
Return Values of ‚Data_Present‘ ........................................... 126
Figure 51:
Timing Diagram of the Return Parameter of ‚Data_Present()126

Contents
PHYTEC Messtechnik GmbH 2008 L-720e_0
Index of Tables
Table 1:
Pin Assignments of the Model VD-012................................... 15
Table 2:
Pin Assignments of the Model VD-012-X1............................. 16
Table 3:
Pin Assignments of the Model VD-012-X2............................. 16
Table 4
Connecting the I²C Interface to the Combi Socket .................. 17
Table 5:
Pin Assignment for the Option Port X300............................... 19
Table 6:
Numbers of possible extension cards....................................... 32
Table 7
Example data volumes PAL 25fps...........................................46
Table 8
Example data volumes NTSC 30fps........................................ 46
Table 9:
Required Memory Space of One Pixel for the Different Modi121

pciGrabber-4x4
PHYTEC Messtechnik GmbH 2008 L-720e_0

Part 1 Installation and Start-Up
PHYTEC Messtechnik GmbH 2008 L-720e_0
1
1Introduction
Thanks for buying a pciGrabber-4x4 of the PHYTEC Messtechnik
GmbH. This manual explains on the one hand how to install the PC-
Card and on the other hand some information to the driver-software.
At the moment exists some kinds of pciGrabber4x4 models. To these
belong three kinds, that are described in this manual. The first one is
the model VD-012, the second VD-012-X1 and the third one is VD-
012-X2. In the following overview is a summery of the two types and
their models that are described in this manual.
TYPE Article-No.: No. of Decoders Bus-System
pciGrabber-4x4 VD-012 4 x1 PCI Express
pciGrabber-4x4 VD-012-X1 4 x1 PCI Express
pciGrabber-4x4 VD-012-X2 2 x1 PCI Express

pciGrabber-4x4
2
PHYTEC Messtechnik GmbH 2008 L-720e_0

Delivery Contents / Technical Data
PHYTEC Messtechnik GmbH 2008 L-720e_0
3
Start-Up
Part 1
Installation and Start-Up

pciGrabber-4x4
4
PHYTEC Messtechnik GmbH 2008 L-720e_0
2Delivery Contents/ Technical Data
The pciGrabber-4x4 includes the following upon delivery:
•A PCI Express-card
•Installation CD with
oDemo software (Windows XP, NT4.0, 2000 and Windows
VISTA)
oDriver software for Windows XP, NT4.0, 2000 and Windows
VISTA
oLabview driver for photo processing applications using
Labview (National Instruments, IMAQ – packet is required)
•the pciGrabber-4x4 manual

Delivery Contents / Technical Data
PHYTEC Messtechnik GmbH 2008 L-720e_0
5
Start-Up
2.1 Accessories
The following pciGrabber-4x4 accessories may be ordered from
PHYTEC:
•S-Video connector cable for connection of a color camera with a
4-pin Mini-DIN plug (S-Video output). Length, aprox. 2 m – Order
number: WK051
•BNC connector cable for connection of a camera with a BNC-plug.
Order number: WK058 (2m) or WK039 (10m)
•Replacement fuse 1.6 AT TR5 for camera power supply
(receptacle F2) – Order number KF012
•Replacement fuse 500 mAT TR5 for camera power supply
(receptacle F1) – Order number KF014
Figure 1: Accessory Cables

pciGrabber-4x4
6
PHYTEC Messtechnik GmbH 2008 L-720e_0
2.2 Technical Data VD-012(-X1)(-X2)
Physical
Dimensions: 125 x 90 x 20 mm plus face plate and slot
120 x 90 x 20 mm without panel edge
Data Bus: x1 PCI Express bus
(PCI Express Base Spec. Rev. 1.0a compliant)
Power Supply: +3.3V V (250 mA idle, 300 mA digitizing)
(taken from the PCI Express bus)
Numbers of
Decoders: Model VD-012: four Decoder
Model VD-012-X1 four Decoder
Model VD-012-X2 two Decoder
Inputs: Model VD-012:
4 composite video inputs, 75 Ω, 1 V
ss
1
optional 12 composite video inputs 75
Ω
, 1 V
ss
Model VD-012-X1:
4 S-Video input 75 Ω(0.7 V
ss
/ 0.3 V
ss
)
optional 12 composite video inputs 75
Ω
, 1 V
ss
Model VD-012-X2:
2 composite video inputs, 75 Ω, 1 V
ss 1
)
2 S-Video input 75 Ω(0.7 V
ss
/ 0.3 V
ss
)
optional 4 composite video inputs 75
Ω
, 1 V
ss
Video Format: PAL (B,G,H,I), HTSC (M)
or corresponding CCIR monochrome format
1
: If an S-Video input is not being used, then an extra composite input is available foer the user

Delivery Contents / Technical Data
PHYTEC Messtechnik GmbH 2008 L-720e_0
7
Start-Up
Synchronization: Composite sync. or sync to Y-signal
external synchronization is not possible
Data Format: 16 Mio. colors RGB32, RGB24, YcrCb 4:2:2,
YcrCb 4:1:1
64,000 colors RGB16
32,000 colors RGB15
256 gray shades Y8 gray scale
Image
Resolution: maximum 720 x 576 pixels (PAL)
or 640 x 480 pixels (NTSC)
Resolution is freely scalable in X and Y directions
up to 14:1
Image Transfer
Rate: Half frame 20 ms (Odd or even field)
Full frame 40 ms (Odd or even field)
Image transfer to the main memory in real time
(Bus master transfer)
Used
Resources: 4 kByte main memory (register field)
per decoder
4 kByte main memory (register field)
PCI Express-to-PCI-Bridge
Image control: Gamma correction (selectable)
Brightness (+/- 50 %)
Contrast (0 % ... 235 %)
Color saturation (U: 0...201 %, V: 0...283 %)
Hue (+/- 90°, only with NTSC)
Image Storage: 630 Byte FIFO on-board,
Real time storage in the PC main memory
Even-/odd field memory separated or
Common full frame memory (selectable)

pciGrabber-4x4
8
PHYTEC Messtechnik GmbH 2008 L-720e_0
Ports: 8-bit parallel I/O, TTL signal (multi-purpose)
Parameter Symbol Min Max
Input High Voltage V
IH
2,0 V 5 V
Input Low Voltage V
IL
-0,5 V 0,8 V
Output High Voltage V
OH
2,4 V -
Output Low Voltage V
OL
- 0,4 V
Input Low Current I
IL
- -70 uA
Input High Current I
IH
- 70 uA
1 I
2
C interface (Master)
Parameter Symbol Min Max
Transmission rate
1
f
I2C
99,2 kHz 396,8 kHz
Input High Voltage V
IH
3,5 V 5 V
Input Low Voltage V
IL
-0,5 V 1,5 V
Hysteresis V
hys
0,2 V
Input High Current I
IH
- 10 uA
Input Low Current I
IL
- -10 uA
Output Low Voltage V
OL
- 0,4 V
1
: Both of the frequencies can be de-lactivated with software

Delivery Contents / Technical Data
PHYTEC Messtechnik GmbH 2008 L-720e_0
9
Start-Up
Connectors: Model VD-012
4 x BNC socket: composite video input
Pin header row 2x12: 12 composite inputs
(not on the face plate)
Pin header row 2x6: GPIO port, 8 x TTL I/O
(not on the face plate) I
2
C interface
Pin header row 2 x 4: 4 Jumper
(not on the face plate)
Model VD-012-X1
4 x Mini-DIN socket: S-Video input
Pin header row 2x12: 12 composite inputs
(not on the face plate)
Pin header row 2x6: GPIO port, 8 x TTL I/O
(not on the face plate) I
2
C interface
Pin header row 2 x 4: 4 Jumper
(not on the face plate)
Model VD-012
2 x BNC socket: composite video input
2 x Mini-DIN socket: S-Video input
Pin header row 2x12: 12 composite inputs
(not on the face plate)
Pin header row 2x6: GPIO port, 8 x TTL I/O
(not on the face plate) I
2
C interface
Pin header row 2 x 4: 4 Jumper
(not on the face plate)

pciGrabber-4x4
10
PHYTEC Messtechnik GmbH 2008 L-720e_0
2.3 Field of Applications and Safety Regulations
Please pay attention to the specified operation directives of the
pciGrabber-4x4. Before starting operation please read carefully the
manual.
•The pciGrabber-4x4 is designed for the digitization of video
signals from standard TV-cameras. Signals from composite-video
cameras can be processed, which comply with CCIR B, G, H, I and
the sub standard CCIR B, G, H, I/PAL. In addition signals
compliant to CCIR M/NTSC can be applied. Also separate luma
and chroma signals from cameras, which correspond to the S-video
standard are applicable.
-
The digitization is achieved in real time. The image data are trans-
ferred via the PCI-bus of the PC. The transfer rate corresponds to
the access time specified for the PCI master slot.
-
The effective transfer rate must be re-oufficient to handle the
volume of the image data, otherwise information might be lost.
•The pciGrabber-4x4 is determined for the utilization with a
standard PC, which might be an office computer with an usual
housing. The Grabber must have a reliable connection with the
housing and the ground (PE).
-
The board is designed to operate in dry and dustless environment.
For applications in industrial environment you have to consider to
take additional protective arrangements especially against radio
interference and safety hazards.
•The application of the Grabber board in safety areas, for aviation
and space and for nuclear or military purposes requires our
examinations and our agreement.
•For industrial applications all rules for prevention of accidents and
the rules of the employer’s liability insurance association for
electrical facilities are to observe.

Delivery Contents / Technical Data
PHYTEC Messtechnik GmbH 2008 L-720e_0
11
Start-Up
•Before starting the operation of the Grabber board, it must be
ensured, that the device is appropriate for the application and the
specific location. In case of doubt, you should ask experts or the
manufacturer.
•The product has to be protected from hard shocks and vibrations.
Eventually the device has to be padded or cushioned, but the
ventilation may not be obstructed.
•In need of repair only a specialist should be asked, who uses the
original spare parts. For the installation of the Grabber, use only
tested and approved cables. Only radio shielded cables should be
utilized.
2.4
Addresses
and Resources
The pciGrabber-4x4 occupies a region of 4 kBytes in the main
memory of the PC for the local registers per decoder. The addressing
region is automatically specified by the BIOS and no hardware wiring
(jumper setting) is required.
Several pciGrabber-4x4 can be installed in one system. The boards are
configured automatically by the BIOS for different addresses.
It is not possible to determine which board is configured to which
address. The base address of each board can be obtained by the
PCI-BIOS. For the pciGrabber-4x4 the driver software determines the
address via the BIOS and defines a device number. The driver also
can determine the number of boards within the system and is able to
control each board by its particular device number.
It is not possible to determine which board will be specified by which
device number. This will be done only by the PCI-BIOS and the
architecture of the PC-motherboard. Usually the addresses are
allocated in sequence of the numbering of the PCI-slots. This might
deviate for different manufacturers. To solve that problem you can use
the Pin header row X900. With them you can set Jumper to give every
Grabber an explicit address.

pciGrabber-4x4
12
PHYTEC Messtechnik GmbH 2008 L-720e_0
The pciGrabber-4x4 will activate an interrupt in case of certain events
or a distinct operational status.
The Grabber is only a single function device so only the interrupt line
/INTA of the PCI-bus can be used. To this PCI-bus-interrupt an
interrupt of the PC is allocated via the BIOS, so that the program can
react to this event.
The source of the interrupt can be determined from the interrupt status
register of the Grabber.
Several boards can trigger the same interrupt /INTA, it must be
determined which board caused the interrupt.
This manual suits for next models
3
Table of contents