STM8L051F3 串口通讯,模拟I2C读写MPU6050(国外英文资料).docVIP

  • 79
  • 0
  • 约1.21万字
  • 约 28页
  • 2017-06-05 发布于河南
  • 举报

STM8L051F3 串口通讯,模拟I2C读写MPU6050(国外英文资料).doc

STM8L051F3 串口通讯,模拟I2C读写MPU6050(国外英文资料)

STM8L051F3 串口通讯,模拟I2C读写MPU6050 / * Includes -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - * / # include stm8l15x. H # include stm8_eval. / * @addtogroup STM8L15x_StdPeriph_Examples * @ { * / / * * * @addtogroup USART_HyperTerminal_Interrupts * @ { * / / * Private typedef -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - * / / * Private define -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - * / * * * * * * * * * / / define the internal address of MPU6050 * * * * * * * * * # define SMPLRT_DIV 0x19 / / gyro sampling rate, typical value: 0x07 (125Hz) # define CONFIG 0x1A / / low pass filter frequency, typical value: 0x06 (5Hz) # define GYRO_CONFIG 0x1B / / gyroscope self-check and measurement range, typical value: 0x18 (no self-checking, 2000deg/s) # define ACCEL_CONFIG 0x1C / / accelerometer self-checking, measuring range, and high pass filter frequency, typical value: 0x01 (not self-checking, 2G, 5Hz) # define ACCEL_XOUT_H 0 x3b # define ACCEL_XOUT_L 0 x3c # define ACCEL_YOUT_H 0 x3d # define ACCEL_YOUT_L 0 x3e # define ACCEL_ZOUT_H 0 x3f # define ACCEL_ZOUT_L 0 x40 # define TEMP_OUT_H 0x41 # define TEMP_OUT_L 0x42 # define GYRO_XOUT_H 0x43 # define GYRO_XOUT_L 0x44 Pound sign define GYRO_YOUT_H 0x45 Pound sign define GYRO_YOUT_L 0x46 # define GYRO_ZOUT_H 0x47 # define GYRO_ZOUT_L 0x48 # define PWR_MGMT_1 0x6B / / power management, typical value: 0x00 (normally enabled) # define WHO_AM_I 0x75/iic address register (default value 0x68, read-only) The address byte data for the # define SlaveAddress 0xD0 / / IIC is read by + 1 / * Private macro -- -- -- -- -- -- -- -- --

文档评论(0)

1亿VIP精品文档

相关文档