Dude, you have been very patient about this! I really do thank you for all your help.
And for some dumb reason I can't get this stupid thing work, I'll probably order another one. If that don't work then I'm going to be very ticked!
My accelerometer works great and had it for years with no problems. I just wanted to add a gyro for my humanoid, so he can keep better balance. Right now the only thing balancing is my patience!
Cross your fingers.
I ordered the evaluation board this time, hopefully this one will work.
When it gets here, i need you to show me how you hooked up yours and what jumpers you have set.
Well, Tim, i got the eval board like you got, connected scl and sda and the 3vo and ground and ran the quadtest and still not getting it.
Now i'm really frustrated. Can you tell me how you have yours hooked up, or a picture of it?
I moved the jumpers to 2-3 on both since I'm using prop 3.3v, did you use that or the LDO?
clkin needs to go to gnd - pin 11
vlogic needs to go to 3.3V - pin 8
resv-g needs to go to gnd - pin 21 - I know this says dont connect but the chip spec·says connect to gnd
gnd to pins 15/17
3.3 to pin 23 VCC·- if you use jumpers 2/3 then you connect to pin 23 not 19
The first 3 are the ones you didn't mention and check 3.3V needs to be to VCC not pin 19 if you changed the jumpers to 2/3 for JP2 and 7
I have mine working as well, with 4.7K pull ups on it. I initially got the address wrong, and I also messed up soldering the pull-up resistors (I bridged the two lines together), so I'd double check that your connections are clean. It's really easy to get a blob of solder under those things, or bridge them.
I was also going to mention grounding the clock line, and tying VDD and VIO, but it looks like you've done that too.
I had the evaluation from inversense and the breakout from sparkfun. I had the evaluation board working but fried it somehow, I am currently running the sparkfun breakout board.
with the inversense board the connector starts at pin no 5 not 1, there are 4 spare pins either end of the connector.
The lowest bit is used for read/write in i2c. To save shifting all the time, the addresses are shifted by default and the lowest but is set to 1 when needed. ·
I'm getting a reading off of the x but not the y or z. And for some reason it's not looping through, so i'm getting just the one read. I'm still playing with it though.
It looks like the Address being retrieved from the Gyro is actually D3 when the address being pulled is D2; D2 is the correct address %1101_0010 as far as I can tell, so why is the Gyro itself return D3?
For Jason's code I see the same behavior where the x value is updated but the y/z values are not. Is there something wrong with the read logic of this code?
I note you are seeing address D3 but expect D2. IIRC on the ITG-3200 there is an address bit that can be selected by tying a pin High or Low. Perhaps Sparkfun have tied the opposite to Tim's code. Perhaps you could try the D3 address in the initialisation call.
Thanks for the response. I got Jason's code to work though; instead of doing one contiguous read at address 29 I added code to restart reading at 31 and 33 for y and z. It works great!
Comments
Great, hope I didn't static mine to death.
Dude, you have been very patient about this! I really do thank you for all your help.
And for some dumb reason I can't get this stupid thing work, I'll probably order another one. If that don't work then I'm going to be very ticked!
My accelerometer works great and had it for years with no problems. I just wanted to add a gyro for my humanoid, so he can keep better balance. Right now the only thing balancing is my patience!
Cross your fingers.
When it gets here, i need you to show me how you hooked up yours and what jumpers you have set.
Now i'm really frustrated. Can you tell me how you have yours hooked up, or a picture of it?
I moved the jumpers to 2-3 on both since I'm using prop 3.3v, did you use that or the LDO?
vlogic needs to go to 3.3V - pin 8
resv-g needs to go to gnd - pin 21 - I know this says dont connect but the chip spec·says connect to gnd
gnd to pins 15/17
3.3 to pin 23 VCC·- if you use jumpers 2/3 then you connect to pin 23 not 19
The first 3 are the ones you didn't mention and check 3.3V needs to be to VCC not pin 19 if you changed the jumpers to 2/3 for JP2 and 7
I was also going to mention grounding the clock line, and tying VDD and VIO, but it looks like you've done that too.
Jason
Which gyro are you using, the eval board from CDI or the breakout board from Sparkfun?
do yu have the eval board from CDI? Are pin numbers aren't jivin'.
with the inversense board the connector starts at pin no 5 not 1, there are 4 spare pins either end of the connector.
Post Edited (Timmoore) : 6/26/2010 3:21:16 AM GMT
I got the quadtest to find the address. I changed the pins to pin0 and pin1 in the DAT routine. but it still want read the gyro data.
Here's what I got:
after
Run it and post the output
Lets check all the parameters, can you try replacing that line with
The i2cinfo table needs to have
The lowest bit is used for read/write in i2c. To save shifting all the time, the addresses are shifted by default and the lowest but is set to 1 when needed.
·
Not sure this code is going to do any better than what Tim has given you, but it works for me.
I'm getting a reading off of the x but not the y or z. And for some reason it's not looping through, so i'm getting just the one read. I'm still playing with it though.
I've been playing around with your code and have the X reading just fine but can't seem to get the Y and Z still.
Take a look and see what you think:
Using Tim's code, a scan of the object returns the correct %1101_0010 ACK but initialization fails. When I run this code as Tim suggested:
I get the following:
It looks like the Address being retrieved from the Gyro is actually D3 when the address being pulled is D2; D2 is the correct address %1101_0010 as far as I can tell, so why is the Gyro itself return D3?
For Jason's code I see the same behavior where the x value is updated but the y/z values are not. Is there something wrong with the read logic of this code?
Please let me know, thanks!
I note you are seeing address D3 but expect D2. IIRC on the ITG-3200 there is an address bit that can be selected by tying a pin High or Low. Perhaps Sparkfun have tied the opposite to Tim's code. Perhaps you could try the D3 address in the initialisation call.
Perhaps you could describe your prop hardware?
You need to do this for the average as well, but I'll let you take care of that.
Hope this helps anyone that is having trouble like I was!
"i2cinfo
byte CONFIG#ITG3200
byte %1101_0000 'gyro I2C address"
and not :
"i2cinfo
byte CONFIG#ITG3200
byte %1101_0001 'gyro I2C address"