Skip to content

USB2.0-Camera-Shield-Rev.E

Introduction

This chapter describes the operation of the ArduCAM USB2 camera shield. The latest device driver, SDK library, and examples can be downloaded from here The highlight of the new USB2.0 camera shield Rev.E is that it supports MIPI interface sensors without any MIPI adapter board. It has onboard 16MByte hardware frame buffer, and overcome the bandwidth and dropping frames issue when using the software frame buffer scheme. In addition, with the onboard frame buffer, it supports synchronized multiple cameras taking images exactly at the same time. Now it well supports both PC and an embedded system like Raspberry Pi, and also can provide customized support for Odroid, Beaglebone Black, Nvidia Jetson TK/TX boards.

usb2-shield

Hardware

Hardware Installation

Figure 1. Interface Diagram:

Interface

Figure2. Arducam USB2 Camera Shield​ Mechanical Dimension: dimension

There are two different camera interface provided on the USB camera shield, but only one camera interface can be used at a time.

MIPI Camera Interface

The MIPI camera interface is used for the 22 pin MIPI camera breakout board. Visit the Featured Camera Modules Supported chapter to see the full list.

sample1

Table 1 P1 Connector Pin Definition

Pin No.PIN NAMETYPEDESCRIPTION
1GNDGroundPower ground
2D0_NInputMIPI DATA0 N
3D0_PInputMIPI DATA0 P
4GNDGroundPower ground
5D1_NInputMIPI DATA1 N
6D1_PInputMIPI DATA1 P
7GNDGroundPower ground
8C_NInputMIPI CLOCK N
9C_PInputMIPI CLOCK P
10GNDGroundPower ground
11D2_NInputMIPI DATA2 N
12D2_PInputMIPI DATA2 P
13GNDGroundPower ground
14D3_NInputMIPI DATA3 N
15D3_PInputMIPI DATA3 P
16GNDGroundPower ground
17PWENOutputMIPI Power En(active HIGH)
18VCCPOWER3.3v Power supply
19GNDGroundPower ground
20SCLInputTwo-Wire Serial Interface Clock
21SDABi-directionalTwo-Wire Serial Interface Data I/O
22VCCPOWER3.3v Power supply

The DVP camera interface is used for the camera breakout board with 30pin ribbon cable. Visit the Featured Camera Modules Supported chapter to see the full list. sample2

Table 2 HDC1 Connector Pin Definition

Pin No.PIN NAMETYPEDESCRIPTION
1GNDGroundPower ground
2NC--
3TriggerOutputExposure synchronization input
4VSYNCInputActive High: Frame Valid; indicates active frame
5HREFInputActive High: Line/Data Valid; indicates active pixels
6DOUT11InputPixel Data Output 11 (MSB)
7DOUT10InputPixel Data Output 10
8DOUT9InputPixel Data Output 9
9DOUT8InputPixel Data Output 8
10DOUT7InputPixel Data Output 7
11DOUT6InputPixel Data Output 6
12DOUT5InputPixel Data Output 5
13GNDGroundPower ground
14DOUT4InputPixel Data Output 4
15DOUT3InputPixel Data Output 3
16DOUT2InputPixel Data Output 2
17DOUT1InputPixel Data Output 1
18DOUT0InputPixel Data Output 0(LSB)
19NC--
20PCLKInputPixel Clock output from sensor
21SCLInputTwo-Wire Serial Interface Clock
22SDABi-directionalTwo-Wire Serial Interface Data I/O
23RST_NOutputSensor reset signal, active low
24GNDGroundPower ground
25GNDGroundPower ground
26STANDBYOutputStandby-mode enable pin (active HIGH)
27~30VCCPOWER3.3v Power supply

Driver Installation

The Arducam USB camera shield is not a standard USB Video Class device. Instead, it uses a private driver for our proprietary SDK and API that helps you access all the sensor features from the register level. Check the Windows Driver Installation chapter to learn about how to install the driver.

Demo Code

Arducam provides a comprehensive SDK library and API for C++ and Python. Besides, we offer a GUI Windows program that helps you easily understand the operation of the ArduCAM USB camera and SDK library. Check the Software SDK and API chapter to learn more about how to run the demo.

Register Table

register
address
register
type
UC-391 Rev.E
(USB 2.0)
0x00read-onlybit[7:0]:CPLD version number

UC-391 Rev.E:0x25
0x01read-writebit[7]:DVP Camera 8/16bit 
0: 8bit;1: 16bit

bit[5]:DVP Camera pclk polarity
0:normal;1:inverse

bit[4]:ircut
0:on;1:off

bit[3]:DVP Camera standby
0:normal;1:standby

bit[2]:DVP Camera rst_n
0:rst;1:normal

bit[1]:MIPI Camera standby
0:normal;1:standby

bit[0]:MIPI Camera rst_n
0:rst;1:normal
0x02read-writebit[8]: Select the external trigger connected to CPLD by DVP camera as input or output of CPLD
0:CPLD input;1:CPLD output

bit[4]: Choose whether the internal simulative data a counter or a color bar
0:color bar;1:counter

