文件名称:test6050
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2015-08-08
- 文件大小:
- 109kb
- 下载次数:
- 0次
- 提 供 者:
- 叶*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
瑞萨单片机和MPU6050通信测试通过,模拟IIC非硬件IIC
关于陀螺仪6050需要注意以下问题;
1、 IIC数据和时钟需要上拉电阻,电阻的大小与波特率有关,如果通讯不上适当减小波特率。
2、 6050供电电压为3.3V,请确认MCU电压和6050电压是否一致。
3、 MCU和6050最好用两个稳压芯片供电,要不MCU可能会干扰6050.
4、 需要用中断口11
5、主程序里有说明,当进到if(OK==get_mpu6050_mode())
{
//此时可以读取陀螺仪数据和加速度数据,采集到的是原始数据
}
读取faccx,faccy,faccz,fgyrox,fgyroy,fgyroz
其中faccx,faccy,faccz是加速度
fgyrox,fgyroy,fgyroz 是陀螺仪-Renesas microcontroller and MPU6050 communications test, simulation IIC non-hardware IIC on gyro 6050 to note the following issues 1, IIC data and clock requires a pullup resistor, resistor size and baud rate, and if the communication is not appropriate to reduce baud rate. 2, 6050 supply voltage of 3.3V, make sure that the voltage and MCU 6050 are the same voltage. 3, MCU and 6050 is best to use two power regulator chip, or MCU may interfere with 6050.4, you need to use interrupt port 115, the main program, there are shows that when into if (OK == get_mpu6050_mode ()) {// You can now read the gyroscope data and acceleration data, collected raw data} read faccx, faccy, faccz, fgyrox, fgyroy, fgyroz wherein faccx, faccy, faccz acceleration fgyrox, fgyroy, fgyroz a gyroscope
关于陀螺仪6050需要注意以下问题;
1、 IIC数据和时钟需要上拉电阻,电阻的大小与波特率有关,如果通讯不上适当减小波特率。
2、 6050供电电压为3.3V,请确认MCU电压和6050电压是否一致。
3、 MCU和6050最好用两个稳压芯片供电,要不MCU可能会干扰6050.
4、 需要用中断口11
5、主程序里有说明,当进到if(OK==get_mpu6050_mode())
{
//此时可以读取陀螺仪数据和加速度数据,采集到的是原始数据
}
读取faccx,faccy,faccz,fgyrox,fgyroy,fgyroz
其中faccx,faccy,faccz是加速度
fgyrox,fgyroy,fgyroz 是陀螺仪-Renesas microcontroller and MPU6050 communications test, simulation IIC non-hardware IIC on gyro 6050 to note the following issues 1, IIC data and clock requires a pullup resistor, resistor size and baud rate, and if the communication is not appropriate to reduce baud rate. 2, 6050 supply voltage of 3.3V, make sure that the voltage and MCU 6050 are the same voltage. 3, MCU and 6050 is best to use two power regulator chip, or MCU may interfere with 6050.4, you need to use interrupt port 115, the main program, there are shows that when into if (OK == get_mpu6050_mode ()) {// You can now read the gyroscope data and acceleration data, collected raw data} read faccx, faccy, faccz, fgyrox, fgyroy, fgyroz wherein faccx, faccy, faccz acceleration fgyrox, fgyroy, fgyroz a gyroscope
(系统自动生成,下载前可以参看下载内容)
下载文件列表
test6050\DefaultBuild\IIC.rel
........\............\mpu6050.rel
........\............\r_cg_cgc.rel
........\............\r_cg_cgc_user.rel
........\............\r_cg_intc.rel
........\............\r_cg_intc_user.rel
........\............\r_cg_serial.rel
........\............\r_cg_serial_user.rel
........\............\r_main.rel
........\............\r_systeminit.rel
........\............\test6050.hex
........\............\test6050.lmf
........\............\test6050.map
........\............\test6050.sym
........\DefaultBuild
........\IIC.c
........\mpu6050.c
........\r_cg_cgc.c
........\r_cg_cgc.h
........\r_cg_cgc_user.c
........\r_cg_intc.c
........\r_cg_intc.h
........\r_cg_intc_user.c
........\r_cg_macrodriver.h
........\r_cg_serial.c
........\r_cg_serial.h
........\r_cg_serial_user.c
........\r_cg_userdefine.h
........\r_main.c
........\r_systeminit.c
........\test6050.mtpj
........\test6050.yihuachen.mtud
test6050