| MV1000 Application Notes |  |

Using the Cohu camera(491x series) with MV-1000 in Asynchronous Reset Mode
Overview
M-Vision 1000
The M-Vision 1000 (MV-1000) is a monochrome video digitizer board, which interfaces to the PCI bus. The MV-1000 product line includes a base board with analog camera support, a 3 Megabyte memory upgrade module (MV-1200), and a 8/10/16/32 bit digital interface modeul (MV-1100). Recent additions include the Color Camera Interface Module (CCIM), the MV-1300 (RGB color interface module) and the MV-1350 (Composite/S-Video/VCR color interface module).
This application note / program demonstrates the procedure for using the Cohu 491x series of cameras with the MV-1000 in integration mode.
Interfacing Procedures
The Cohu Camera used (4915-2030) in this application note (as most other 491x series cameras) has the following features on the back of the camera - power input, BNC connector for video output and an 8 pin auxiliary connector. When this camera is used in regular RS170 mode in normal, continuous acquisition mode, the red cable of the MuTech VC-7 cable is connected to the BNC connector (as with all other analog cameras). But when the camera needs to be used in asynchronous reset mode, a reset pulse needs to be supplied to pin 6 of the auxiliary connector. When pin 6 is pulled low (below 1.7 volts) by a low going pulse, the vertical interval of the camera resets 2.5 usecs later. Also the minimum allowable width of the reset pulse is 1 usec.
The following settings have to be observed on the camera:
1. Electronic iris should be OFF.
2. Jumpers JB2 and JB3 on the camera Video/Sync Board should be set to RST (reset).
3. Jumper JB4 was set to FR(frame) in this application for use in frame mode but users can also set it to field mode.
Cable Connections
The white cable on the MuTech VC-7 is capable of sending a high or low pulse to the camera. This pulse needs to be sent to pin 6 on the auxiliary connector. Also pin 4 on the auxiliary connector is ground (for proper pin diagrams, refer to camera manual). The red cable of the VC-7 is connected as usual, to the BNC connector on the back of the camera for video output.
NOTE: Since application of the reset pulse interrupts the sensor before the end of an integration period, in "Frame Mode", the first frame of video will be of reduced video level and may have to be discarded or ignored. Following code attempts to discard the first frame after reset pulse. However, end users may employ their own technique to achieve this. Following code should only be used as a guide to the issues involved when using the Cohu camera with MV-1000 frame grabber in asynchronous reset mode.
DOS Program coded in C, compiled using Watcom 10.0
MuTech DOS SDK version 2.11
/* Application program to use the COHU camera in integration mode */
#include < stdio.h >
#include < string.h >
#include < malloc.h >
#include "mv1.h"
main()
{
int numboard,n,i,counter,vcount;
char huge *buffer;
MV1InitCFG board_init;
MV1GrabWindow grabWindowRS170;
MV1Frame RS170Frame;
/* Checking to see if the VGA card can support 800X600 mode resolution */
if (MV1VGAInit(0X103, NULL))
{
printf("Your VGA card does not support the 800X600 mode resolution\n");
exit(1);
}
/* Checking for presence of board */
if ((numboard=MV1Open()) < 0)
{
printf("MV-1000 board has not been installed on your PC\n");
exit(1);
}
/* Setting board number and initializing board */
for(i=0; i < numboard; i++)
{
MV1SetCurrentBoard(i);
MV1Init(NULL, NULL); /*The first NULL assumes a default setting of RS170 */
}
/* Setting parameters for RS170 specifications */
MV1SetCurrentCamera(0);
MV1SelectSTDCameraConfig(MV1_RS170_Cam);
/* Defining a grab window to capture image frames */
MV1SetGrabWindow (0,0,0,640,480,&grabWindowRS170);
printf("Enter any key\n");
getch();
/* Want to see full image */
MV1CreateFrame (&RS170Frame,0,0,640,480,&grabWindowRS170);
MV1GraphMode(1);
buffer=MTMALLOC(640*480);
/* Raises the signal on the white cable */
MV1SetGeneralPurposeBit(MV1_GP_Bit0);
/* Set the vertical reset 6 times by using counter */
for(counter=0;counter <= 5; counter++) {
/* Drops the signal on the white cable */
MV1ResetGeneralPurposeBit(MV1_GP_Bit0);
/* Code section to avoid first frame after vertica reset pulse */
while(MV1RdVSyncInfo() != MV1_OK)
if(MV1InquireField() == 0) {
while(MV1InquireField() == 0) /* skip even field */
;
while(MV1InquireField() == 1) /* skip odd field */
;
}
else {
while(MV1InquireField() == 1) /* skip odd field */
;
while(MV1InquireField() == 0) /* skip even field */
;
}
/* start grabbing from second frame onwards */
MV1StartGrab(MV1_Single_Grab,MV1_Grab_Odd);
MV1WaitFrameEnd();
MV1FrameRead(&RS170Frame,0,0,640,480,buffer);
MV1DisplayData2VGA(&RS170Frame,0,0,buffer);
getch();
}
MV1TextMode();
MV1Close();
}
For optimum results this application should be used with a strobe light so that objects can be illuminated uniformly. When used in ambient light conditions, it is very possible that some frames will have a horizontal streak with a change in light intensity.

MuTech Corp. July 1996
Return to MuTech Homepage