Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino Plus 2 I2C not working for C3088 camera module

I2C

  • Please log in to reply
2 replies to this topic

#1 yameera

yameera

    New Member

  • Members
  • Pip
  • 2 posts

Posted 22 January 2013 - 06:29 AM

Hi,

Recently got a Netduino Plus 2 and hooked it up to a C3088 camera module.

I2C code for setting up the camera is not working.

Execute always returns 0 bytes transferred.

 

After reading some of the I2C posts, I upgraded the firmware to 4.2.2. But that didn't help.

Here is the code:

 

[font="'courier new', courier, monospace;"]   private I2CDevice camI2C = new I2CDevice(new I2CDevice.Configuration(0x60, 100));
  private int I2C_TIMEOUT = 1000;[/font]

[font="'courier new', courier, monospace;"]   public void writeRegister(byte register, byte value)
  {
  int result = camI2C.Execute
  (new I2CDevice.I2CTransaction[]
  {
  I2CDevice.CreateWriteTransaction(new byte[] {register, value})
  },
I2C_TIMEOUT);
  Debug.Print("writeRegister: " + register + " = " + value + " --> " + result);
  }[/font]

 

I tried the CreateWriteTransaction variation that uses internalAddress.

But that breaks with a Null Value for fieldInfo.

 

Any help is appreciated. Thanks.



#2 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 22 January 2013 - 07:54 PM

Hi yameera,

 

I don't have a lot of experience with I2C, and have even less when it comes to video, but there are few things come to mind that may be causing you some issues. 

 

The module you are using appears to be a 5V module, and I am assuming it is using 5V logic levels for it's I2C protocol  Unless you use a logic level converter you can damage your Netduino by inputting 5V to the I2C pins. which expect a 3.3V level. 

 

Also when using I2C on the Netduino Plus 2 you will need to add pullup resistors to each of your data lines. Perhaps someone else may be able to suggest an appropriate value to be used. There are a few posts in the forum regarding I2C and the Netduino Plus 2 that can shed more light on that.

 

I have also read some conflicting information on which protocol is really used for this module. In some cases it suggests that it uses SCCB and other's I2C. But from what I gather you can use I2C to communicate with the OV6620 image sensor. However I am not sure which address you should be using. 

 

Hopefully some other members who are more knowledgeable in this area can provide you with some additional information. 

 

Regards,

Steve



#3 yameera

yameera

    New Member

  • Members
  • Pip
  • 2 posts

Posted 23 January 2013 - 05:28 AM

Hi Steve,

 

Thanks for your reply.

The C3088 camera module (with OV6620 image sensor) actually uses 5V for analog and 5/3.3V for digital. I am able to read other signals (such as HREF and VSYNC) from the module. Also, the module I have is an I2C module (the SCCB version of the sensor is probably old).

 

I used pull-up resistors for SDA, SCL (tried 10K and 4.7K; didn't work with either).

 

By the way, this module works fine for I2C with Arduino (device address = 0x60, speed = 100KHz).

 

I am going to try the software I2C tomorrow.

 

Meera







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.