View previous topic :: View next topic |
Author |
Message |
Jim90
Joined: 27 Apr 2013 Posts: 55
|
mpu6050 problem |
Posted: Sat Jan 04, 2014 6:41 pm |
|
|
I am trying to use a mpu6050 component. When i used a program which i found from the forum (to find the address of the register) i received stranger values.
(I expect to see D0, D1 but i receive A6 address).
I think that something is going wrong with my connections so i need your advice. Below i present the connections which i did:
VDD -->connected
GND-->connected
CS
INT1
INT2
SD0
SDA-->connected
SCL-->connected
I need to connect the CS, INT1, INT2, SD0 ????? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat Jan 04, 2014 8:31 pm |
|
|
comment: You should supply a 'link' to whatever datasheet/documentation you have for your device.
It's probably not a 'raw' device but a 'module' that you're using so we need more details.
One item. The mpu-6050 is a '3 volts' device.As such it's easiest to connect with a '3 volt' PIC. These PICs will have 'L' in their part number.
ie: 16LF648, 18LF26K22. To interface to a 5 volt PIC you will need proper 'logic level shifting'.Either using discretes like FETs or an integrated circuit.A quick glance at the Sparkfun website says it's an I2C device,so you may have to 'code' yours to get the proper address.Usually a jumper or two needs to be pulled hi or lo,again the datasheet will explain this.CS could be 'Card Select', active high;INT1,INT2 could be interrupts from the device to the PIC(usually needing pullups) BUT we need more information, specifically the datasheet of the module you're using.
The more data you provide , the better we can help.
hth
jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
dorinm
Joined: 07 Jan 2006 Posts: 38
|
|
Posted: Mon Jan 06, 2014 6:46 am |
|
|
your reading is correct, as mpu6050 defaults to "i2c master mode" (internally) in which you'll read only it's address, the acc and magneto will be internally slaves; please read the datasheet carefully about the mode of operation;
edit: read the arduino library and port whatever you need for pic (as it's damn easy ) http://playground.arduino.cc/Main/MPU-6050 |
|
|
|