cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f3 -accelerometter- gyroscope

levantoan2029
Associate II
Posted on March 15, 2015 at 04:33

hi guy. I have a problem with accelerometter- gyroscope: 

how to set address for accelerometter by I2C 

I need code communication with  gyroscope A3G4250D 

thanhk you very much!
5 REPLIES 5
francescatodiego
Associate II
Posted on March 15, 2015 at 11:42

can you explain the problem ?

The datasheet page 24 explain in detail the I2C slave address (SAD)

levantoan2029
Associate II
Posted on March 15, 2015 at 14:02

sorry! I'm new member begin study.

I want to understand the method set address for slave on stm32f3discovery, but I don't understand: if I have one I2C master chip and have many slave (example sensor accelerometter share one I2C), how to set address for each slave, I have a question:  do the address of slave have a default address

Posted on March 15, 2015 at 14:11

Slave parts have fixed, default addresses, which are usually adequately unique/diverse to allow a system to use a lot of different devices. Refer to the manual for the slave parts, and if they have an address select pin to pick between one address, and others.

The 7-bit addressing is the high order bits, so some parts will refer to the address as say 0x25, the value programmed into the command request would be 0x4A. Look carefully at the diagrams in the part manual. The slave address is the first byte sent to the device, if a device on the bus recognizes the address it drives ACK low. At that point other devices stand down, or you determine no device with that address exists on the bus.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
francescatodiego
Associate II
Posted on March 15, 2015 at 16:38

I'll add another info:

The address of the accelerometer is in part modifiable because the last bit depends on the hihg/low value of the SDO pin.

This let you connect up to two device on the same I2C line with address

1101000

1101001

Other dvices can have three pind deidcated to adress configuration and allow you to conect up to eight components to same I2C

each wiith is own address

levantoan2029
Associate II
Posted on March 15, 2015 at 17:06

thank you everybody. I understood this problem!