CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

18LF25k40 does not go into full sleep mode
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9133
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 27, 2024 9:23 am     Reply with quote

I don't use the WDT but the function of 'restart_wdt()' does imply the WDT peripheral has been 'enabled' somewhere... say 'fuses' ??

hmm.. is this powered from a battery or a PSU ?

have you disconnected ALL 'things' attached to the PIC , like the LCD module ?
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Sat Apr 27, 2024 9:33 am     Reply with quote

I disconnected the lcd and other connections, gnd and vdd. The power comes from the regulated power supply. Yes, the psu wdt is off, I deleted it from the code, no matter what I do, I cannot go below 100 uA. Does the oscillator continue to operate at 64 mhz during sleep?
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Sat Apr 27, 2024 9:38 am     Reply with quote

...

Last edited by bulut_01 on Fri May 03, 2024 10:44 am; edited 1 time in total
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Sun Apr 28, 2024 4:20 am     Reply with quote

What is your comment about this latest situation?
Does the oscillator continue to operate at 64 mhz while the mcu is sleeping? Is that why I can't go below 100uA?
temtronic



Joined: 01 Jul 2010
Posts: 9133
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Apr 28, 2024 5:15 am     Reply with quote

I had to download the datasheet.. section 6.2 says CPU clock is 'disabled',however that doesn't mean it's NOT oscillating, rather the signal is not sent to the CPU. Section 4.1 shows diagram for this.

I didn't see a 'sleep' enable on the actual OSC block, it makes sense it's always on,so there's no delay from awaking from sleep.

You'll need to read the entire chapter 6 as there's a LOT of information about what internals are still operating in 'sleep' mode !
I don't use that PIC but it seems to have a LOT of internals that need to be properly configured to get minimal power.


Begs the question, why are you concerned as you're running off a 'mains' PSU ?
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Sun Apr 28, 2024 5:54 am     Reply with quote

@temtronic
At the circuit design stage, this remote control will work with a battery. The CR2450 will last only 150 days with this battery and 140uA sleep current. My goal is to go down to 5-10 uA levels, but no matter what I did, it didn't go below 100uA. I turned off all the peripherals. All of the peripherals from pmd0 to pmd5 are off, you can see it in the code above. Only timer0 is active, other than that, I turn off all peripherals. This processor is giving me a lot of trouble. I am making a similar circuit with 16Lf1826 sleep() ; When I do it, it goes down to nA level and it doesn't bother me. This is 18Lf25K40. I have another situation that I don't know about. The current value does not go down to nA level. I hope I was able to explain it.
temtronic



Joined: 01 Jul 2010
Posts: 9133
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Apr 28, 2024 6:13 am     Reply with quote

hmm, goto Microship's website / forum and look around there.
simple test ...change clock from 64MHz to a really slow speed,see if current goes down ?

Historically CMOS consumes power on the 'transitions' not in 'steady state'.

hmm, are weak pullups disabled ?

Only so many straws in my hay pile to pull at !!!
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Sun Apr 28, 2024 6:45 am     Reply with quote

I don't understand what you are saying, translate is making me say nonsense.
temtronic



Joined: 01 Jul 2010
Posts: 9133
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Apr 29, 2024 7:56 pm     Reply with quote

you have to reduce clock speed to reduce power also vdd if that chip has selectable vdd to the core.
bulut_01



Joined: 24 Feb 2024
Posts: 62

View user's profile Send private message

PostPosted: Wed May 01, 2024 6:23 pm     Reply with quote

Thank you to my friends who helped me. The problem is, the code below has not been added. Even if I do not use mclr, I need to configure it as input. Currently, my sleep value is 50 nA current.
set_tris_E(0XFF);
Ttelmah



Joined: 11 Mar 2010
Posts: 19255

View user's profile Send private message

PostPosted: Thu May 02, 2024 4:12 am     Reply with quote

I pointed that out in my post last Saturday.....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group