https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1548504/tmag5273-tmag5273a2qdbvr
器件型号:TMAG5273工具/软件:
我想使用 TMAG5273A2QDBVR 霍尔效应传感器作为磁性旋转调光器开关。 对于此应用、应考虑(从传感器获取)哪些参数、磁性布置相对于 IC 如何?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1548504/tmag5273-tmag5273a2qdbvr
器件型号:TMAG5273工具/软件:
我想使用 TMAG5273A2QDBVR 霍尔效应传感器作为磁性旋转调光器开关。 对于此应用、应考虑(从传感器获取)哪些参数、磁性布置相对于 IC 如何?
我正在接收 XY 角度、但它不断变化。
TMAG5273 REG_DEVICE_CONFIG_2、0x02
TMAG5273 REG_DEVICE_CONFIG_1、0x2
TMAG5273 REG_SENSOR_CONFIG_1、0x31
TMAG5273 REG_SENSOR_CONFIG_2、0x4 是配置设置、用于获取 xy 角度
uint8_t reg = TMAG5273 REG_ANGLE_RESULT_MSB;//0x19
if (I2C_TRANSACTION (I2C_FLAG_WRITE_READ、TMAG5273 I2C_ADDR、、1、&mbuf) 1)!= i2cTransferDone){
返回 0.0f;
}
////读取 LSB
// uint8_t lsb = 0;
REG = TMAG5273 REG_ANGLE_RESULT_LSB;//0x1A
if (I2C_TRANSACTION (I2C_FLAG_WRITE_READ、TMAG5273 I2C_ADDR、、1、&Lbuf) 1)!= i2cTransferDone){
返回 0.0f;
}
//合并为 12 位值
uint16_t rawAngle =((uint16_t) mbuf << 8)| lbuf;
rawAngle = rawAngle >>4;//掩模为 12 位
//转换为度(数据表:0–4095 = 0–360°)
浮角度=(rawAngle * 360.0f)/ 4096.0f;
配置中缺少任何内容吗