This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi,
I am trying to use MSP430FR5994 launchpad I2C to communicate with an OV7670 camera. The first thing to interact with a camera is to set its registers by I2C. I use a Logic to analyze the signals sent out from the SDA pin and I can see that the camera's address is able to sent out successfully, but the camera does not reply, no ACK sending back.
So, I guess there might be two reasons: (1) the I2C code does not work well; (2) the camera does not work; I excluded these two reasons by doing the following:
(1) I used another peripheral device (DS3231, an external RTC module) to communicate with the MSP by I2C. It works very well. I can get ACK after sending out the SLAVE_ADDR which is 0x68 for DS3231. 0x21 is the slave address for the camera. This excluded the first reason. My I2C code works well; My I2C code is actually from the MSP official example code, MSP430Ware - Devices - MSP430FR5XX_6XX - MSP540FR5994 - Peripheral Examples - Register Level - msp430fr599x_eusci_i2c_standard_master.c.
(2) I then use an Arduino board to communicate the camera also through Arduino's I2C. It also works well. Arduino can get all registers' values from the camera. So, this excluded the second reason. The camera is in good condition too.
After excluded those two reasons, I tried the following things:
(1) pull-up resistors: I tried no pull-up resistors, 1KOhm, 4.7KOhm, 12.5KOhm resistors for MSP, and none of them worked. But for the Arduino board, all of them work, no matter it is no pull-up resistors or any of those values. so, pull-up resistors are not the issue either;
(2) Power supply: in all cases, I only use 3.3V. Both Arduino and MSP boards have 3.3V supply. I tried to power up the camera by MSP's 3.3V and then use the Arduino to communicate with the camera and it works; I also tried to power it up by Arduino and communicate with it by MSP but it still does not work; so the power supply is not the issue either;
(3) the camera version. OV7670 has two versions, with or without FIFO memory. I have both versions and tried both. Both boards work with Arduino and both do not work with MSP;
I have been in trouble with this issue for three days and tried everything I could think of. Any idea for the reason causing my issue?
Thanks,
Yubo
Hi Yubo,
Did you connect your logic analyzer to the arduino I2C lines during communication to determine whether there might be some difference in the signalling? One possibility that occurs to me is that the frequency of the communication may be different. (Is the communication in standard mode for both cases?)
BR,
Leo
Hi Leo,
Yes, I have used the logic analyzer to the Arduino I2C line and the signals sent out were expected. There are no differences in signaling, just very standard I2C signals as shown in this link: https://e2e.ti.com/blogs_/b/process/archive/2016/05/03/msp-i2c-getting-started-guide
I later have tired another camera that our lab has, which is an Arducam-Mini-2MP camera and it works well with my MSP I2C code. Of course, it also works with Arduino too. The signals are also very standard I2C signals, no differences.
As for the frequency of the communication, I detected the communication frequency when OV7670 is working with Arduino, it is 100KHz and I did try the same communication frequency for OV7670 with MSP and it did not work.
Thanks,
Yubo
Are you fairly certain the camera has started? I don't have an OV7670, but mine is very finicky about how power+RST+XCLK are applied, plus delays here and there (that don't always match those in The Book). The only symptom is that it doesn't ACK the I2C.
It sounds like the Arduino code knows how to do this. It may be worth borrowing from that.
**Attention** This is a public forum