About the key points of Pic MCU 18 series Ultra low Power software programming

Source: Internet
Author: User

Recently, a pic ultra-low power project has been done with very high power requirements. I have seen some articles on the internet before, but it is not good to test them.

Here to summarize, to share a bit for the peer, software programming to pay attention to the following points,

1, no module to close

The module here is not only the enable bit, but PMD

2, do not use the IO port to be placed into the output

Here and other articles on the internet say the input is not the same, measured down my side is the output standby current lower

3, internal regulator must be closed

Here must pay attention: must choose through "controlled by REGSLP bit", otherwise the single-chip computer sleep after dead, can no longer burn write, this can not let people understand, but the actual test is true

Specific practices:

(1)

(2) WDTCONBITS.REGSLP = 1;

Finally, I'm going to share the operation between sleep, for reference only:

PMD0 = 0XFF;
PMD1 = 0XFF;
PMD2 = 0XFF;

Trisa = 0;//xff;
TRISB = 0;//xff;
Trisc = 0;//xff;
PORTA = 0;
PORTB = 0x28;
PORTC = 0;
Power_rf_pin = 1;
Ad_press_ctrl_pin = 1;
Led_red_pin = 1;
Led_blue_pin = 1;
Wdtconbits.swdten = 1;

Idlen = 0;
WDTCONBITS.REGSLP = 1;

About the key points of Pic MCU 18 series Ultra low Power software programming

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.