sleep problem help plz >>>.


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    66

    Default sleep problem help plz >>>.

    hello . im runing this coge example in pic 16f913, and when it goes to sleep it still runing on 3mA i need help bcz the datasheet says it sleep mode must be 3 uA . im sure there things wrong i didnt set and i want it not to reset the program when wakeup or durinf sleep.thank you
    Code:
    Include "modedefs.bas"
    
    DEFINE CONFIG_WORD_$3F31 
    DEFINE INT_OSC 8
    WDTCON.0 = 0
    OPTION_REG = %00000001  
    ADCON0 = 0
    OSCCON.6 = 7
    intcon = 0		
    vrcon = 0
    PORTB =%00000001
    PORTA = 0
    PORTC = 0
    TRISB = %00000001
    G VAR BYTE
    H VAR BYTE 
    L VAR BYTE 
    K VAR BYTE
    NOTE VAR BYTE
    BUZ VAR PORTB.3
    
    MAIN:
    G = G + 1
    IF G => 30 THEN  slp
    HIGH PORTB.1
    PAUSE 100
    IF PORTB.0 = 0 THEN SLP
    LOW PORTB.1
    PAUSE 1000
    IF PORTB.0 = 0 THEN SLP
    GOTO MAIN
    
    SLP:
    SOUND BUZ,[126,3,00,4,126,3,00,4,126,3,00,4,126,3,00,40,120,6,00,8,124,6,00,10,120,6,00,8,124,6]
    OPTION_REG =%00000001
    PAUSE 100
    for  NOTE = 115 TO 127 
    SOUND BUZ,[NOTE,3]
    NEXT NOTE
    HIGH PORTB.2
    PAUSE 1000
    LOW PORTB.2
    INTCON.0 = 0 'RBIF
    INTCON.3 = 1   'RBIE
    INTCON.1 = 0
    INTCON.4 = 1
    sleep 1800
    @ SLEEP 
    @ NOP
    HIGH PORTB.2
    PAUSE 1000
    LOW PORTB.2
    GOTO MAIN
    END

  2. #2
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    sorry i did mistikes , all wat i need is to put pic in sleep mode but very low current like datasheet says 2 uA im gettin 3 mA when it sleeps . plz help

  3. #3
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mus.me View Post
    sorry i did mistikes , all wat i need is to put pic in sleep mode but very low current like datasheet says 2 uA im gettin 3 mA when it sleeps . plz help
    is there any voltage regulator on your board.(7805 - 78l05)

    measure only the current off pic.

  4. #4
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by mehmetOzdemir View Post
    is there any voltage regulator on your board.(7805 - 78l05)

    measure only the current off pic.
    hi mehmetOzdemir , no im useing 3.7 battery i just think the problem in the code i dont know how to desables everythings during sleep mode. help plz

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Code:
    DEFINE CONFIG_WORD_$3F31 
    DEFINE INT_OSC 8
    Are you putting those in there for some other purpose?

    They have no effect on your PIC.
    Including setting the proper configs and OSC.
    <br>
    DT

  6. #6
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Code:
    DEFINE CONFIG_WORD_$3F31 
    DEFINE INT_OSC 8
    Are you putting those in there for some other purpose?

    They have no effect on your PIC.
    Including setting the proper configs and OSC.
    <br>
    thanks DT ive took them off but still the same problem

Similar Threads

  1. Problem with ports help plz
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 2nd August 2009, 21:51
  2. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  3. ESC problem plz help
    By al000y in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st January 2007, 10:21
  4. interupt & Sleep Problem - HELP!!
    By Santana in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd November 2004, 10:39
  5. Problem with intensity.. plz help
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th October 2004, 17:25

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts