完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用VL6180作为接近检测器。我能够毫无问题地传达这个部分,但是当我阅读时
RESULT__RANGE_VAL注册或 RESULT__RANGE_RAW 我只读取没有目标的0xFF和任何位置的目标0x00。我测量了器件的电流,我可以看到它以我要求的速率执行测量,因为我可以看到电流消耗的峰值与目标的距离成比例,但结果寄存器中的值确实如此不变。其他寄存器确实显示目标距离的变化,但不会显示两个结果寄存器,因此我确定我没有正确设置。 从默认值改变的唯一寄存器是SYSRANGE__INTERMEASUREMENT_PERIOD,我在10分钟内持续100毫秒,我确实每100毫秒看一次范围测量。 #proximity-sesor#vl6180 以上来自于谷歌翻译 以下为原文 I am using a VL6180 as a proximity detector. I am able to communicate the part without any issue, but when I read the RESULT__RANGE_VAL register or RESULT__RANGE_RAW I only read 0xFF with no target and 0x00 with a target in any position. I measured the current from the device and I can see that it is performing ranging at the rate I requested because I can see a spike in current draw that is proportional in length to the distance from my target, but the value in the result register does not change. Other registers do show a change with target distance, but not the two result registers, so I�m sure I�m not setting something up right. The only register altered from default is SYSRANGE__INTERMEASUREMENT_PERIOD, which I have at 10 for 100ms, and I do see a range measurement every 100ms. #proximity-sesor #vl6180 |
|
相关推荐
11个回答
|
|
读取测距结果时,还要检查地址0x004D处RESULT_RANGE_STATUS寄存器的result__range_error_code位[7:4]。这将为您提供一些没有结果的原因。数据表的6.2.37节列出了错误代码。
此外,还有初始配置寄存器设置应在启动期间应用。以下寄存器写入应适用于器件复位的任何时间: WriteByte(RegAddr,数据) WriteByte(0x0207,0x01); WriteByte(0x0208,0x01); WriteByte(0x0133,0x01); WriteByte(0x0096,0x00); WriteByte(0x0097,0xFD); WriteByte(0x00e3,0x00); WriteByte(0x00e4,0x04); WriteByte(0x00e5,0x02); WriteByte(0x00e6,0x01); WriteByte(0x00e7,0x03); WriteByte(0x00f5,0x02); WriteByte(0x00D9,0x05); WriteByte(0x00DB,0xCE); WriteByte(0x00DC,0x03); WriteByte(0x00DD,0xF8); WriteByte(0x009f,0x00); WriteByte(0x00a3,0x3c); WriteByte(0x00b7,0x00); WriteByte(0x00bb,0x3c); WriteByte(0x00b2,0x09); WriteByte(0x00ca,0x09); WriteByte(0x0198,0x01); WriteByte(0x01b0,0x17); WriteByte(0x01ad,0x00); WriteByte(0x00FF,0x05); WriteByte(0x0100,0x05); WriteByte(0x0199,0x05); WriteByte(0x010a,0x30); WriteByte(0x003f,0x46); WriteByte(0x01a6,0x1b); WriteByte(0x01ac,0x3e); WriteByte(0x01a7,0x1f); WriteByte(0x0030,0x00); // 可选的: WriteByte(0x001b,0x0A); WriteByte(0x003e,0x0A); WriteByte(0x0131,0x04); WriteByte(0x0011,0x10); WriteByte(0x0014,0x24); WriteByte(0x0031,0xFF); WriteByte(0x002c,0x0A); 以上来自于谷歌翻译 以下为原文 When reading the ranging result also check the result__range_error_code bits[7:4] of the RESULT__RANGE_STATUS register at address 0x004D. This will give you some indication of why there is no result. Section 6.2.37 of the data sheet lists the error codes. In addition, there are initial configuration register settings that should be applied during start-up. The following register writes should be applied to any time the device is reset: WriteByte(RegAddr, data) WriteByte(0x0207, 0x01); WriteByte(0x0208, 0x01); WriteByte(0x0133, 0x01); WriteByte(0x0096, 0x00); WriteByte(0x0097, 0xFD); WriteByte(0x00e3, 0x00); WriteByte(0x00e4, 0x04); WriteByte(0x00e5, 0x02); WriteByte(0x00e6, 0x01); WriteByte(0x00e7, 0x03); WriteByte(0x00f5, 0x02); WriteByte(0x00D9, 0x05); WriteByte(0x00DB, 0xCE); WriteByte(0x00DC, 0x03); WriteByte(0x00DD, 0xF8); WriteByte(0x009f, 0x00); WriteByte(0x00a3, 0x3c); WriteByte(0x00b7, 0x00); WriteByte(0x00bb, 0x3c); WriteByte(0x00b2, 0x09); WriteByte(0x00ca, 0x09); WriteByte(0x0198, 0x01); WriteByte(0x01b0, 0x17); WriteByte(0x01ad, 0x00); WriteByte(0x00FF, 0x05); WriteByte(0x0100, 0x05); WriteByte(0x0199, 0x05); WriteByte(0x010a, 0x30); WriteByte(0x003f, 0x46); WriteByte(0x01a6, 0x1b); WriteByte(0x01ac, 0x3e); WriteByte(0x01a7, 0x1f); WriteByte(0x0030, 0x00); // Optional: WriteByte(0x001b, 0x0A); WriteByte(0x003e, 0x0A); WriteByte(0x0131, 0x04); WriteByte(0x0011, 0x10); WriteByte(0x0014, 0x24); WriteByte(0x0031, 0xFF); WriteByte(0x002c, 0x0A); |
|
|
|
谢谢,我会试一试。大多数这些登记册都没有记录。
通常的状态消息是早期收敛估计。 以上来自于谷歌翻译 以下为原文 Thanks, I'll give this a try. Most of these registers are undocumented. The usual status message is early convergence estimate. |
|
|
|
那么现在它运行得好一点,但我还没有。目标从0到190毫米,它读取0x00,然后我开始从190毫米到大约360毫米的读数。该单元不在外壳中。
以上来自于谷歌翻译 以下为原文 Well now it runs a little better, but I'm still not there yet. With a target from 0 to 190mm it reads 0x00, then I start getting a reading from 190mm to about 360mm. The unit is not in a housing. |
|
|
|
在连续模式下启动基本测距的步骤如下:
1.接通AVDD_VCEL和VDD的电源 2.等待1ms 3.通过将GPIO0拉低来复位器件 4.等待至少100nS 5.将GPIO0拉高 6.等待1ms以完成启动过程。 一个。这可以通过读取SYSTEM__FRESH_OUT_OF_RESET(0x0016)的位[0]来验证 湾可以清除该位以检查器件是否有意外复位。 7.应用调整设置(之前发布)。 8.通过向SYSTEM__INTERRUPT_CLEAR(0x0015)写入0x07来清除中断。 9.将中断设置为“新样本就绪” 一个。将0x04写入SYSTEM__INTERRUPT_CONFIG_GPIO(0x0014) 10.设置测量间隔 一个。注册SYSRANGE__INTERMEASUREMENT_PERIOD(0x001B) 11.禁用Early Convergence Estimate和其他检查 一个。将0x00写入SYSRANGE__RANGE_CHECK_ENABLES 湾这些对于应用程序非常有用,但如果配置不正确,最初可能会给出错读。 12.开始连续测距 一个。将0x03写入SYSRANGE_START (虽然测距继续循环) 13.轮询中断寄存器RESULT__INTERRUPT_STATUS_GPIO(0x004F)位[2:0]为0b100。 一个。表示新读数已准备就绪。 湾1毫秒轮询率将起作用。 14.读取范围值 一个。 RESULT__RANGE_VAL(0x0062) 15.阅读测距状态 一个。 RESULT__RANGE_VAL(0x004D) 以上来自于谷歌翻译 以下为原文 The steps to initiate basic ranging in continuous mode are: 1. Apply Power to AVDD_VCEL and VDD 2. Wait 1ms 3. Reset the device by Pulling GPIO0 LOW 4. Wait a minimum of 100nS 5. Pull GPIO0 HIGH 6. Wait 1ms to complete boot process. a. This can be verified by reading bit[0] of SYSTEM__FRESH_OUT_OF_RESET (0x0016) will be HIGH b. This bit can be cleared to check if the device has an unintended reset. 7. Apply tuning settings (posted earlier) . 8. Clear the interrupts by writing a 0x07 to SYSTEM__INTERRUPT_CLEAR (0x0015). 9. Set interrupt to “New Sample Readyâ€� a. Write 0x04 to SYSTEM__INTERRUPT_CONFIG_GPIO (0x0014) 10. Set Inter-measurement period a. Register SYSRANGE__INTERMEASUREMENT_PERIOD (0x001B) 11. Disable the Early Convergence Estimate and other checks a. Write 0x00 to SYSRANGE__RANGE_CHECK_ENABLES b. These are very useful for application, but initially may be giving false reading if not configured correctly. 12. Start Continuous ranging a. Write 0x03 to SYSRANGE_START (While ranging continues loop) 13. Poll the interrupt register RESULT__INTERRUPT_STATUS_GPIO (0x004F) bits[2:0] for a 0b100. a. Indicates new reading is ready. b. 1 ms poll rate will work. 14. Read Range Value a. RESULT__RANGE_VAL(0x0062) 15. Read Ranging Status a. RESULT__RANGE_VAL (0x004D) |
|
|
|
谢谢肯;
几乎相同的结果,我得到一个原始下溢,直到目标是190毫米,然后它似乎正常范围。 -芯片 以上来自于谷歌翻译 以下为原文 Thanks Ken; Pretty much the same results, I get a Raw Underflow until the target is 190mm and then it appears to range normally. -Chip |
|
|
|
听起来你有很大的偏移量。假设在190mm处你正在读取一个较低的值,当目标位于360mm时,它会增加到约170
我有几个问题要问你: 1.这是在评估套件或您制作的电路板上吗? 2.部件是如何安装的? 一个。热量曲线是否紧随其后? 湾塑料是否会变形? 3.什么是寄存器0x0024? 4.什么是寄存器0x001E? 以上来自于谷歌翻译 以下为原文 It sounds like you have a large offset. Assuming that at 190mm you are reading a low value and it increases to about 170 when the target is at 360mm I have a few questions for you: 1. Is this in an eval kit or a board you made? 2. How was the part mounted? a. Was the heat profile followed? b. Does the plastic appear deformed? 3. What is written in register 0x0024? 4. What is written in register 0x001E? |
|
|
|
肯;
感谢你的帮助。董事会是我自己的原型。我用立体镜检查了部件,没有损坏包装。透镜是透明的,不会被助焊剂或焊球堵塞。由于无引线封装,电路板焊接在具有适当温度曲线的IR回流炉中。 寄存器的串扰补偿为0x00,偏移量为0x11。 -芯片 以上来自于谷歌翻译 以下为原文 Ken; Thanks for all your help. The board is my own prototype. I have examined the part under a stereoscope and there is no damage to the package. The lenses are clear and are not occluded by flux or solder balls. Owing to the leadless package, the board was soldered in an IR reflow oven with the appropriate temperature profile. The registers are 0x00 for crosstalk compensation and 0x11 for the offset. -Chip |
|
|
|
为了更好地理解这个问题,我还有几个问题:
你能给我发一个前10个寄存器(0x0000到0x0009)的寄存器转储吗? 一个。这将更好地识别设备的确切版本 2.您是否尝试过多个部件,并且所有部件的结果是否相同? 以上来自于谷歌翻译 以下为原文 In order to get a better understanding of the issue, I have a couple of more questions: 1. Can you send me a register dump of the first 10 registers (0x0000 to 0x0009)? a. This will better identify the exact version of the device 2. Have you tried multiple parts and are you getting the same results with all the parts? |
|
|
|
为了跟进,报告的行为是由于调整设置未完全加载到VL610X中。问题已得到纠正,现在运作正常。
以上来自于谷歌翻译 以下为原文 To follow up, the reported behavior was due to the tuning settings not being completely loaded into the VL610X. The issue was corrected and it is now operating properly. |
|
|
|
什么是未完全加载到VL610X的调整设置?
是这个名单吗? WriteByte(RegAddr,数据) WriteByte(0x0207,0x01); WriteByte(0x0208,0x01); ... 我面临着同样的问题。 以上来自于谷歌翻译 以下为原文 What is the tuning settings that is not being completely loaded into the VL610X? Is it this lists? WriteByte(RegAddr, data) WriteByte(0x0207, 0x01); WriteByte(0x0208, 0x01); ... I am facing approximately same problem. |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2582 浏览 1 评论
3194 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1765 浏览 1 评论
3589 浏览 6 评论
5968 浏览 21 评论
924浏览 4评论
1300浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
563浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1286浏览 3评论
1338浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-7 21:34 , Processed in 1.370950 second(s), Total 97, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号