View previous topic :: View next topic |
Author |
Message |
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Thu Aug 15, 2013 1:58 am |
|
|
Hello guys,
I am trying to program Itg3200 sensor module. I used the scanner program (http://www.ccsinfo.com/forum/viewtopic.php?t=47707&start=21 )
The problem is : when I used 1,5K or 1K pull-up resistor I see only 00 at the first case and regular counting (00,02,04,06….) At the second case.
What is going wrong . From the manual I can't find the right value for the pull-up resistor. Also I don’t know if the program at the above link is working right?
It will be helpful if someone has any idea. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Thu Aug 15, 2013 2:23 am |
|
|
You need to tell us a lot more.
Yes, the I2C scanner works.
What PIC?.
What complier version?.
What supply voltage?.
What pins on the PIC?.
The Itg3200, is a 3.3v device. It won't directly drive the hardware I2C input on a 5v PIC. You can use it on some PIC's/pins, by running using software I2C. With a 3.3v PIC, it should work.
I2C bus pullup's depend on the length of the bus (capacitance), supply voltage, ratings of the device, and speed.
The output of the Itg3200 is designed for 3mA sink current, so 1KR, is going to be pushing it with 3.3v on the pullup's. If you have the pullup's going to 5v, then you are outside the specifications of the chip.
Something around 3.3KR, should be adequate provided your bus is not long.
I suspect your problem is voltage translation between the device voltages. |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Thu Aug 15, 2013 2:43 pm |
|
|
dspic33fj64GP202
Supply voltage =3.3V --> 1 k resistor is right
I2C pins : B8-->SCL1,B9-->SDA1
From the scanner program i expect to see only one value(address). Is this right??? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Thu Aug 15, 2013 3:34 pm |
|
|
What is VLogic pin 8 tied to? _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Thu Aug 15, 2013 5:38 pm |
|
|
I didn't connect anything to VLogic pin |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Thu Aug 15, 2013 5:56 pm |
|
|
The datasheet says the VLogic pin voltage determines the I2C
bus signal levels. I would tie it to your 3.3V VDD to be safe.
Also, where are you reading that 1K pullups are the right value? _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Fri Aug 16, 2013 12:42 am |
|
|
I suspect he may be finding a reference to this, which will list it as the _,minimum_ value. However provided the bus is not too long, something between 2.2K, and 3.3K, is a much better range for 3.3v I2C.
Vlogic is vital. I suspect this is the main problem. The chip will not respond properly to I2C without it.
Best Wishes |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Fri Aug 16, 2013 11:03 am |
|
|
I used a 3 K resistors as pull-up resistors and also I connected
the Vlogic to VDD .
when I run the scanner program I receive only the value 00.
What is going wrong? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 16, 2013 11:14 am |
|
|
Did you buy the Itg3200 board or did you build it yourself ? If you bought
the board, post a link to the website for the board, so that we can see a
schematic for it. If you built the board yourself, then upload the
schematic to a free image hosting website, then post a link to it.
Also, post the #use i2c() statement that you are using. |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Fri Aug 16, 2013 12:29 pm |
|
|
I bought the sensor from the ebay (i asked the seller for the schematic).
For the i2c i used :
#use i2c(Master, sda=PIN_B9, scl=PIN_B8) |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Sun Aug 18, 2013 7:08 am |
|
|
Guys I need your suggestions .what i need to do? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Aug 18, 2013 11:13 am |
|
|
Post a link to the Ebay page so we can at least look at the board. |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Aug 18, 2013 11:52 am |
|
|
I am searching for a schematic for that board.
But, by looking at the image of the board with the Invensense pin
diagram, I can see a few things:
This board has built-in i2c pull-up resistors, R1 and R2. The photo
is at an angle so it's hard to read the resistor value. But it looks like 332,
which is 3.3K, which makes sense for an i2c board running at +3.3v.
This means you don't have to add external pull-up resistors.
There is no documentation of the board's pinout. Did you get a sheet
of paper with the board that lists the functions of pins 1 to 7 ?
Or does the board have the pin labels printed on the back of the board ?
(example: VDD, SDA, SCL, for all 7 pins). If it does, then post it here.
Or make a photo of the back side of the board, upload it to a free image
hosting website and post a link to it.
Also, are there any components on the back side of the board ?
Here is my estimate of the board pinout:
1 - ?
2 - Vlogic
3 - Ground (probably)
4 - Vdd (probably)
5 - CLKIN
6 - SDA
7 - SCL
There are three gold pads at the bottom of the board. The center pad
is connected to the AD0 pin on the itg3200 chip. It appears from the
photo, that there is a trace going from the center pad to what is probably
the ground plane. Can you check that with an ohmmeter ? I want to
know if the AD0 pin is floating, or is it connected to ground (or possibly Vdd). |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Sun Aug 18, 2013 2:13 pm |
|
|
There is not any component on the back side of the board.
The pins label are printed (on the back side)are :
1)Vdd
2)Vlogic
3)GND
4)INT
5)CLK
6)SDA
7)SCL
I checked the 3 pads (with the pins) the first is connected to VDD and the last to the GND. The center pad is not connected
If you need any other information let me know. |
|
|
|