I2cdevice:我如何从特定的reg地址读取 [英] I2cdevice: how do I read from a specific reg address
问题描述
我有一个MPU6050,我正在尝试为它写一个库。
https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf [<一个href =https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdftarget =_ blanktitle =New Window> ^ ]
它从传感器读取数据并将值存储在特定的寄存器地址中。我希望能够从特定的寄存器中读取,但我在UWP I2C设备或提供商中找不到任何关于如何执行此操作的信息。
有没有人有任何想法?
谢谢
(PS:我宁愿用c ++也这样做)
我尝试了什么:
Hi,
I have an MPU6050 that I'm trying to write a library for.
https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf[^]
It reads data from it's sensors and stores the values in specific register addresses. I want to be able to read from a specific register but I can't find anything on how to do this in the UWP I2Cdevice or the providers.
Has anyone got any ideas?
Thanks
(PS: I'd rather do it in c++, too)
What I have tried:
device.Read(byteArrayThatReadsEverythingInOneHit);
但这很慢所以我必须经常重读〜:S
But this is slow so I have to re-read often ~:S
推荐答案
然后主设备将registeraddress(RA)放在总线上。在MPU-60X0确认接收到寄存器地址后,主机将寄存器数据放入总线
Then the master puts the registeraddress (RA) on the bus. After the MPU-60X0 acknowledges the reception of the register address, the master puts the registerdata onto the bus
这篇关于I2cdevice:我如何从特定的reg地址读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!