//
// Copyright (c) 2003 by Cognex Corporation, Natick, MA USA
// All rights reserved. This material contains unpublished,
// copyrighted work, which includes confidential and proprietary
// information of Cognex.
// 
// 
// With this CCF, image acquisition using a Jai CV-A1-14.4 camera 
// is supported in a progressive scan, asynchronous reset, shuttered 
// mode. 
//
// This camera is configured via the Hirose 6-pin port located at 
// the back of the camera (RS-232C interface).  Begin the 
// configuration process by downloading and installing the CV-A1
// Control Tool from the Jai site at www.jai.com.
// 
// Next, connect a cable between the host PC's serial port and the 
// camera at the 6-pin port.  The cable must conform to the pin-out
// spec given in the CV-A1/CV-A1-14.4 Operation Manual.
// 
// Launch the Control Tool application from the PC's Programs menu.
// You will see 7 or more control buttons presented on the single
// toolbar.  Open the Communication, Shutter and Sync Signals, and 
// Files and Camera windows by left-clicking on the proper control 
// buttons displayed on the toolbar.
//
// On the Communications window, the Status box should indicate
// "On-line".  This is an indication that the serial comm. link
// between the PC and the camera is working properly.  The 
// Sychronize box will indicate a "Not Synchronized" or
// "Synchronized" status.  There is no cause for concern either way.
//
// On the Shutter and Signals window, select "Normal" for Shutter
// Mode and "Pulse Width Control" for Trigger Mode.  Trigger
// Polarity should be "Active L", HD Synchronous Accumulation
// should be "Async", and Pixel Clock Out "Off".  Select "Full
// Frame" for Partial Scan Mode, "WEN" for EEN/WEN, "Active L"
// for WEN, and "On" for Sync Signal Output.  Turn off binning
// by selecting "Binning OFF".
//
// After making all the selections on the Shutter and Signals
// window, return to the Communication window and left-click on
// the Synchronize Camera button.  After a few seconds, status
// in the Synchronize box should become "Synchronized", confirming 
// that all settings have been successfully written to the camera.
//
// Proceed to the Files and Camera window next.  Select the same
// "User" number for both Settings in Camera and Initial Data.
// There should be 3 non-factory choices - "User 1", "User 2", 
// and "User 3".  Left click on the Store Settings button to
// save the settings into the selected user memory space.  Lastly,
// left-click on the Write to Camera button in the Camera box to
// write all settings and power-up defaults to the camera's 
// non-volatile memory.
//
// The camera is now configured to operate properly with this CCF.
// You can now disconnect the serial comm. cable from the camera.
//
//
// Cable: 300-0316 or [300-0136 & 300-0313] (CVM1 & CVM3 & 8501 & 8504)
// Cable: 300-0318 or [300-0231 & 300-0313] (CVM6)
//

// -----------------------------------------------------------------
// NOTE: Image height of 1049 line exceeds the number of valid 
//       video lines read out by the camera (1035).  However, the 
//       WEN active interval after the read out is 14 lines long and
//       the camera cannot be triggered when WEN is active.  Making
//       the image height 1049 lines gurantees that this restriction
//       is observed by the video timing generator.  However, a side
//       effect is that the bottom 14 lines of the acquired image is
//       black by default.  Use the CVL roi property (ch_cvl/prop.h)
//       and a setting of ccPelRect(0,0,1344,1035) for the property 
//       to remove the 14 black lines from the acquired image.
// -----------------------------------------------------------------

format name = "Jai CV-A1-14.4 1344x1049 IntDrv (rapid-reset, shutter-sw-pulseWidth) CCF";

format width = 1344;
format height = 1049;

format video_interface = analog;
format video_encoding = mono;
format bits_per_pel = 8;
format peltype = mono;
format taps = 1;

format pclk_direction = unused;
format pclk_source = oscillator;
format pclk_frequency = 14.31818;

format hd_direction = out;
format hd_interface = ttl;
format hd_signal = hd;
format hd_polarity = active_low;
format horiz_reference = none;
format hctrl1 = 1 0;

format vd_direction = unused;
format vertical_reference = none;

format htotal = 1672;
format hdrive = 1 0;
format hdrive = 0 260;
format hsync = 1 20;
format hsync = 0 90;
format hsample = 1 170;
format hsample = 0 196;

format active_start = 301;

format vtotal = 4089;
format vdrive = 1 3006;
format vdrive = 0 3015; 
format vsync = 1 3009;
format vsync = 0 3012;
format vsample = 1 3016;
format vsample = 0 3027;
format vaoi = 1 3039;
format vaoi = 0 4088;     // 1035H + 14H for WEN
format vctrl1 = 1 3002;
format vctrl1 = 0 3004;
format vstrobe = 1 3002;
format vstrobe = 0 3008;

format ctrl2_direction = unused;

format number_of_fields = 1;
format aoi_per_field = 1;
format x_subsampling = 1;
format interlace = 0;
format rapid_reset = 1;
format rapid_reset_min_position = 3001;

format cti_end_field0 = 3008;
format cti_width_min = 1;

format shutter_mode = pulse_width_adjust_leading;
format shutter_line = ctrl1;
format ctrl1_direction = out;
format ctrl1_polarity = active_low;
format ctrl1_interface = ttl;
format shutter_min_exposure = 233.55e-6;  // 2H
format shutter_max_exposure = 0.23343;    // 1999H
format shutter_adjustment_granularity = pel;
format shutter_per_field = 0;

format strobe_mode = pulse_position;

format settling_time = 0.500;

vs version = 5;
vs revision = 1;

ccf version = 1.0;
ccf build_number = 4;

ccf_checksum 0x038B83B7
