Terasic D8M-GPIO Manual de usuario

1
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018

2
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Chapter 1 D8M Development Kit............................................................ 4
1.1 Package Contents ...................................................................................4
1.2 D8M System CD...................................................................................... 5
1.3 Assemble the Camera ............................................................................. 5
1.4 Getting Help............................................................................................. 6
Chapter 2 Introduction of the D8M Board............................................. 7
2.1 Features ..................................................................................................7
2.2 Block Diagram of the D8M Board ............................................................ 8
Chapter 3 Using the D8M Board............................................................. 9
3.1 MIPI Camera Module...............................................................................9
3.2 MIPI Decoder..........................................................................................11
3.3 GPIO Connector.................................................................................... 12
3.4 Clock Tree ............................................................................................. 14
3.5 Camera Configuration............................................................................ 14
Chapter 4 RTL Example Codes............................................................ 16
4.1 Using LINE- BUFFER............................................................................ 16
4.2 Using FRAME - BUFFER ...................................................................... 21
Chapter 5 NIOS Based Example Codes............................................... 24

3
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
5.1 DE1_SOC and DE2-115 D8M_VIP Demonstration................................ 24
5.2 DE1_SOC_D8Mx2_VIP Demonstration................................................. 28
5.3 C5G_D8M_VIP Demonstration.............................................................. 34
Chapter 6 Appendix .............................................................................. 38
6.1Revision History..................................................................................... 38
6.2Copyright Statement .............................................................................. 38

4
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Chapter 1
D8M Development Kit
erasic D8M is an 8 Mega Pixel Digital Camera Development Package. The user can
connect this camera module onto the FPGA development kit via the 2x20 Pin GPIO
connector for image capturing, image processing & image output.
The D8M provides the Camera Module with the high speed MIPI interface, which also
supports the simple 10Bit Parallel Bayer Pattern Data solution after the MIPI Decoder
conversion. It is able to control the D8M module by FPGA via I2C interface for output
resolution, ALBC, Frame rate, etc. The D8M also features an Auto-focus function.
We do provide demo source codes for the D8M working with different FPGA
development kits. These demos are created by using RTL & ALTERA VIP, By referring
these demos, the user can quickly learn how to work with this D8M on his/her own
application.
1.1 Package Contents
Figure 1-1 The D8M package contents
The D8M package includes:
⚫Product Box
T

5
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
⚫System CD Download Guide
⚫One D8M Module
⚫40-Pin IDC To Box Header Cable
1.2 D8M System CD
The D8M System CD contains all the documents and supporting materials associated
with D8M, including the user manual, reference designs, and device datasheets. Users
can download this system CD from the link: http://d8m.terasic.com/cd.
1.3 Assemble the Camera
Terasic D8M is able to connect on to any FPGA development kit that is equiped with a
2x20 Pin GPIO connector. The pictures below show the connections allowing the D8M
to connect to 3 different Terasic FPGA Boards:
Figure 1-2 Connect the D8M to DE2-115 board’s expansion port

6
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Figure 1-3 Connect the D8M to DE1-SoC board’s expansion port
Figure 1-4 Connect the D8M to C5G board’s expansion port
1.4 Getting Help
Here are the addresses where you can get help if you encounter any problems:
Terasic Technologies
9F., No.176, Sec.2, Gongdao 5th Rd, East Dist, Hsinchu City, 30070. Taiwan
Email: suppo[email protected]om
Tel.: +886-3-575-0880
Website: http://d8m.terasic.com

7
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Chapter 2
Introduction of the
D8M Board
2.1 Features
Figure 2 1 shows a photograph of the board.
Figure 2-1 shows a photograph of the board.
The D8M board has many features that allow users to implement a wide range of
designed circuits, from simple circuits to various multimedia projects.
The following hardware is provided on the board:
⚫Package Interface:2x20 GPIO, 3.3V I/O-standard.
⚫MIPI Camera Module:
◼Chip P/N:OV8865
◼Color Filter Arrangement:Bayer Pattern
◼View Angel:70 °
◼Pixels:3268x2448 (8-Mega Pixels)
◼Frame Rate:8-Mega Pixels @30fps
◼Support Focus Control
◼Programmable controls for frame rate, mirror and flip, cropping, and
windowing
⚫MIPI Decoder:
◼Chip P/N:TC358748XBG
◼MIPI CSI-2 Compliant

8
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
◼MIPI to Parallel Port Converter
◼Supports up to 4 data lanes
◼Package Size:73.4x60.0 mm
⚫Package Size:73.4x60.0 mm
2.2 Block Diagram of the D8M Board
Below Figure 2-2 shows the D8M Block Diagram. MIPI Camera Module outputs 4
Lanes MIPI interface image data, which can be converted to Parallel data by passing
through the MIPI Decoder IC to the GPIO interface. Both MIPI Camera Module and
MIPI Decoder can be controlled by FPGAI2C interface.
Figure 2-2 Block diagram of D8M Board

9
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Chapter 3
Using the D8M Board
his chapter provides instructions on how to use the MIPI camera module, MIPI
Decoder and GPIO connector on the D8M board.
3.1 MIPI Camera Module
Terasic D8M board equips with an 8M pixel MIPI camera module named OV8865 (See
Figure 3-1). The OV8865 color image sensor is a high performance, 8 megapixel RAW
image sensor that delivers 3264x2448. It provides options for multiple resolutions while
maintaining full field of view. Users can program image resolution, frame rate, and
image quality parameters. Camera functions are controlled via I2C bus
(CAMERA_I2C_SDAand CAMERA_I2C_SCL). The I2C device address is 0x6C.
Figure 3-1 MIPI Camera Module
Figure 3-2 shows a cross-section of the image sensor array. The color filter is
arranged in a Bayer pattern. Of the 8,332,288 pixels, 7990,272 (3264x2448) are active
pixels and can be output. The other pixels are used for black level calibration and
interpolation.
T

10
Terasic Inc.
D8M-GPIO User Manual
www.terasic.com
September 26, 2018
Figure 3-2 Sensor Array Region color filter Layout (From Camera Datasheet)
For more hardware description and register information about this camera module,
please refer to the datasheet named OV8865 Data Sheet.pdf in the D8M System CD.
In addition, there is a Voice Coil Motor (VCM) driver chip named VM149C on the MIPI
camera module. Users can use the same I2C bus (I2C device address is 0x18) to
modify the DAC value in the VCM driver chip that can allow the VCM to move its lens to
the desired position for getting a sharp image and realizing the Auto Focus (AF) feature.
Terasic also provides an AF demonstration and IP in the System CD. See section 4.x
for details. The datasheet of this VMC driver IC named VM149C VCM Driver IC.pdf
also can be found in the System CD.
Tabla de contenidos
Otros manuales de Cámara digital de Terasic





















