Digilent 210-179P User Manual
Page 3

VmodCAM Reference Manual
www.digilentinc.com
page 3 of 6
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
A register read consists of:
•
start condition
•
8-bit device address (0x78 for the
MT9D112) + acknowledge bit
•
upper byte of 16-bit register address +
acknowledge bit
•
lower byte of register address +
acknowledge bit
•
start condition
•
8-bit device address (0x79 for the
MT9D112) + acknowledge bit
•
upper byte of the 16-bit data +
acknowledge bit
•
lower data byte + no-acknowledge bit
•
stop condition.
There are two types of configuration controls,
hardware registers and driver variables. The
hardware registers usually control the sensor
and some other sub-systems, while the driver
variables sequence the on-chip
microprocessor. These two types of controls
are accessed differently.
Hardware registers are two-wire accessible,
meaning their address can be used directly in
the register address phase of the two-wire
transfer. Hardware registers are referred to by
their address. For example, R[0x3000] refers
to the register located at address 0x3000.
Driver variables can be accessed via two
hardware registers, R[0x338C] and R[0x3390].
To access a variable, its address first needs to
be written to R[0x338C], which is a standard
two-wire register write. Then, reading register
R[0x3390] reads the variable and writes a
value to it, thus setting the variable to that
value. Driver variables are referred to by their
address. For example, V[0x2797] refers to the
driver variable located at address 0x2797.
Configuration
The cameras start up with their registers set to
default values. This also means they are in
standby. To acquire images from the cameras,
both have to be initialized properly. As the
power-on and reset sequences show, the
camera needs certain signals set and a
running MCLK before the two-wire interface is
enabled.
Once the necessary number of MCLK cycles
are provided, the following registers/variables
need to be read/written.
Identify the camera:
To verify that the camera is working, read
R[0x3000] to return 0x1580, which is the
device ID of the camera.
Reset the MCU:
1. R[0x3386] = 0x0501
2. R[0x3386] = 0x0500; release from reset
Set the PLL:
1. R[0x3214] = 0x0D85; this sets the slew
rate of the output pins
2. R[0x341E] = 0x8F0B; power-down and
bypass PLL; if you want to use MCLK
as the pixel clock, skip steps 3-5.
3. R[0x341C][13:8] = N
R[0x341C][7:0] = M;
Where PCLK = MCLK * M / (N+1) / 8.
For example, to obtain a pixel clock of
80MHz (maximum) from an MCLK of
24MHz, set M=80, N=2.
4. R[0x341E] = 0x8F09; power up PLL,
wait 1ms for the PLL to stabilize
5. R[0x341E] = 0x8F08; use PLL clock
instead of MCLK
Wake up from standby:
1. R[0x3202] = 0x0008
Insert image parameters:
You can change the image parameters to suit
your project. See the Image Configuration
Example below to insert an image parameter
configuration sequence.