Pike Technical Manual
V5.2.0
289
Configuration of the camera
Sample program
The following sample code in C/C++ shows how the register is set for video
mode/format, trigger mode etc. using the
FireGrab
and
FireStack API
.
Example FireGrab
…
// Set Videoformat
if(Result==FCE_NOERROR)
Result= Camera.SetParameter(FGP_IMAGEFORMAT,MAKEIMAGEFORMAT(RES_640_480, CM_Y8, FR_15));
// Set external Trigger
if(Result==FCE_NOERROR)
Result= Camera.SetParameter(FGP_TRIGGER,MAKETRIGGER(1,0,0,0,0));
// Start DMA logic
if(Result==FCE_NOERROR)
Result=Camera.OpenCapture();
// Start image device
if(Result==FCE_NOERROR)
Result=Camera.StartDevice();
…
Example FireStack API
…
// Set framerate
Result=WriteQuad(HIGHOFFSET,m_Props.CmdCCR_FRAMERATE,(UINT32)m_Parms.FrameRate<<29
);
// Set mode
if(Result)
Result=WriteQuad(HIGHOFFSET,m_Props.CmdCCR_VMODE,(UINT32)m_Parms.VideoMode<<29);
// Set format
if(Result)
Result=WriteQuad(HIGHOFFSET,m_Props.CmdCCR_VFORMAT,(UINT32)m_Parms.VideoFormat<<29)
;
// Set trigger
if(Result)
{
Mode=0;
if(m_Parms.TriggerMode==TM_EXTERN)
Mode=0x82000000;
if(m_Parms.TriggerMode==TM_MODE15)
Mode=0x820F0000;
WriteQuad(HIGHOFFSET,m_Props.CmdCCR_TRGMODE,Mode);
}
// Start continous ISO if not oneshot triggermode
if(Result && m_Parms.TriggerMode!=TM_ONESHOT)
Result=WriteQuad(HIGHOFFSET,m_Props.CmdCCR_ISOENABLE,0x80000000);
…