Jump to content


Photo

Help!boost C "sleep();" Not Working For Pic18Lf26K80

sleep PIC18LF boostC

3 replies to this topic

#1 Badejavu

Badejavu

    Regular

  • EstablishedMember
  • Pip
  • 27 posts
  • Gender:Male

Posted 22 January 2013 - 01:13 PM

When I call the sleep function in boost C, using mplab IDE, the PIC does not go to sleep.I have tried inline assembly as well and still the PIC does not sleep.I observed the current consumption when the sleep function is called and still no current drop. I also included the "boosts.h" and it still does not work.
Has anyone used the sleep routine and it worked? Or is this problem PIC related?

Thanks
Badejo

#2 JorgeF

JorgeF

    Super Enthusiast

  • EstablishedMember
  • PipPipPip
  • 274 posts
  • Gender:Male
  • Location:ES @ Europe, third rock from the Sun

Posted 22 January 2013 - 03:24 PM

Hi

Are you sure the PIC is not going to sleep, or is it being waken up by the watchdog or some other peripheral.
This might hapen so fast that you can see the current drop with a standard ameter.


Best regards
Jorge

#3 Reynard

Reynard

    Maniac

  • EstablishedMember
  • PipPipPipPip
  • 660 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Archery - target and field

Posted 22 January 2013 - 03:38 PM

Hi Badejo,

Are you operating a secondary clock system to save power when asleep.

If so sleep will not occur if certain timers are not enabled correctly.

Cheers

Reynard

#4 Badejavu

Badejavu

    Regular

  • EstablishedMember
  • Pip
  • 27 posts
  • Gender:Male

Posted 24 January 2013 - 05:13 PM

I am not using a secondary clock.The PIC uses the internal oscillator. The PIC can only wake up to a portb 0 interrupt, but this is not the case.It just never goes to sleep, and there are no codes after the sleep instruction this way i can detect a current drop on the ammeter…Could it be because I am using the internal oscillator?
Thanks
Badejo



Reply to this topic



  



Also tagged with one or more of these keywords: sleep, PIC18LF, boostC

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users