Comment by robert bouwens on January 31, 2013 at 10:36am ja,
relaxed waiting is the key for success with that strange company.
maybe we see a crippled/stripped down version which omits some parts.
if we see a 3300A or B Variant then we know what happened...
how to get DMP from 9150 with i2c ? Register map is not include these details..
Comment by Jonathan Price on January 31, 2013 at 12:39pm *main
Comment by Elman Steve Laguna on February 24, 2013 at 9:32pm I finally got the i2c working on a Xmega128a1U but I am trying to understand how I can read all 9 value at the same time? By same time I mean that the values were all clocked in from the ADC's at the same time. So I don't want values for another time interval. I will be reading the sensor data one right after another.ax->ay->az->gx->gy->gz->mx->my->mz(unless there is a better way please point out my errors)
Comment by sara aby on March 18, 2013 at 1:25pm Can I have your code? still have problem with magnetometer.
Comment by Elman Steve Laguna on March 25, 2013 at 12:09pm yeah
What part of the code do you need this is for read a register on the chip?
void i2cinit()
{
TWIF.MASTER.BAUD = 35; //32000000/(2(5(35)))=400000
//TWIF.MASTER.CTRLB = TWI_MASTER_SMEN_bm;//+TWI_MASTER_QCEN_bm;
TWIF.MASTER.CTRLA = TWI_MASTER_ENABLE_bm;
TWIF.MASTER.STATUS = TWI_MASTER_BUSSTATE_IDLE_gc;
}
uint8_t i2cRead(uint8_t address){
uint8_t i=0;
TWIF_MASTER_ADDR = write_addr; //tell device we're writing to it
while(WIF == 0); //wait for device to ack
TWIF_MASTER_DATA = address; //tell device we want to read from output
while(WIF==0); //wait for device to ack
TWIF_MASTER_ADDR = read_addr; //send read addr to device
while((WIF == 0) && (RIF == 0)); //wait for ack
i = TWIF_MASTER_DATA; //fetch data
TWIF_MASTER_CTRLC |= 0x04; //send nack
TWIF_MASTER_CTRLC |= 0x03; //send stop
return i;
}
I still have the problem with the magnometer
Comment
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.24 members
1298 members
47 members
87 members
183 members
© 2013 Created by Chris Anderson.
Powered by

You need to be a member of DIY Drones to add comments!
Join DIY Drones