-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamvals_9650.h
executable file
·181 lines (149 loc) · 2.64 KB
/
camvals_9650.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// camera initialisation. Much of this is undocumented or misdocumented in datasheet
// stored as 16 bit shorts for convenience of entry/fiddling
#define rgb 1
const unsigned short camvals_9650[]={
0x1280, // reset - takes a while so add delay after first
0x1180,
0x6b0a, // 4a,
0x6a3e,
0x3b09,
0x13e0,
0x0180,
0x0280,
0x0000,
0x1000,
0x13e5,
0x3943, //43,
0x3812, //12,
0x3700,
0x3591, //91,
0x0e20,
0x1e24 , // b4 vflip b5 xflip
0xa880,
0x1214, // COM7 format sel 40 = vga, 20 = CIF 10 = qvga b3 = QCIF b2=rgb not yuv
0x0400,
0x0c04,
0x0d80,
0x1728, //HSTRT
0x18c9, // 0x18C8, //HSTOP // 78 FOR VGA, C8 QVGA / extra clocks to get clean LCD data
0x1900,//VSTART
0x1a6d,//VSTOP // 1e FOR vga, 3d FOR qvga ad for sxga. Seems to only be a limit so cam be higher than needed witout affecting timing
0x3200, // HREF b2-0 hstart lsb b3-5 hstop lsb b6,7 href offset (rgb align)
0x0326, //0x0327, // VREF b2-0 vstart b5-3 vstop
0x3fa6,
0x145e,// b4-6 AGC max gain - increasing allows higher gain at low light, but noisy
0x1532, // 1522 COM10 B5 only out PCLK during line active time b0 hspol b1 vs pol b4 pclkinv b7 hs/href on hs and pclk gate
0x4100, // b1 matrix coeff double
0x4208,
0x1b00,
0x1606,
0x33e2,
0x34bf,
0x9604,
0x3a00, // 08 swap Y & UV for pixel sampling alignment, 10 send fixed value from reg 67
0x8e00,
0x3c77,
0x8b06,
0x9488,
0x9588,
0x40d1, // b6,7 op range, b3 swap bgr
0x292f, // B4 bypass internal reg
0x0f42,
0x3d90,
0x6940,
0x5cb9,
0x5d96,
0x5e10,
0x59c0,
0x5aaf,
0x5b55,
0x43f0,
0x4410,
0x4568,
0x4696,
0x4760,
0x4880,
0x5fe0,
0x608c,
0x6120,
0xa5d9,
0xa474,
0x8d02,
0x13e7,
// matrix for RGB
0x4fb7,
0x502e,
0x5109,
0x521f,
0x53b1,
0x5412,
0x5506,
0x5655,
0x57db,
0x5877,
0x8c23,
0x3e02,
0xa9b8,
0xaa92,
0xab0a,
0x8fdf,
0x9000,
0x9100,
0x9f00,
0xa000,
0x3a01,
0x2470,
0x2564,
0x26c3,
0x2a10, // 00 for 60Hz lighting , 10 for 50Hz
0x2b40, // 00 for 60Hz, 40 for 50Hz
0x6c40,
0x6d30,
0x6e4b,
0x6f60,
0x7070,
0x7170,
0x7270,
0x7370,
0x7460,
0x7560,
0x7650,
0x7748,
0x783a,
0x792e,
0x7a28,
0x7b22,
0x7c04,
0x7d07,
0x7e10,
0x7f28,
0x8036,
0x8144,
0x8252,
0x8360,
0x846c,
0x8578,
0x868c,
0x879e,
0x88bb,
0x89d2,
0x8ae6,
0x0900, // output drive strength b0,1
0x1180, // initial one seems to be ignored - B7 pll en, b0..5 prescaler
};
unsigned short camvals_9650_mono[]={
//0x1210, // COM7 format sel 40 = vga, 10 = qvga b2=rgb not yuv
//matrix for YUV
0x40c1,
0x4102, // coeff double
0x4f3a,
0x503d,
0x5103,
0x5212,
0x5326,
0x5438,
0x5540,
0x5640,
0x5740,
0x580d
};