|
delay_ms(100);
MPU_Write_Byte(MPU_PWR_MGMT1_REG,0X00); //»½DÑMPU6050
MPU_Set_Gyro_Fsr(3); //íóÂYòÇ′«¸DÆ÷,¡à2000dps
MPU_Set_Accel_Fsr(0); //¼óËù¶è′«¸DÆ÷,¡à2g
MPU_Set_Rate(50); //éèÖÃ2éÑùÂê50Hz
MPU_Write_Byte(MPU_INT_EN_REG,0X00); //1رÕËùóDÖD¶Ï
MPU_Write_Byte(MPU_USER_CTRL_REG,0X00); //I2CÖ÷Ä£ê½1رÕ
MPU_Write_Byte(MPU_FIFO_EN_REG,0X00); //1رÕFIFO
// MPU_Write_Byte(MPU_INTBP_CFG_REG,0X80); //INTòy½ÅμíμçƽóDD§
// MPU_Write_Byte(MPU_INT_STA_REG,0x00);
MPU_Write_Byte(MPU_INT_EN_REG,0X40);
MPU_Write_Byte(MPU_INTBP_CFG_REG,0XF0);
// MPU_Write_Byte(MPU_MOTION_DET_REG,0X51);
// MPU_Write_Byte(MPU_MOT_DUR,0X14);
// MPU_Write_Byte(MPU_MDETECT_CTRL_REG,0XC8);
这个配置好后为什么一直读的高电平
|
|