SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Hardwares/OV2640RegProg.h@100:ffbeefc9e218, 2017-04-20 (annotated)
- Committer:
- hazheng
- Date:
- Thu Apr 20 21:04:10 2017 +0000
- Revision:
- 100:ffbeefc9e218
- Parent:
- 91:7b1910ca3ad6
Better version of Intersection detection.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hazheng | 91:7b1910ca3ad6 | 1 | /** |
hazheng | 91:7b1910ca3ad6 | 2 | * @file OV2640RegProg.h |
hazheng | 91:7b1910ca3ad6 | 3 | * @brief The header file for all OV2640 register programs. Note: Part of the register program come from the ArduCam Arduino source code. |
hazheng | 91:7b1910ca3ad6 | 4 | * @author Jordan Brack <jabrack@mix.wvu.edu>, Haofan Zheng <hazheng@mix.wvu.edu> |
hazheng | 91:7b1910ca3ad6 | 5 | * |
hazheng | 91:7b1910ca3ad6 | 6 | */ |
hazheng | 29:f87d8790f57d | 7 | #pragma once |
hazheng | 29:f87d8790f57d | 8 | #ifndef OV2640_REG_PROG_H |
hazheng | 29:f87d8790f57d | 9 | #define OV2640_REG_PROG_H |
hazheng | 29:f87d8790f57d | 10 | |
hazheng | 30:ff7f83ad6369 | 11 | #include "CamRegDefinitions.h" |
hazheng | 29:f87d8790f57d | 12 | |
hazheng | 36:7e747e19f660 | 13 | #if defined(ARDUCAM_OV2640) |
hazheng | 36:7e747e19f660 | 14 | |
hazheng | 91:7b1910ca3ad6 | 15 | #define CAM_SCCB_WRITE 0x60 /*!< @brief SCCB slave write address for OV2640. */ |
hazheng | 91:7b1910ca3ad6 | 16 | #define CAM_SCCB_READ 0x61 /*!< @brief SCCB slave read address for OV2640. */ |
hazheng | 29:f87d8790f57d | 17 | |
hazheng | 91:7b1910ca3ad6 | 18 | #define CAM_PID_VALUE 0x26 /*!< @brief PID value for the OV2640. */ |
hazheng | 91:7b1910ca3ad6 | 19 | #define CAM_VER_VALUE 0x42 /*!< @brief VER value for the OV2640. */ |
hazheng | 29:f87d8790f57d | 20 | |
hazheng | 91:7b1910ca3ad6 | 21 | #define CAM_PID_ADDR 0x0A /*!< @brief Address that stores the PID value for the OV2640. */ |
hazheng | 91:7b1910ca3ad6 | 22 | #define CAM_VER_ADDR 0x0B /*!< @brief Address that stores the VER value for the OV2640. */ |
hazheng | 30:ff7f83ad6369 | 23 | |
hazheng | 46:a5eb9bd3bb55 | 24 | //namespace OV2640Prog |
hazheng | 46:a5eb9bd3bb55 | 25 | //{ |
hazheng | 33:e3fcc4d6bb9b | 26 | |
hazheng | 91:7b1910ca3ad6 | 27 | const struct sensor_reg ResetProg[] = /*!< @brief The register program used to reset the camera chip. */ |
hazheng | 36:7e747e19f660 | 28 | { |
hazheng | 36:7e747e19f660 | 29 | {0xff, 0x01}, |
hazheng | 36:7e747e19f660 | 30 | {0x12, 0x80}, |
hazheng | 36:7e747e19f660 | 31 | {0xff, 0xff}, |
hazheng | 36:7e747e19f660 | 32 | }; |
hazheng | 36:7e747e19f660 | 33 | |
hazheng | 33:e3fcc4d6bb9b | 34 | #if (defined(RESOLUTION_WIDTH) && RESOLUTION_WIDTH == 800) && (defined(RESOLUTION_HEIGHT) && RESOLUTION_HEIGHT == 600) |
hazheng | 91:7b1910ca3ad6 | 35 | const struct sensor_reg SVGA[] = /*!< @brief The register program used to init the SVGA RGB565 output. */ |
hazheng | 32:5badeff825dc | 36 | { |
hazheng | 33:e3fcc4d6bb9b | 37 | {0xff, 0x00}, |
hazheng | 32:5badeff825dc | 38 | {0x2c, 0xff}, |
hazheng | 32:5badeff825dc | 39 | {0x2e, 0xdf}, |
hazheng | 32:5badeff825dc | 40 | {0xff, 0x01}, |
hazheng | 32:5badeff825dc | 41 | {0x3c, 0x32}, |
hazheng | 32:5badeff825dc | 42 | // |
hazheng | 32:5badeff825dc | 43 | {0x11, 0x00}, |
hazheng | 32:5badeff825dc | 44 | {0x09, 0x02}, |
hazheng | 32:5badeff825dc | 45 | {0x04, 0x28}, |
hazheng | 32:5badeff825dc | 46 | {0x13, 0xe5}, |
hazheng | 32:5badeff825dc | 47 | {0x14, 0x48}, |
hazheng | 32:5badeff825dc | 48 | |
hazheng | 32:5badeff825dc | 49 | {0x2c, 0x0c}, |
hazheng | 32:5badeff825dc | 50 | {0x33, 0x78}, |
hazheng | 32:5badeff825dc | 51 | {0x3a, 0x33}, |
hazheng | 32:5badeff825dc | 52 | {0x3b, 0xfB}, |
hazheng | 32:5badeff825dc | 53 | // |
hazheng | 32:5badeff825dc | 54 | {0x3e, 0x00}, |
hazheng | 32:5badeff825dc | 55 | {0x43, 0x11}, |
hazheng | 32:5badeff825dc | 56 | {0x16, 0x10}, |
hazheng | 32:5badeff825dc | 57 | // |
hazheng | 32:5badeff825dc | 58 | {0x39, 0x92}, |
hazheng | 32:5badeff825dc | 59 | // |
hazheng | 32:5badeff825dc | 60 | {0x35, 0xda}, |
hazheng | 32:5badeff825dc | 61 | {0x22, 0x1a}, |
hazheng | 32:5badeff825dc | 62 | {0x37, 0xc3}, |
hazheng | 32:5badeff825dc | 63 | {0x23, 0x00}, |
hazheng | 32:5badeff825dc | 64 | {0x34, 0xc0}, |
hazheng | 32:5badeff825dc | 65 | {0x36, 0x1a}, |
hazheng | 32:5badeff825dc | 66 | {0x06, 0x88}, |
hazheng | 32:5badeff825dc | 67 | {0x07, 0xc0}, |
hazheng | 32:5badeff825dc | 68 | {0x0d, 0x87}, |
hazheng | 32:5badeff825dc | 69 | {0x0e, 0x41}, |
hazheng | 32:5badeff825dc | 70 | {0x4c, 0x00}, |
hazheng | 32:5badeff825dc | 71 | {0x48, 0x00}, |
hazheng | 32:5badeff825dc | 72 | {0x5B, 0x00}, |
hazheng | 32:5badeff825dc | 73 | {0x42, 0x03}, |
hazheng | 32:5badeff825dc | 74 | // |
hazheng | 32:5badeff825dc | 75 | {0x4a, 0x81}, |
hazheng | 32:5badeff825dc | 76 | {0x21, 0x99}, |
hazheng | 32:5badeff825dc | 77 | // |
hazheng | 32:5badeff825dc | 78 | {0x24, 0x40}, |
hazheng | 32:5badeff825dc | 79 | {0x25, 0x38}, |
hazheng | 32:5badeff825dc | 80 | {0x26, 0x82}, |
hazheng | 32:5badeff825dc | 81 | {0x5c, 0x00}, |
hazheng | 32:5badeff825dc | 82 | {0x63, 0x00}, |
hazheng | 32:5badeff825dc | 83 | {0x46, 0x22}, |
hazheng | 32:5badeff825dc | 84 | {0x0c, 0x3c}, |
hazheng | 32:5badeff825dc | 85 | // |
hazheng | 32:5badeff825dc | 86 | {0x61, 0x70}, |
hazheng | 32:5badeff825dc | 87 | {0x62, 0x80}, |
hazheng | 32:5badeff825dc | 88 | {0x7c, 0x05}, |
hazheng | 32:5badeff825dc | 89 | // |
hazheng | 32:5badeff825dc | 90 | {0x20, 0x80}, |
hazheng | 32:5badeff825dc | 91 | {0x28, 0x30}, |
hazheng | 32:5badeff825dc | 92 | {0x6c, 0x00}, |
hazheng | 32:5badeff825dc | 93 | {0x6d, 0x80}, |
hazheng | 32:5badeff825dc | 94 | {0x6e, 0x00}, |
hazheng | 32:5badeff825dc | 95 | {0x70, 0x02}, |
hazheng | 32:5badeff825dc | 96 | {0x71, 0x94}, |
hazheng | 32:5badeff825dc | 97 | |
hazheng | 32:5badeff825dc | 98 | {0x73, 0xc1}, |
hazheng | 32:5badeff825dc | 99 | // |
hazheng | 32:5badeff825dc | 100 | {0x12, 0x40}, |
hazheng | 32:5badeff825dc | 101 | {0x17, 0x11}, |
hazheng | 32:5badeff825dc | 102 | {0x18, 0x43}, |
hazheng | 32:5badeff825dc | 103 | {0x19, 0x00}, |
hazheng | 32:5badeff825dc | 104 | {0x1a, 0x4b}, |
hazheng | 32:5badeff825dc | 105 | {0x32, 0x09}, |
hazheng | 32:5badeff825dc | 106 | {0x37, 0xc0}, |
hazheng | 32:5badeff825dc | 107 | {0x4f, 0xca}, |
hazheng | 32:5badeff825dc | 108 | {0x50, 0xa8}, |
hazheng | 32:5badeff825dc | 109 | {0x5a, 0x23}, |
hazheng | 32:5badeff825dc | 110 | {0x6d, 0x00}, |
hazheng | 32:5badeff825dc | 111 | {0x3d, 0x38}, |
hazheng | 32:5badeff825dc | 112 | // |
hazheng | 32:5badeff825dc | 113 | {0xff, 0x00}, |
hazheng | 32:5badeff825dc | 114 | {0xe5, 0x7f}, |
hazheng | 32:5badeff825dc | 115 | {0xf9, 0xc0}, |
hazheng | 32:5badeff825dc | 116 | {0x41, 0x24}, |
hazheng | 32:5badeff825dc | 117 | {0xe0, 0x14}, |
hazheng | 32:5badeff825dc | 118 | {0x76, 0xff}, |
hazheng | 32:5badeff825dc | 119 | {0x33, 0xa0}, |
hazheng | 32:5badeff825dc | 120 | {0x42, 0x20}, |
hazheng | 32:5badeff825dc | 121 | {0x43, 0x18}, |
hazheng | 32:5badeff825dc | 122 | {0x4c, 0x00}, |
hazheng | 32:5badeff825dc | 123 | {0x87, 0xd5}, |
hazheng | 32:5badeff825dc | 124 | {0x88, 0x3f}, |
hazheng | 32:5badeff825dc | 125 | {0xd7, 0x03}, |
hazheng | 32:5badeff825dc | 126 | {0xd9, 0x10}, |
hazheng | 32:5badeff825dc | 127 | {0xd3, 0x82}, |
hazheng | 32:5badeff825dc | 128 | // |
hazheng | 32:5badeff825dc | 129 | {0xc8, 0x08}, |
hazheng | 32:5badeff825dc | 130 | {0xc9, 0x80}, |
hazheng | 32:5badeff825dc | 131 | // |
hazheng | 32:5badeff825dc | 132 | {0x7c, 0x00}, |
hazheng | 32:5badeff825dc | 133 | {0x7d, 0x00}, |
hazheng | 32:5badeff825dc | 134 | {0x7c, 0x03}, |
hazheng | 32:5badeff825dc | 135 | {0x7d, 0x48}, |
hazheng | 32:5badeff825dc | 136 | {0x7d, 0x48}, |
hazheng | 32:5badeff825dc | 137 | {0x7c, 0x08}, |
hazheng | 32:5badeff825dc | 138 | {0x7d, 0x20}, |
hazheng | 32:5badeff825dc | 139 | {0x7d, 0x10}, |
hazheng | 32:5badeff825dc | 140 | {0x7d, 0x0e}, |
hazheng | 32:5badeff825dc | 141 | // |
hazheng | 32:5badeff825dc | 142 | {0x90, 0x00}, |
hazheng | 32:5badeff825dc | 143 | {0x91, 0x0e}, |
hazheng | 32:5badeff825dc | 144 | {0x91, 0x1a}, |
hazheng | 32:5badeff825dc | 145 | {0x91, 0x31}, |
hazheng | 32:5badeff825dc | 146 | |
hazheng | 32:5badeff825dc | 147 | {0x91, 0x5a}, |
hazheng | 32:5badeff825dc | 148 | {0x91, 0x69}, |
hazheng | 32:5badeff825dc | 149 | {0x91, 0x75}, |
hazheng | 32:5badeff825dc | 150 | {0x91, 0x7e}, |
hazheng | 32:5badeff825dc | 151 | {0x91, 0x88}, |
hazheng | 32:5badeff825dc | 152 | {0x91, 0x8f}, |
hazheng | 32:5badeff825dc | 153 | {0x91, 0x96}, |
hazheng | 32:5badeff825dc | 154 | {0x91, 0xa3}, |
hazheng | 32:5badeff825dc | 155 | {0x91, 0xaf}, |
hazheng | 32:5badeff825dc | 156 | {0x91, 0xc4}, |
hazheng | 32:5badeff825dc | 157 | {0x91, 0xd7}, |
hazheng | 32:5badeff825dc | 158 | {0x91, 0xe8}, |
hazheng | 32:5badeff825dc | 159 | {0x91, 0x20}, |
hazheng | 32:5badeff825dc | 160 | // |
hazheng | 32:5badeff825dc | 161 | {0x92, 0x00}, |
hazheng | 32:5badeff825dc | 162 | {0x93, 0x06}, |
hazheng | 32:5badeff825dc | 163 | {0x93, 0xe3}, |
hazheng | 32:5badeff825dc | 164 | {0x93, 0x05}, |
hazheng | 32:5badeff825dc | 165 | {0x93, 0x05}, |
hazheng | 32:5badeff825dc | 166 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 167 | {0x93, 0x04}, |
hazheng | 32:5badeff825dc | 168 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 169 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 170 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 171 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 172 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 173 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 174 | {0x93, 0x00}, |
hazheng | 32:5badeff825dc | 175 | // |
hazheng | 32:5badeff825dc | 176 | {0x96, 0x00}, |
hazheng | 32:5badeff825dc | 177 | {0x97, 0x08}, |
hazheng | 32:5badeff825dc | 178 | {0x97, 0x19}, |
hazheng | 32:5badeff825dc | 179 | {0x97, 0x02}, |
hazheng | 32:5badeff825dc | 180 | {0x97, 0x0c}, |
hazheng | 32:5badeff825dc | 181 | {0x97, 0x24}, |
hazheng | 32:5badeff825dc | 182 | {0x97, 0x30}, |
hazheng | 32:5badeff825dc | 183 | {0x97, 0x28}, |
hazheng | 32:5badeff825dc | 184 | {0x97, 0x26}, |
hazheng | 32:5badeff825dc | 185 | {0x97, 0x02}, |
hazheng | 32:5badeff825dc | 186 | {0x97, 0x98}, |
hazheng | 32:5badeff825dc | 187 | {0x97, 0x80}, |
hazheng | 32:5badeff825dc | 188 | {0x97, 0x00}, |
hazheng | 32:5badeff825dc | 189 | {0x97, 0x00}, |
hazheng | 32:5badeff825dc | 190 | // |
hazheng | 32:5badeff825dc | 191 | {0xc3, 0xed}, |
hazheng | 32:5badeff825dc | 192 | {0xa4, 0x00}, |
hazheng | 32:5badeff825dc | 193 | {0xa8, 0x00}, |
hazheng | 32:5badeff825dc | 194 | {0xc5, 0x11}, |
hazheng | 32:5badeff825dc | 195 | |
hazheng | 32:5badeff825dc | 196 | {0xc6, 0x51}, |
hazheng | 32:5badeff825dc | 197 | {0xbf, 0x80}, |
hazheng | 32:5badeff825dc | 198 | {0xc7, 0x10}, |
hazheng | 32:5badeff825dc | 199 | {0xb6, 0x66}, |
hazheng | 32:5badeff825dc | 200 | {0xb8, 0xA5}, |
hazheng | 32:5badeff825dc | 201 | {0xb7, 0x64}, |
hazheng | 32:5badeff825dc | 202 | {0xb9, 0x7C}, |
hazheng | 32:5badeff825dc | 203 | {0xb3, 0xaf}, |
hazheng | 32:5badeff825dc | 204 | {0xb4, 0x97}, |
hazheng | 32:5badeff825dc | 205 | {0xb5, 0xFF}, |
hazheng | 32:5badeff825dc | 206 | {0xb0, 0xC5}, |
hazheng | 32:5badeff825dc | 207 | {0xb1, 0x94}, |
hazheng | 32:5badeff825dc | 208 | {0xb2, 0x0f}, |
hazheng | 32:5badeff825dc | 209 | {0xc4, 0x5c}, |
hazheng | 32:5badeff825dc | 210 | // |
hazheng | 32:5badeff825dc | 211 | {0xc0, 0x64}, |
hazheng | 32:5badeff825dc | 212 | {0xc1, 0x4B}, |
hazheng | 32:5badeff825dc | 213 | {0x8c, 0x00}, |
hazheng | 32:5badeff825dc | 214 | {0x86, 0x3D}, |
hazheng | 32:5badeff825dc | 215 | {0x50, 0x00}, |
hazheng | 32:5badeff825dc | 216 | {0x51, 0xC8}, |
hazheng | 32:5badeff825dc | 217 | {0x52, 0x96}, |
hazheng | 32:5badeff825dc | 218 | {0x53, 0x00}, |
hazheng | 32:5badeff825dc | 219 | {0x54, 0x00}, |
hazheng | 32:5badeff825dc | 220 | {0x55, 0x00}, |
hazheng | 32:5badeff825dc | 221 | {0x5a, 0xC8}, |
hazheng | 32:5badeff825dc | 222 | {0x5b, 0x96}, |
hazheng | 32:5badeff825dc | 223 | {0x5c, 0x00}, |
hazheng | 32:5badeff825dc | 224 | {0xd3, 0x82}, |
hazheng | 32:5badeff825dc | 225 | // |
hazheng | 32:5badeff825dc | 226 | {0xc3, 0xed}, |
hazheng | 32:5badeff825dc | 227 | {0x7f, 0x00}, |
hazheng | 32:5badeff825dc | 228 | // |
hazheng | 32:5badeff825dc | 229 | {0xda, 0x08}, |
hazheng | 32:5badeff825dc | 230 | // |
hazheng | 32:5badeff825dc | 231 | {0xe5, 0x1f}, |
hazheng | 32:5badeff825dc | 232 | {0xe1, 0x67}, |
hazheng | 32:5badeff825dc | 233 | {0xe0, 0x00}, |
hazheng | 32:5badeff825dc | 234 | {0xdd, 0x7f}, |
hazheng | 32:5badeff825dc | 235 | {0x05, 0x00}, |
hazheng | 30:ff7f83ad6369 | 236 | |
hazheng | 32:5badeff825dc | 237 | {0xff, 0xff} |
hazheng | 32:5badeff825dc | 238 | }; |
hazheng | 33:e3fcc4d6bb9b | 239 | #endif // 800 X 600 |
hazheng | 32:5badeff825dc | 240 | |
hazheng | 34:f79db3bc2f86 | 241 | //#if (defined(RESOLUTION_WIDTH) && RESOLUTION_WIDTH == 320) && (defined(RESOLUTION_HEIGHT) && RESOLUTION_HEIGHT == 240) |
hazheng | 91:7b1910ca3ad6 | 242 | const struct sensor_reg QVGA[] = /*!< @brief The register program used to init the VGA, QVGA, QQVGA in RGB565 output. */ |
hazheng | 34:f79db3bc2f86 | 243 | { |
hazheng | 48:f76b5e252444 | 244 | {0xff, 0x00}, //Bank 0 |
hazheng | 34:f79db3bc2f86 | 245 | {0x2c, 0xff}, |
hazheng | 34:f79db3bc2f86 | 246 | {0x2e, 0xdf}, |
hazheng | 48:f76b5e252444 | 247 | {0xff, 0x01}, //Bank 1 |
hazheng | 34:f79db3bc2f86 | 248 | {0x3c, 0x32}, |
hazheng | 48:f76b5e252444 | 249 | {0x11, 0x80}, /////////// //CLCK Speed |
hazheng | 34:f79db3bc2f86 | 250 | {0x09, 0x02}, |
hazheng | 44:15de535c4005 | 251 | {0x04, 0x68}, /////////// //Horizontal Mirror |
hazheng | 34:f79db3bc2f86 | 252 | {0x13, 0xe5}, |
hazheng | 34:f79db3bc2f86 | 253 | {0x14, 0x48}, |
hazheng | 34:f79db3bc2f86 | 254 | {0x2c, 0x0c}, |
hazheng | 34:f79db3bc2f86 | 255 | {0x33, 0x78}, |
hazheng | 34:f79db3bc2f86 | 256 | {0x3a, 0x33}, |
hazheng | 34:f79db3bc2f86 | 257 | {0x3b, 0xfb}, |
hazheng | 34:f79db3bc2f86 | 258 | {0x3e, 0x00}, |
hazheng | 34:f79db3bc2f86 | 259 | {0x43, 0x11}, |
hazheng | 34:f79db3bc2f86 | 260 | {0x16, 0x10}, |
hazheng | 34:f79db3bc2f86 | 261 | {0x39, 0x02}, |
hazheng | 34:f79db3bc2f86 | 262 | {0x35, 0x88}, |
hazheng | 34:f79db3bc2f86 | 263 | |
hazheng | 34:f79db3bc2f86 | 264 | {0x22, 0x0a}, |
hazheng | 34:f79db3bc2f86 | 265 | {0x37, 0x40}, |
hazheng | 34:f79db3bc2f86 | 266 | {0x23, 0x00}, |
hazheng | 34:f79db3bc2f86 | 267 | {0x34, 0xa0}, |
hazheng | 34:f79db3bc2f86 | 268 | {0x06, 0x02}, |
hazheng | 34:f79db3bc2f86 | 269 | {0x06, 0x88}, |
hazheng | 34:f79db3bc2f86 | 270 | {0x07, 0xc0}, |
hazheng | 34:f79db3bc2f86 | 271 | {0x0d, 0xb7}, |
hazheng | 34:f79db3bc2f86 | 272 | {0x0e, 0x01}, |
hazheng | 34:f79db3bc2f86 | 273 | {0x4c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 274 | {0x4a, 0x81}, |
hazheng | 34:f79db3bc2f86 | 275 | {0x21, 0x99}, |
hazheng | 34:f79db3bc2f86 | 276 | {0x24, 0x40}, |
hazheng | 34:f79db3bc2f86 | 277 | {0x25, 0x38}, |
hazheng | 34:f79db3bc2f86 | 278 | {0x26, 0x82}, |
hazheng | 34:f79db3bc2f86 | 279 | {0x5c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 280 | {0x63, 0x00}, |
hazheng | 34:f79db3bc2f86 | 281 | {0x46, 0x22}, |
hazheng | 34:f79db3bc2f86 | 282 | {0x0c, 0x3a}, |
hazheng | 34:f79db3bc2f86 | 283 | {0x5d, 0x55}, |
hazheng | 34:f79db3bc2f86 | 284 | {0x5e, 0x7d}, |
hazheng | 34:f79db3bc2f86 | 285 | {0x5f, 0x7d}, |
hazheng | 34:f79db3bc2f86 | 286 | {0x60, 0x55}, |
hazheng | 34:f79db3bc2f86 | 287 | {0x61, 0x70}, |
hazheng | 34:f79db3bc2f86 | 288 | {0x62, 0x80}, |
hazheng | 34:f79db3bc2f86 | 289 | {0x7c, 0x05}, |
hazheng | 34:f79db3bc2f86 | 290 | {0x20, 0x80}, |
hazheng | 34:f79db3bc2f86 | 291 | {0x28, 0x30}, |
hazheng | 34:f79db3bc2f86 | 292 | {0x6c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 293 | {0x6d, 0x80}, |
hazheng | 34:f79db3bc2f86 | 294 | {0x6e, 0x00}, |
hazheng | 34:f79db3bc2f86 | 295 | {0x70, 0x02}, |
hazheng | 34:f79db3bc2f86 | 296 | {0x71, 0x94}, |
hazheng | 34:f79db3bc2f86 | 297 | {0x73, 0xc1}, |
hazheng | 34:f79db3bc2f86 | 298 | {0x3d, 0x34}, |
hazheng | 34:f79db3bc2f86 | 299 | {0x12, 0x04}, |
hazheng | 34:f79db3bc2f86 | 300 | {0x5a, 0x57}, |
hazheng | 34:f79db3bc2f86 | 301 | {0x4f, 0xbb}, |
hazheng | 34:f79db3bc2f86 | 302 | {0x50, 0x9c}, |
hazheng | 34:f79db3bc2f86 | 303 | {0xff, 0x00}, |
hazheng | 34:f79db3bc2f86 | 304 | {0xe5, 0x7f}, |
hazheng | 34:f79db3bc2f86 | 305 | {0xf9, 0xc0}, |
hazheng | 34:f79db3bc2f86 | 306 | {0x41, 0x24}, |
hazheng | 34:f79db3bc2f86 | 307 | {0xe0, 0x14}, |
hazheng | 34:f79db3bc2f86 | 308 | {0x76, 0xff}, |
hazheng | 34:f79db3bc2f86 | 309 | {0x33, 0xa0}, |
hazheng | 34:f79db3bc2f86 | 310 | {0x42, 0x20}, |
hazheng | 34:f79db3bc2f86 | 311 | {0x43, 0x18}, |
hazheng | 34:f79db3bc2f86 | 312 | {0x4c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 313 | {0x87, 0xd0}, |
hazheng | 34:f79db3bc2f86 | 314 | {0x88, 0x3f}, |
hazheng | 34:f79db3bc2f86 | 315 | {0xd7, 0x03}, |
hazheng | 34:f79db3bc2f86 | 316 | {0xd9, 0x10}, |
hazheng | 34:f79db3bc2f86 | 317 | {0xd3, 0x82}, |
hazheng | 34:f79db3bc2f86 | 318 | {0xc8, 0x08}, |
hazheng | 34:f79db3bc2f86 | 319 | {0xc9, 0x80}, |
hazheng | 34:f79db3bc2f86 | 320 | {0x7c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 321 | {0x7d, 0x00}, |
hazheng | 34:f79db3bc2f86 | 322 | {0x7c, 0x03}, |
hazheng | 34:f79db3bc2f86 | 323 | {0x7d, 0x48}, |
hazheng | 34:f79db3bc2f86 | 324 | {0x7d, 0x48}, |
hazheng | 34:f79db3bc2f86 | 325 | {0x7c, 0x08}, |
hazheng | 34:f79db3bc2f86 | 326 | {0x7d, 0x00}, //Gamma Correction? |
hazheng | 34:f79db3bc2f86 | 327 | {0x7d, 0x10}, |
hazheng | 34:f79db3bc2f86 | 328 | {0x7d, 0x0e}, |
hazheng | 34:f79db3bc2f86 | 329 | {0x90, 0x00}, |
hazheng | 34:f79db3bc2f86 | 330 | {0x91, 0x0e}, |
hazheng | 34:f79db3bc2f86 | 331 | {0x91, 0x1a}, |
hazheng | 34:f79db3bc2f86 | 332 | {0x91, 0x31}, |
hazheng | 34:f79db3bc2f86 | 333 | {0x91, 0x5a}, |
hazheng | 34:f79db3bc2f86 | 334 | {0x91, 0x69}, |
hazheng | 34:f79db3bc2f86 | 335 | {0x91, 0x75}, |
hazheng | 34:f79db3bc2f86 | 336 | {0x91, 0x7e}, |
hazheng | 34:f79db3bc2f86 | 337 | {0x91, 0x88}, |
hazheng | 34:f79db3bc2f86 | 338 | {0x91, 0x8f}, |
hazheng | 34:f79db3bc2f86 | 339 | {0x91, 0x96}, |
hazheng | 34:f79db3bc2f86 | 340 | {0x91, 0xa3}, |
hazheng | 34:f79db3bc2f86 | 341 | {0x91, 0xaf}, |
hazheng | 34:f79db3bc2f86 | 342 | {0x91, 0xc4}, |
hazheng | 34:f79db3bc2f86 | 343 | {0x91, 0xd7}, |
hazheng | 34:f79db3bc2f86 | 344 | {0x91, 0xe8}, |
hazheng | 34:f79db3bc2f86 | 345 | {0x91, 0x20}, |
hazheng | 34:f79db3bc2f86 | 346 | {0x92, 0x00}, |
hazheng | 34:f79db3bc2f86 | 347 | |
hazheng | 34:f79db3bc2f86 | 348 | {0x93, 0x06}, |
hazheng | 34:f79db3bc2f86 | 349 | {0x93, 0xe3}, |
hazheng | 34:f79db3bc2f86 | 350 | {0x93, 0x03}, |
hazheng | 34:f79db3bc2f86 | 351 | {0x93, 0x03}, |
hazheng | 34:f79db3bc2f86 | 352 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 353 | {0x93, 0x02}, |
hazheng | 34:f79db3bc2f86 | 354 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 355 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 356 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 357 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 358 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 359 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 360 | {0x93, 0x00}, |
hazheng | 34:f79db3bc2f86 | 361 | {0x96, 0x00}, |
hazheng | 34:f79db3bc2f86 | 362 | {0x97, 0x08}, |
hazheng | 34:f79db3bc2f86 | 363 | {0x97, 0x19}, |
hazheng | 34:f79db3bc2f86 | 364 | {0x97, 0x02}, |
hazheng | 34:f79db3bc2f86 | 365 | {0x97, 0x0c}, |
hazheng | 34:f79db3bc2f86 | 366 | {0x97, 0x24}, |
hazheng | 34:f79db3bc2f86 | 367 | {0x97, 0x30}, |
hazheng | 34:f79db3bc2f86 | 368 | {0x97, 0x28}, |
hazheng | 34:f79db3bc2f86 | 369 | {0x97, 0x26}, |
hazheng | 34:f79db3bc2f86 | 370 | {0x97, 0x02}, |
hazheng | 34:f79db3bc2f86 | 371 | {0x97, 0x98}, |
hazheng | 34:f79db3bc2f86 | 372 | {0x97, 0x80}, |
hazheng | 34:f79db3bc2f86 | 373 | {0x97, 0x00}, |
hazheng | 34:f79db3bc2f86 | 374 | {0x97, 0x00}, |
hazheng | 34:f79db3bc2f86 | 375 | {0xa4, 0x00}, |
hazheng | 34:f79db3bc2f86 | 376 | {0xa8, 0x00}, |
hazheng | 34:f79db3bc2f86 | 377 | {0xc5, 0x11}, |
hazheng | 34:f79db3bc2f86 | 378 | {0xc6, 0x51}, |
hazheng | 34:f79db3bc2f86 | 379 | {0xbf, 0x80}, |
hazheng | 34:f79db3bc2f86 | 380 | {0xc7, 0x10}, |
hazheng | 34:f79db3bc2f86 | 381 | {0xb6, 0x66}, |
hazheng | 34:f79db3bc2f86 | 382 | {0xb8, 0xa5}, |
hazheng | 34:f79db3bc2f86 | 383 | {0xb7, 0x64}, |
hazheng | 34:f79db3bc2f86 | 384 | {0xb9, 0x7c}, |
hazheng | 34:f79db3bc2f86 | 385 | {0xb3, 0xaf}, |
hazheng | 34:f79db3bc2f86 | 386 | {0xb4, 0x97}, |
hazheng | 34:f79db3bc2f86 | 387 | {0xb5, 0xff}, |
hazheng | 34:f79db3bc2f86 | 388 | {0xb0, 0xc5}, |
hazheng | 34:f79db3bc2f86 | 389 | {0xb1, 0x94}, |
hazheng | 34:f79db3bc2f86 | 390 | {0xb2, 0x0f}, |
hazheng | 34:f79db3bc2f86 | 391 | {0xc4, 0x5c}, |
hazheng | 34:f79db3bc2f86 | 392 | {0xa6, 0x00}, |
hazheng | 34:f79db3bc2f86 | 393 | {0xa7, 0x20}, |
hazheng | 34:f79db3bc2f86 | 394 | {0xa7, 0xd8}, |
hazheng | 34:f79db3bc2f86 | 395 | {0xa7, 0x1b}, |
hazheng | 34:f79db3bc2f86 | 396 | {0xa7, 0x31}, |
hazheng | 34:f79db3bc2f86 | 397 | {0xa7, 0x00}, |
hazheng | 34:f79db3bc2f86 | 398 | {0xa7, 0x18}, |
hazheng | 34:f79db3bc2f86 | 399 | {0xa7, 0x20}, |
hazheng | 34:f79db3bc2f86 | 400 | {0xa7, 0xd8}, |
hazheng | 34:f79db3bc2f86 | 401 | {0xa7, 0x19}, |
hazheng | 34:f79db3bc2f86 | 402 | {0xa7, 0x31}, |
hazheng | 34:f79db3bc2f86 | 403 | {0xa7, 0x00}, |
hazheng | 34:f79db3bc2f86 | 404 | {0xa7, 0x18}, |
hazheng | 34:f79db3bc2f86 | 405 | {0xa7, 0x20}, |
hazheng | 34:f79db3bc2f86 | 406 | {0xa7, 0xd8}, |
hazheng | 34:f79db3bc2f86 | 407 | {0xa7, 0x19}, |
hazheng | 34:f79db3bc2f86 | 408 | {0xa7, 0x31}, |
hazheng | 34:f79db3bc2f86 | 409 | {0xa7, 0x00}, |
hazheng | 34:f79db3bc2f86 | 410 | {0xa7, 0x18}, |
hazheng | 34:f79db3bc2f86 | 411 | {0x7f, 0x00}, |
hazheng | 34:f79db3bc2f86 | 412 | {0xe5, 0x1f}, |
hazheng | 34:f79db3bc2f86 | 413 | {0xe1, 0x77}, |
hazheng | 34:f79db3bc2f86 | 414 | {0xdd, 0x7f}, |
hazheng | 34:f79db3bc2f86 | 415 | {0xc2, 0x0e}, |
hazheng | 34:f79db3bc2f86 | 416 | |
hazheng | 34:f79db3bc2f86 | 417 | {0xff, 0x00}, |
hazheng | 34:f79db3bc2f86 | 418 | {0xe0, 0x04}, |
hazheng | 70:311d32a596db | 419 | |
hazheng | 70:311d32a596db | 420 | ///////////////// |
hazheng | 70:311d32a596db | 421 | {0x8c, 0x00}, |
hazheng | 34:f79db3bc2f86 | 422 | {0xc0, 0xc8}, |
hazheng | 34:f79db3bc2f86 | 423 | {0xc1, 0x96}, |
hazheng | 70:311d32a596db | 424 | ///////////////// |
hazheng | 70:311d32a596db | 425 | |
hazheng | 34:f79db3bc2f86 | 426 | {0x86, 0x3d}, |
hazheng | 70:311d32a596db | 427 | |
hazheng | 70:311d32a596db | 428 | ///////////////// |
hazheng | 34:f79db3bc2f86 | 429 | {0x51, 0x90}, |
hazheng | 34:f79db3bc2f86 | 430 | {0x52, 0x2c}, |
hazheng | 34:f79db3bc2f86 | 431 | {0x53, 0x00}, |
hazheng | 34:f79db3bc2f86 | 432 | {0x54, 0x00}, |
hazheng | 34:f79db3bc2f86 | 433 | {0x55, 0x88}, |
hazheng | 34:f79db3bc2f86 | 434 | {0x57, 0x00}, |
hazheng | 70:311d32a596db | 435 | //////////////// |
hazheng | 34:f79db3bc2f86 | 436 | |
hazheng | 70:311d32a596db | 437 | #if (defined(RESOLUTION_WIDTH) && RESOLUTION_WIDTH == 320) && (defined(RESOLUTION_HEIGHT) && RESOLUTION_HEIGHT == 240) |
hazheng | 34:f79db3bc2f86 | 438 | {0x50, 0x92}, |
hazheng | 34:f79db3bc2f86 | 439 | {0x5a, 0x50}, //Zoom |
hazheng | 34:f79db3bc2f86 | 440 | {0x5b, 0x3C}, //Zoom |
hazheng | 34:f79db3bc2f86 | 441 | {0x5c, 0x00}, //Zoom |
hazheng | 36:7e747e19f660 | 442 | #elif (defined(RESOLUTION_WIDTH) && RESOLUTION_WIDTH == 160) && (defined(RESOLUTION_HEIGHT) && RESOLUTION_HEIGHT == 120) |
hazheng | 70:311d32a596db | 443 | {0x50, 0x92}, |
hazheng | 34:f79db3bc2f86 | 444 | {0x5a, 0x28}, //Zoom |
hazheng | 34:f79db3bc2f86 | 445 | {0x5b, 0x1E}, //Zoom |
hazheng | 34:f79db3bc2f86 | 446 | {0x5c, 0x00}, //Zoom |
hazheng | 44:15de535c4005 | 447 | #elif (defined(RESOLUTION_WIDTH) && RESOLUTION_WIDTH == 80) && (defined(RESOLUTION_HEIGHT) && RESOLUTION_HEIGHT == 60) |
hazheng | 70:311d32a596db | 448 | {0x50, 0xA4}, |
hazheng | 44:15de535c4005 | 449 | {0x5a, 0x14}, //Zoom |
hazheng | 44:15de535c4005 | 450 | {0x5b, 0x0F}, //Zoom |
hazheng | 44:15de535c4005 | 451 | {0x5c, 0x00}, //Zoom |
hazheng | 36:7e747e19f660 | 452 | |
hazheng | 36:7e747e19f660 | 453 | #else |
hazheng | 36:7e747e19f660 | 454 | #error Must pick one valid resolution!! |
hazheng | 34:f79db3bc2f86 | 455 | #endif |
hazheng | 34:f79db3bc2f86 | 456 | |
hazheng | 34:f79db3bc2f86 | 457 | {0xd3, 0x04}, |
hazheng | 34:f79db3bc2f86 | 458 | {0xe0, 0x00}, |
hazheng | 34:f79db3bc2f86 | 459 | |
hazheng | 34:f79db3bc2f86 | 460 | {0xff, 0x00}, |
hazheng | 34:f79db3bc2f86 | 461 | {0x05, 0x00}, |
hazheng | 34:f79db3bc2f86 | 462 | |
hazheng | 34:f79db3bc2f86 | 463 | {0xda, 0x08}, |
hazheng | 34:f79db3bc2f86 | 464 | {0xd7, 0x03}, |
hazheng | 34:f79db3bc2f86 | 465 | {0xe0, 0x00}, |
hazheng | 34:f79db3bc2f86 | 466 | |
hazheng | 34:f79db3bc2f86 | 467 | {0x05, 0x00}, |
hazheng | 34:f79db3bc2f86 | 468 | |
hazheng | 34:f79db3bc2f86 | 469 | |
hazheng | 34:f79db3bc2f86 | 470 | {0xff, 0xff}, |
hazheng | 34:f79db3bc2f86 | 471 | }; |
hazheng | 34:f79db3bc2f86 | 472 | //#endif //320 X 240 |
hazheng | 34:f79db3bc2f86 | 473 | |
hazheng | 36:7e747e19f660 | 474 | #endif //ARDUCAM_OV2640 |
hazheng | 36:7e747e19f660 | 475 | |
hazheng | 29:f87d8790f57d | 476 | #endif //OV2640_REG_PROG_H |