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 CCS Technical Support

Pic24fj16ga004 PLL and consumption

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
joseph20480



Joined: 21 Dec 2011
Posts: 42

View user's profile Send private message

Pic24fj16ga004 PLL and consumption
PostPosted: Wed Apr 20, 2022 6:01 am     Reply with quote

dear every one,

I have some difficulty with my pic and the pll.
At 8Mhz (no pll) > Consumption OK
At 32Mhz, my consumption is more 30mA !!!


My pic : pic24fj64ga004
Frequency Clock : 32Mhz with PLL.

Code:

#fuses FRC_PLL,NOWDT,NOPROTECT,NODEBUG,NOJTAG
#use delay(clock=32M)


Code:

void main (void)
{   
   
   for(;;){}
}


please tell me if you see something wrong, i'm little confuse ...
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Wed Apr 20, 2022 6:46 am     Reply with quote

You have to ensure that all unused peripherals are turned off. Your current consumption will fall as you find and kill these overlooked current draws.
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Wed Apr 20, 2022 7:21 am     Reply with quote

Agreed, you are probably making it worse with all the stuff floating,
But that is a price you pay for speed. The data sheet tells you that the
core current of the chip can be up to about 20mA at 32MHz, only about
a quarter of that at 8MHz. TANSTAAFL in performance terms... Sad
Turning off the unused stuff and making sure the pins are not floating, should
save perhaps 30%, but it is going to draw more as you go faster.

You are making the consumption slightly worse with your clock setup. Change
to:
Code:

#include <24FJ16GA004.h>

#fuses NOWDT,NOPROTECT,NODEBUG,NOJTAG
#use delay(INTERNAL=32M)


By default your current setup will be enabling the oscillator output, which
means a pin running fast, and drawing quite a noticeable extra current.
temtronic



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

View user's profile Send private message

PostPosted: Wed Apr 20, 2022 7:29 am     Reply with quote

One of those 'speed kills' things.

Static CMOS consumes very,very little power,with proper pullups.

Active CMOS consumes power ,based upon speed and/or 'transactions' (0/1/0/1/...).

Going from 8MHz to 32MHz is X4, so I'd expect X4+- increase in current. it's a simple 'math' thing.

Now you're also using the PLL, so additional power is needed to run that.

It's just the 'nature of the beast'....

Since you're concerned about power, I assume you're battery powered ?
Now there are 'tricks', some already mentioned. Another is 'waking up, run fast, then sleep'. How fast depends on what needs to be done. Or you can vary the speed.
joseph20480



Joined: 21 Dec 2011
Posts: 42

View user's profile Send private message

PostPosted: Wed Apr 20, 2022 9:24 am     Reply with quote

temtronic wrote:
One of those 'speed kills' things.

Static CMOS consumes very,very little power,with proper pullups.

Active CMOS consumes power ,based upon speed and/or 'transactions' (0/1/0/1/...).

Going from 8MHz to 32MHz is X4, so I'd expect X4+- increase in current. it's a simple 'math' thing.

Now you're also using the PLL, so additional power is needed to run that.

It's just the 'nature of the beast'....

Since you're concerned about power, I assume you're battery powered ?
Now there are 'tricks', some already mentioned. Another is 'waking up, run fast, then sleep'. How fast depends on what needs to be done. Or you can vary the speed.



Thanks for all reply !
So nothings to do... bad luck... :-)
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Wed Apr 20, 2022 10:46 am     Reply with quote

Yes, and no, you should be able to reduce it quite a bit by making sure you
have no pins floating, and turning off the peripherals you don't want. The
data sheet figure at 32MHz is about 20mA.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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