bit[2]:simulative data/camera data
0:camera data;1:simulative data

bit[0]:DVP Camera vsyn polarity
0:normal;1:inverse
0x03read-writebit[7]:cpld reset
0:normal;1:reset
Set it to 1 and then set it back to 0

bit[6]:Pause Camera Data Input
0:normal;1:pause

bit[5]:Single shot
(Not valid until bit [6] is 1)
0:wait;1:Start a single shot
Set it to 1 and then set it back to 0
0x04read-writebit[7:0]:Frame skipping function
Because the number of input frames may be faster than the bandwidth of USB 2.0, the number of uploaded frames can be reduced by frame hopping

M=bit[7:4]
N=bit[3:0]
Normally, for each N frame, take M frames

0x00,No frame skipping
0x01,Skip 1 frame.That's1/2(To be compatible with Rev.C.)
0x11,No frame skipping
0x12,1/2
0x13,1/3
……
0x1F,1/15
0x05read-onlybit[7:0]: CPLD version year
For example decimal 19, the upper machine-readable register value will be added 2000, indicating 2019
0x06read-onlybit[7:0]: CPLD version month
For example: decimal 08, for August
0x07read-onlybit[7:0]: CPLD version date
For example decimal 03, for 3
0x08read-writebit[7]:Is data uploaded to USB
0:normal;1:Stop uploading

bit[0]: Upper computer clears finish ID of single-shot mode
0:Not clear up;1:clear up
Set it to 1 and then set it back to 0
0x09read-onlybit[0]: finish ID of single shot mode
0:unfinished;1:finished
0x0Aread-writebit[1:0]:Data bit Selection of DVP Camera

DVP Camera,The input data is 12 bits
【8-bit mode】
0:dvp_data[11:4]
1:dvp_data[9:2]
2:dvp_data[7:0]
【16-bit mode】
0:{4'd0, dvp_data[11:0]}
1:{6'd0, dvp_data[9:0]}
0x0B  
0x0Cread-writebit[7]: Camera Selection
0: DVP Camera;1:MIPI Camera

bit[4]:MIPI RAW format
0:raw8;1:raw10

bit[1:0]:MIPI channel
0:1Lane;1:2Lane;2:4Lane
0x0Dread-writeMIPI, Image resolution, column, High 8 bits
0x0Eread-writeMIPI, Image resolution, column, Low 8 bits
0x0Fread-writeMIPI, Image resolution, row, High 8 bits
0x10read-writeMIPI, Image resolution, row, Low 8 bits
0x11read-writebit[5:4]: ECC check mode
3:{DI, WC_I, WC_H}
2:{DI, WC_H, WC_I}
1:{WC_I, WC_H, DI}
0:{WC_H, WC_I, DI}

bit[2]: WC Check of MIPI HREF
0:No check;1:check

bit[1]: data_type check
(Is it raw8 or raw10?)
0:No check;1:check

bit[0],MIPI ECC check
0:No check;1:check
0x12read-writebit[7],Two Extended IOs as PWM or GPIO
0: GPIO;1: PWM

bit[0]: GPIO Direction
0: CPLD input;1: CPLD output
0x13read-onlybit[1:0]: GPIO read-in values

bit[1]:GPIO[1] read value
bit[0]:GPIO[0] read value
0x14read-writebit[1:0]: GPIO write-out values

bit[1]:GPIO[1] write value
bit[0]:GPIO[0] write value

for example:

If 0x12 writes 0x01, the two extended IO is GPIO,the GPIO[1] and GPIO[0] are both output

then 0x14 writes 0x01, then GPIO[1] is low level, and  GPIO[0] is high level
0x15read-writebit[5:4]: Selection of pwm_0 Cycle Counting Clock
3:320us
2:160us
1:80us
0:40us

bit[1:0]: Clock selection for pwm_0 high-level counting
3:40us
2:20us
1:10us
0:5us
0x16read-writebit[7:0]: Number of High Level Width Clocks in pwm_0
0x17read-writebit[7:0]: Number of pwm_0 Periodic Width Clocks
0x18read-writebit[5:4]: Selection of pwm_1 Cycle Counting Clock
3:320us
2:160us
1:80us
0:40us

bit[1:0]: Clock selection for pwm_1 high-level counting
3:40us
2:20us
1:10us
0:5us
0x19read-writebit[7:0]: Number of Clocks with High Level Width in pwm_1
0x1Aread-writebit[7:0]: Number of pwm_1 Periodic Width Clocks
0x1Bread-write 
0x1Cread-write 
0x1Dread-write 
0x1Eread-onlyRead MIPI parsed information
bit[7:0]: MIPI DATA ID
0x1Fread-onlyRead MIPI parsed information
bit[4:0]: MIPI,Image resolution,column,High 5 bits
0x20read-onlyRead MIPI parsed information
bit[7:0]: MIPI,Image resolution,column,Low 7 bits
0x21read-onlyRead MIPI parsed information
bit[4:0]: MIPI,Image resolution,row,High 5 bits
0x22read-onlyRead MIPI parsed information
bit[7:0]: MIPI,Image resolution,row,Low 7 bits