The associated register address for the sensor ID setting in the camera ov2685

Source: Internet
Author: User

OV2685:

chip_id

address:0x300a default:0x26

address:0x300b default:0x85

address:0x300c defailt:0x00

Back to the morning of the topic, if I want to check the ID of the camera, my code can write so, in the Gpl329a-sensor-id settings there is complete code, here I only give a small part:

Sensor_info.write_data[0] = 0x30;  SENSOR_INFO.WRITE_DATA[1] = 0x0a;  Sensor_info.write_size = 2;sensor_info.read_size = 2;ret = IOCTL (FD, I2c_bus_write_read, &sensor_info); if (Ret < 0 {<span style= "White-space:pre" ></span>perror ("IOCTL set i²c arg\n"); continue;} Readdevice = (Sensor_info.read_data[0] << 8) + sensor_info.read_data[1];//if (Readdevice = = 0x2656) if (Readdevice = = 0x2685) {DEBUG ("i2c_bus_write_read data = 0x%02x\n", readdevice); i = Max_device + 1;<span style= "White-space:pre" ></span>deviceno = 2;} else{printf ("Error i2c_bus_write_read data = 0x%02x\n", readdevice);}
Look at the code:
Sensor_info.write_data[0] = 0x30;  SENSOR_INFO.WRITE_DATA[1] = 0x0a;
The meaning of this structure array is to store the values of the two registers, and then to read the corresponding value of the address via the I²c bus, if the read value is 0x2685, this indicates that the device has been driven, and also read the corresponding ID number.

The associated register address for the sensor ID setting in the camera ov2685

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.