Frame Buffer Demo Board (FBD)

The frame buffer is intended to save raw image data at full frame rate so it can be read back to the PC at a slower rate without dropping any frames. The frame buffer control register settings are as follows:

  • HiSpiFrames – This register determines how many sequential frames will be captured or read out.

  • HiSpiBuffer::Continuous – When this bit is set, frames are continually stored and then read out. The number of sequential frames stored during each cycle is determined by the HiSpiFrames register. This mode has precedence over the other control bits.

  • HiSpiBuffer::Capture – Setting this bit initiates the storing of frames. The number of sequential frames stored is determined by the HiSpiFrames register.

  • HiSpiBuffer::Read – Setting this bit initiates the read out of the stored frames. The number of sequential frames read is determined by the HiSpiFrames register.

  • HiSpiBuffer::Done – This bit indicates when the capturing or read out of frames is complete. This bit can be used to determine when the stored frames are ready to be read.

  • CapturedFrames – This register indicates the number of frames currently stored in the buffer.

To capture 500 sequential frames and then read them out one at a time, you would do the following:

  1. Set Continuous = 0

  2. Verify that the buffer is empty, CapturedFrames = 0

  3. Set HiSpiFrames = 500 (if this is more than the frame buffer can hold, the cycle will complete when the buffer is full)

  4. Set the Capture bit to initiate the cycle. The CapturedFrames register will increment.

  5. Check for Done = 1 indicating that all frames are captured.

  6. Set HiSpiFrames = 1

  7. Set the Read bit. The Done bit will be set to 1 after the frame is read out.The CapturedFrames register will decrement by 1.

  8. Continue step 7 until CapturedFrames = 0

Â