1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我的应用程序只需要非常偶然的安装和诊断蓝牙。大多数时间,它在两个AA细胞上一次运行数周。大多数时候,它只是标记时间和监视一个按钮,上面写着“我想通过蓝牙与你交谈,所以唤醒那个芯片!”我想这样做,通过切换PIC到31 kHz的电源管理模式(18F1320)与RN861关闭在“标记时间”阶段。应用的主要工作是定期监测和控制。我们在31千赫等待30分钟,然后切换到正常运行模式约20毫秒。做我们的监测和控制,并立即返回等待30分钟。只有当有人按下“唤醒”按钮时,蓝牙才发挥作用。如果在30秒内没有BLE连接和通信,我想把RN1471的功率降低到最小。我的问题是,当BLE COM超时时,关闭RN48的最佳顺序是什么?我有PIC控制的BT复位线的RN48 71和RX-IN线。我的计划是把“O,0”命令发送到RN878,关闭它,然后循环BT重置线唤醒它,这当然包括等待%ReBooG%并再次发送“$$”。我还没有试过使用RX-IN线,因为我不知道文档是如何工作的。谁能给我一些指导我应该如何执行这些模式转变?
以上来自于百度翻译 以下为原文 My application needs Bluetooth only for very occasional setup and diagnostics. Most of the time it runs for weeks at a time on two AA cells. Most of the time it is just marking time and monitoring a pushbutton that says "I want to talk to you via Bluetooth so wake up that chip!" I want to do this by switching the PIC to 31kHz power managed mode (18F1320) with the RN4871 shut down during the "marking time" phase. The main job of the application is periodic monitoring and control. We wait 30 minutes at 31kHz and then switch to normal run mode for about 20 msec. to do our monitoring and control and go right back to waiting for another 30 minutes. Bluetooth only comes into play when someone presses the "wake up" button. If there is no BLE connection and communication within 30 seconds, I want to reduce the RN4871 power to minimum. My question is what would be the best sequence of events to shut down the RN4871 when BLE comm times out and what is the best process for waking it up again? I have PIC control over the BT-reset line of the RN4871 and the RX-IND line. My plan was to send the "O,0" command to the RN4871 to shut it down and then cycle the BT-reset line to wake it up, which of course will involve waiting for %REBOOT% and sending "$$$" again. I have not tried using the RX-IND line yet because I am not sure from the docs how it works. Could anyone give me some guidance on how I should perform these mode transition? |
|
相关推荐
7个回答
|
|
好吧,文档没有意义。(如果需要,请更正):从上电或复位,RN48 71全功率运行。在这种模式下,RXJIN输入不做任何事情。SO,1命令使设备处于低功耗模式,这意味着RXJIN控制RN48 71的时钟速度。RXIN低意味着全速(16MHz)和UART工作。所以我想在发出SO,1命令之前,你会设置RXJIN低。然后,如果RXJIN设置为高,RN48 71在32 kHz运行,UART不可用。我认为蓝牙收音机仍然是可操作的,如果它在低功耗之前运行。但是,如果没有连接和广告被关闭,就不会有低功率的无线电使用。为了达到没有无线电的绝对最低功率,我想使用“O”命令使RN48 71进入休眠状态。当然,当UART正在运行时,我只能发送“O”命令(这使得RN878进入休眠状态)。DOC说“O,0”立即进入休眠模式。但是,如果想要能够用设备复位的其他设备唤醒RN48,我需要使用RXIN线,它只在低功耗模式下工作。因此,我必须设置RXJND =低,并发送SO,1命令首先进入低功耗模式。然后我必须保持RXJIN低,这样我就可以发送“O,0”命令去休眠。但是RXIOND=低是我希望用来唤醒UART的条件,它需要低的发送命令。所以这个装置会立刻醒来,或者永远不会醒来。
以上来自于百度翻译 以下为原文 OK, the docs do not make sense. (Please correct me if necessary): From power-up or reset, the RN4871 operates at full power. In that mode the RX_IND input does nothing. The SO,1 command puts the device in low power mode, which means that RX_IND controls the clock speed of the RN4871. RX_IND low means full speed (16MHz) and the UART works. So I guess you would set RX_IND low before issuing the SO,1 command. Then if RX_IND is set high the RN4871 runs at 32kHz and the UART is unavailable. I suppose that the Bluetooth radio is still operational if it was operational before going to low power. But if there was no connection and advertising was turned off, there would be no radio usage in low power. To get to the absolute lowest power with no radio, I would like to use the "O" command to make the RN4871 go dormant. Of course I can only send the "O" command (which makes the RN4871 go dormant) when the UART is operating. The docs say that "O,0" enters dormant mode immediately. But if want to be able to wake up the RN4871 with something other that a device reset, I need to use the RX_IND line, which is only functional in low power mode. So I must set RX_IND=low and send the SO,1 command first to enter low power mode. Then I must keep the RX_IND low so that I can send the "O,0" command to go dormant. But RX_IND=low is the very condition I expect to use to wake up the UART, and it needs to be low to send the command. So the device would wake up immediately, or else never wake up. |
|
|
|
我做了一些实验来确定这是如何经验性的。串行数据来自于在终端上键入的ME,因此在动作之间有大量的延迟时间。电流由侥幸仪监测。这就是我所发现的:SO、L.0、1&Gt命令的作用通过一个功率循环幸存下来。(我希望他们会记录哪些设置被保存在NV内存中,哪些不是)。当0,实际上是(工厂默认)RN978一直全速运行,不管RXJIN的状态。我通过手动切换到这个输入,以便我可以手动控制。复位后,串行端口看到通常的%ReBOOT %,$$将将RN878切换到命令模式,并响应CMD & GT;测量电流为2.77毫安。在这段时间里,在大约30秒之后,它下降到2.20,可能是因为广告下降到较低的功率。顺便说一下,我以前设定和使用波特率为2400,如果这有任何区别。进入SO,1命令将设备置于可选的低功耗模式。这意味着RXXIN现在控制时钟速度。如果在这个命令的时候RXJIN是高的或浮动的,电流下降到0.18到0.25毫安。当电流在该范围内时,该设备不响应任何串行端口命令,所以我假设它在DOCS说的低速运行。当RXJIN设置为高时,有时电流保持在2.20毫安的正常高电平。当这种情况发生时,设备响应另一个命令。它正确地回应了一个命令,但是随后下降到0.18到0.25毫安。再次对命令不响应。设置RXIN IN低会带来高电流、速度和响应性。这一切都是好的,但它不是最低的电流,规格说是可能的。我想要“休眠模式”,所以我输入了O,0,电流下降到0.12毫安。我尝试了这两种模式,0模式等等,1模式。在这两种情况下,我对RXJIN所做的任何事情都不会使电流回到激活电平,使串行端口响应。由此得出结论,休眠模式的唯一出路是芯片复位。有人知道另一种方法吗?
以上来自于百度翻译 以下为原文 I did some experiments to determine how this works empirically. The serial data came from me typing on a terminal, so there is plenty of delay time between actions. The current was monitored by a Fluke meter. Here is what I found: The effect of the SO,<0,1> command survives through a power cycle. (I wish they would document which settings are preserved in NV memory and which are not.) When SO,0 is in effect (which is the factory default) the RN4871 runs at full speed all the time, regardless of the state of RX_IND. I wired a manual switch to this input so I could control it manually. After a reset, the serial port sees the usual %REBOOT% and a $$$ will switch the RN4871 to command mode and respond with CMD> . The current was measured at 2.77 ma. during this time, and it fell to 2.20 after about 30 seconds, probably because of the advertising dropping to a lower power. By the way, I had previously set and was using a baud rate of 2400, if that makes any difference. Entering the SO,1 command places the device in optional low power mode. That means RX_IND now controls the clock speed. If RX_IND was high or floating at the time of this command, the current drops to 0.18 to 0.25 ma. When the current is in that range the device does not respond to any serial port commands, so I assume it is running at low speed as the docs say. When RX_IND is set high, sometimes the current remains at the normal high level of 2.20 ma. When that happens, the device is responsive to one more command. It properly responds to that one command, but then drops to 0.18 to 0.25 ma. again and is non-responsive to commands. Setting RX_IND low brings back high current, the speed and the responsiveness. This is all well and good, but it is not the lowest current the specs say is possible. I want "dormant mode." So I entered O,0 and the current falls to 0.12 ma. I tried this in both SO,0 mode and SO,1 mode. In both cases, nothing I did to the RX_IND would bring back the current to the active level and make the serial port responsive. From this I conclude that the only way out of dormant mode is a chip reset. Does anyone know of another way? |
|
|
|
你可以从PIC管脚上给这个模块供电,我正在做一些类似的事情,只是偶尔需要蓝牙,这就是我要做的。任何专家都有一个很好的理由不去做吗?(我不是专家,这是肯定的:-)欢呼杰夫
以上来自于百度翻译 以下为原文 You could power the module from a pic pin, I'm doing something similar which only needs the Bluetooth occasionally and that's what I was going to do. Any experts out there with a good reason not to? (I'm not expert that's for sure :-) ) Cheers Geoff |
|
|
|
笔直?如果电流低于10-15Ma,你可以使用一个小电阻和一个去耦帽,绝对可以!否则,需要添加MOSFET或类似的。
以上来自于百度翻译 以下为原文 Straight from a pin? Well, if current is below some 10-15mA and you apply a small resistor and a decoupling cap, definitely ok! Otherwise, you need to add a mosfet or alike. |
|
|
|
我想做这件事,但它只是让我感到不安,规格说,模块可以放在一个模式,它只吸引1.7微安。所以应该有办法实现它。
以上来自于百度翻译 以下为原文 I thought of doing that, but it just bugs me that the specs say the module can be put into a mode where it draws only 1.7 microamps. So there ought to be a way to achieve it. |
|
|
|
我花了太长的时间来解决这个问题,所以很乐意拯救别人的痛苦。我确实设法让设备进入和离开最低功率(1.7 UA)模式,但做了一些实验,最终阅读了相关部分的文档来破译RN1471用户指南——请看我的线程。代码现在更成熟了,所以如果上面没有为您排序,我可以挖出来。一些代码片段。
以上来自于百度翻译 以下为原文 I spent way too long figuring this out so would be happy to save someone else the pain. I did manage to get the device to enter and leave the lowest power (1.7 uA) mode but took some experimentation and ultimately reading the docs of a related part to decipher the RN4871 user guide - see my thread here. The code is now more mature, so if the above doesn't sort it for you I can dig out some code snippets. |
|
|
|
实际上,TraveSmithi,我确实看到了你的线程,并尝试了你所概述的方法。我没有得到你的结果。现在我的芯片是砖(第四个),所以我试图找出如何更新固件使用ISUPDATE固件更新工具。我找到了这个工具,但我没有找到如何使用它的文档。所有的串行端口相关字段都是灰色的。我从4月28日看到了一个关于PICTURX文档的帖子。我来调查一下。
以上来自于百度翻译 以下为原文 Actually, traversjames, I did see your thread earlier and tried the method you outlined. I did not get the results you did. And now my chip is bricked (the 4th one) so I am trying to figure out how to update the firmware using the ISupdate Firmware Update Tool. I found the tool, but I have not found documentation on how to use it. All the serial port related fields are grayed out. I see a post of yours from April 28th about the PICtail docs. I will look into that. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
777浏览 1评论
666浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
595浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
676浏览 0评论
576浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 04:08 , Processed in 1.515815 second(s), Total 58, Slave 52 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号