2024-04-05 12:26 AM - last edited on 2024-04-05 12:36 AM by Peter BENSCH
Hello ST,
I am a beginner to I2C protocol could you please help me to go through I2C practical projects on STM32F446RE using ADXL345 and also with basic projects to do
please suggest or provide me example code to to do.
Thank you.
2024-04-05 12:43 AM - edited 2024-04-30 09:12 AM
I2C is a very long-established and widely-used bus - there are plenty of resources describing I2C; eg,
The official Specification & User Manual from NXP, the inventors of I2C:
https://www.nxp.com/docs/en/user-guide/UM10204.pdf
Others:
https://en.wikipedia.org/wiki/I%C2%B2C
https://learn.sparkfun.com/tutorials/i2c/all
Within the STM32CubeIDE, you will find examples of using the I2C of STM32 processors
ST Training videos on I2C (actually for L4 rather than F4, but should give the idea):
STM32L4 training: 05.5 Communication peripherals - Inter-integrated circuit interface (I2C) theory:
https://www.youtube.com/watch?v=e4F_7WcYkdU&list=PLnMKNibPkDnEEvQWrDqVuu1w_iQ214GXi&index=31
STM32L4 training: 05.6 Communication peripherals - Hands-on I2C:
https://www.youtube.com/watch?v=_SuRDVcDaMo&list=PLnMKNibPkDnEEvQWrDqVuu1w_iQ214GXi&index=32
A good diagram here showing the effect of too-high and too-low pullup values:
https://electronics.stackexchange.com/a/473799
Note that microcontroller internal pullups (including STM32) are generally "too high".
For details of using the ADXL345, see the manufacturer's datasheet and other support materials:
https://www.analog.com/en/products/adxl345.html
#I2C #I2Cresources #I2Cbasics #I2Cfundamentals