完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好社区,我正在用PIC16F1576电池供电项目。我试着把电流消耗降到最低,但我不能降到6毫安以下。PIC安装在DM164143评估板上。我通过PMDX寄存器关闭所有外围模块,并且我使用LF内部振荡器。所有引脚设置为输入,弱PulLPS启用。这是我的主要。C:设备配置:C:和我的MCC。C:还有什么其他步骤是必要的,以减少功耗?没有什么连接到引脚。我给电源板提供电源连接到VDD和GND。菲利克斯,我非常感谢您的帮助和感谢。
以上来自于百度翻译 以下为原文 Hello Community, I'm working on a battery powered project with a PIC16F15376. I'm trying to reduce the current consumption to a minimum, but I'm not able to fall below 6 mA. The PIC is mounted on the DM164143 evaluation board. I turned off all peripheral modules via the PMDx Registers, and I am using the LF internal Oscillator. All Pins are set to Input and the weakpullups are enabled. This is my main.c: #include #include "mcc_generated_files/mcc.h" void main(void) { SYSTEM_Initialize(); INTERRUPT_PeripheralInterruptEnable(); CPUDOZEbits.DOZEN = 0; CPUDOZEbits.IDLEN = 0; SLEEP(); NOP(); while(1){ } } The device config.c: // CONFIG1 #pragma config FEXTOSC = OFF // External Oscillator mode selection bits->Oscillator not enabled #pragma config RSTOSC = LFINT // Power-up default value for COSC bits->LFINTOSC #pragma config CLKOUTEN = OFF // Clock Out Enable bit->CLKOUT function is disabled; i/o or oscillator function on OSC2 #pragma config CSWEN = ON // Clock Switch Enable bit->Writing to NOSC and NDIV is allowed #pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable bit->FSCM timer enabled // CONFIG2 #pragma config MCLRE = ON // Master Clear Enable bit->MCLR pin is Master Clear function #pragma config PWRTE = OFF // Power-up Timer Enable bit->PWRT disabled #pragma config LPBOREN = OFF // Low-Power BOR enable bit->ULPBOR disabled #pragma config BOREN = ON // Brown-out reset enable bits->Brown-out Reset Enabled, SBOREN bit is ignored #pragma config BORV = HI // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (VBOR) is set to 2.7V #pragma config ZCD = OFF // Zero-cross detect disable->Zero-cross detect circuit is disabled at POR. #pragma config PPS1WAY = ON // Peripheral Pin Select one-way control->The PPSLOCK bit can be cleared and set only once in software #pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable bit->Stack Overflow or Underflow will cause a reset // CONFIG3 #pragma config WDTCPS = WDTCPS_31 // WDT Period Select bits->Divider ratio 1:65536; software control of WDTPS #pragma config WDTE = OFF // WDT operating mode->WDT Disabled, SWDTEN is ignored #pragma config WDTCWS = WDTCWS_7 // WDT Window Select bits->window always open (100%); software control; keyed access not required #pragma config WDTCCS = SC // WDT input clock selector->Software Control // CONFIG4 #pragma config BBSIZE = BB512 // ->512 words boot block size #pragma config BBEN = OFF // ->Boot Block disabled #pragma config SAFEN = OFF // ->SAF disabled #pragma config WRTAPP = OFF // ->Application Block not write protected #pragma config WRTB = OFF // ->Boot Block not write protected #pragma config WRTC = OFF // ->Configuration Register not write protected #pragma config WRTSAF = OFF // ->SAF not write protected #pragma config LVP = ON // Low Voltage Programming Enable bit->Low Voltage programming enabled. MCLR/Vpp pin function is MCLR. // CONFIG5 #pragma config CP = OFF // UserNVM Program memory code protection bit->UserNVM code protection disabled and my mcc.c: #include "mcc.h" void SYSTEM_Initialize(void) { PMD_Initialize(); PIN_MANAGER_Initialize(); OSCILLATOR_Initialize(); EXT_INT_Initialize(); } void OSCILLATOR_Initialize(void) { // NOSC LFINTOSC; NDIV 1; OSCCON1 = 0x50; // CSWHOLD may proceed; SOSCPWR Low power; OSCCON3 = 0x00; // MFOEN disabled; LFOEN disabled; ADOEN disabled; SOSCEN disabled; EXTOEN disabled; HFOEN disabled; OSCEN = 0x00; // HFFRQ 32_MHz; OSCFRQ = 0x06; // MFOR not ready; OSCSTAT = 0x00; // HFTUN 0; OSCTUNE = 0x00; } void PMD_Initialize(void) { // CLKRMD CLKR enabled; SYSCMD SYSCLK enabled; FVRMD FVR enabled; IOCMD IOC enabled; NVMMD NVM enabled; PMD0 = 0xFF; // TMR0MD TMR0 enabled; TMR1MD TMR1 enabled; TMR2MD TMR2 enabled; NCOMD DDS(NCO) enabled; PMD1 = 0xFF; // ZCDMD ZCD enabled; CMP1MD CMP1 enabled; ADCMD ADC enabled; CMP2MD CMP2 enabled; DAC1MD DAC1 enabled; PMD2 = 0xFF; // CCP2MD CCP2 enabled; CCP1MD CCP1 enabled; PWM4MD PWM4 enabled; PWM3MD PWM3 enabled; PWM6MD PWM6 enabled; PWM5MD PWM5 enabled; PMD3 = 0xFF; // CWG1MD CWG1 enabled; UART2MD EUSART2 enabled; MSSP1MD MSSP1 enabled; UART1MD EUSART enabled; MSSP2MD MSSP2 enabled; PMD4 = 0xFF; // CLC3MD CLC3 enabled; CLC4MD CLC4 enabled; CLC1MD CLC1 enabled; CLC2MD CLC2 enabled; PMD5 = 0xFF; } What other steps are necessary to reduce the power consumption? There is nothing connected to the Pins. I'm powering the Board with a power supply connected to Vdd and GND. I would appreciate any help and thanks in advance, Felix |
|
相关推荐
11个回答
|
|
你是如何测量电流的?如果使用6Ma运行,我会感到惊讶。
以上来自于百度翻译 以下为原文 How are you measuring the current? I would be surprised if it used 6mA running. Jeremy. |
|
|
|
嗨,杰瑞米,我用一个FLUKE8808A万用表来测量电流,它在评估板的GND插脚和我的Powersupply的地之间。我猜PIC不会进入睡眠模式……顺便说一下,我用XC8PRO
以上来自于百度翻译 以下为原文 Hi Jeremy, I'm measuring the current with a Fluke8808A Multimeter placed between the GND Pin of the evaluation board an the Ground of my Powersupply. I suppose that the PIC isn't going to sleep mode.... By the way I'm using XC8 Pro compiler Felix |
|
|
|
另一个PIC(也就是编程)不是在那个板上吗?
以上来自于百度翻译 以下为原文 Isn't the other PIC (that does the programming) also on that board, and powered up? |
|
|
|
是的,板上有一个PIC16F1454。但是当我测量电流时,USB电缆没有连接,16F1454的数据表也说明它是一个XLP(极低功率)设备。
以上来自于百度翻译 以下为原文 Yes there is a PIC16F1454 on the board. But when I'm measuring the current the u*** cable is not connected and the datasheet of the 16F1454 also states that its a XLP(extreme low power) device... |
|
|
|
这意味着它能够进行非常低功率的操作,但并不总是处于低功耗模式。
以上来自于百度翻译 以下为原文 Meaning it is capable of very low power operation but NOT that it is always in a low power mode. |
|
|
|
从用户指南中打印出电路板的示意图,并开始查看每个组件。不要忘记被动语态。测量关键节点处的电压。您可能会确定高电流的原因不是PIC16,而是PIC与所有其他组件的相互作用。(注意10K锅横跨电源)一个更好的方法来测试电流是把部分放在一个蘸的部分,并把它放在面包板,以隔离它从所有外部电流路径。
以上来自于百度翻译 以下为原文 Print out the schematic for the board from the users guide and start looking at every component. Don't forget the passives. Measure voltages at critical nodes. You will probably determine that the cause of the high current is not the PIC16 but the interaction of the PIC with all the other components. (Note the 10k POT across the supply) A better way to test the current is to put the part in get a DIP part and put it in a bread board to isolate it from all external current paths. |
|
|
|
低功耗设计并不容易。你需要堵住大量的漏洞。5毫安泄漏将很容易找到-它可能主要是USB PIC。然后,300 UA泄漏-锅。然后20uA泄漏- LED由你启用的弱拉动力提供动力。当为超低功耗设计一个串联电阻(值取决于预期电流)在PIC的电源(以及任何你想要测量的任何东西)时都是有用的。然后你可以准确地看到电流的流向。
以上来自于百度翻译 以下为原文 Low power design isn't easy. There can be a lot of leaks you need to plug up. The 5mA leak will be easy to find - it's probably mostly the USB PIC. Then the 300uA leak - the pot. Then the 20uA leaks - the LEDs powered by the weak pullups you enabled. It's useful when designing for ultra low power to put a series resistor (value depends on expected current) in the power for the PIC (and anything else you might want to measure). Then you can see exactly where the current is going. |
|
|
|
串联电阻可能是对DM164143板的一个挑战。
以上来自于百度翻译 以下为原文 The series resistor might be a challenge on the DM164143 board. |
|
|
|
我猜想这是红色的“棒”与40个城堡引脚,你是通过GND和VDD引脚可能在一个方面。你使用3.3V还是5V?无论它是什么,焊料跳线将允许电流回流到程序员PIC。剪断或除掉跳线,然后你将有一个隔离的PIC来测量。你可以用一个电阻替换跳线来测量电流的流动,这取决于你如何给棒供电。
以上来自于百度翻译 以下为原文 I assume this is the red "stick" with 40 castellated pins and you are powering through the GND and VDD pins on probably one side. Are you using 3.3V or 5V? Whichever it is, the solder jumper will allow current to backflow to the programmer PIC. Cut or desolder the jumper and then you'll have an isolated PIC to measure. You could replace the jumper with a resistor to measure current flowing either way depending on how you are powering the stick. |
|
|
|
谢谢你的建议。我们订购了一个PIC的蘸包。我会尝试在面包板上,这将是很好的跳板上的董事会去/重新连接其他PIC和外设…
以上来自于百度翻译 以下为原文 Thanks for all your advices. We ordered a DIP package of the PIC. I will try it on the bread board. It would be nice to have a jumper on the board for de-/reconnecting the other PIC and Peripherals..... |
|
|
|
你看过原理图了吗?我认为板上有跳线,但它们是焊料块,不是用手可以去除的连接件。
以上来自于百度翻译 以下为原文 Have you looked on the schematic? I think there ARE jumpers on the board, but they are blobs of solder, not links that can be removed by hand. |
|
|
|
只有小组成员才能发言,加入小组>>
5203 浏览 9 评论
2016 浏览 8 评论
1942 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3188 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2243 浏览 5 评论
754浏览 1评论
641浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
549浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
653浏览 0评论
553浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-5 07:23 , Processed in 1.906059 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号