home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright 1990 by John Wiley & Sons, Inc.
- All Rights Reserved.
- */
- /*********************************************************/
- /*** Listing P2Ch3L3 ***/
- /*** Video Digitizer Test Program Two ***/
- /*** written in Turbo C ***/
- /*** by ***/
- /*** Craig A. Lindley ***/
- /*** ***/
- /*** Ver: 1.0 Last Update: 08/04/89 ***/
- /*********************************************************/
-
- /*
- This program is used to check the sync detect circuitry on the digitizer.
- It continually counts how many sync pulses it detects per video field.
- The timing parameters in the low level digitizer driver code, digitize.asm,
- should be varied until only the values of 271 and 272 are obtained. This
- program is terminated by hitting any key.
- */
-
- #include <stdio.h>
- #include <conio.h>
- #include "digitizer.h"
-
-
- void main( void )
- {
- struct ImageReq Req; /* ImageReq structure */
- unsigned Done = FALSE; /* loop terminating boolean */
-
- clrscr();
- printf("Digitizer Test Program Two - Sync Detect Circuitry Test\n\n");
-
- /*
- Build a structure that defines what the digitizer should acquire.
- This will be passed to the digitizer by a call to InitializeDigitizer
- function. This also tells the low level code where the digitizer
- is attached.
- */
-
- Req.ComputerType = PS220;
- Req.PrtBase = 0x3BC;
- Req.HMode = LowRes;
- Req.VMode = NonInterlace;
- Req.NumberOfPasses = 1;
- Req.Flags = 0L;
- Req.FirstLine = 0;
- Req.FirstPixel = 0;
- Req.LastLine = 200;
- Req.LastPixel = 320;
-
- InitializeDigitizer(&Req); /* initialize the digitizer */
-
- printf("SyncPerField Test\n");
- printf(" Hit any key to terminate\n\n");
-
- Done = FALSE;
-
- while (!Done)
- {
- printf("SPF=%d\n",SyncsPerField());
- if (kbhit())
- Done = TRUE;
- }
- }
-