1. Home
  2. Docs
  3. USB2.0 Camera Shield Rev.E
  4. 5.Register Table

5.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
Was this article helpful to you? Yes No