sleep problem help plz >>>.


Results 1 to 21 of 21

Threaded View

  1. #21
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Thumbs up

    Quote Originally Posted by Gusse View Post
    Are you sure that your PIC is not damaged?
    Sound strange that current consumption gets higher when IO's are changed to inputs. I have used this very successfully. During sleep mode, only current consumption that I can see, comes from low dropout 5V regulator.

    I think this is only way to put PIC into sleep for undefined period.
    Code:
    <code><font color="#008000">@ sleep
    </font></code>
    or
    Code:
    <code><font color="#000000"><b>ASM
        </b><font color="#008000">sleep
    </font><b>ENDASM
    </b></code>
    BR,
    -Gusse-
    morning Gusse and everyones thank you for helping me .i just wake up and foundout that pic has short of 600 ohm between vcc and gnd i changed the pic the same f913 and sleep mode down to 0.063mA ,and this is my code example thank you again everyone here trying to help .
    Code:
    Include "modedefs.bas"
    @ DEVICE WDT_OFF, PWRT_OFF,MCLR_OFF,CPD_OFF, BOD_OFF, PROTECT_OFF,INTRC_OSC_NOCLKOUT
    
    ANSEL        = %00000000 
    VRCON.7 = 1
    CMCON0=%00000111
    'WDTCON = %00010110                                                
    WDTCON.0 = 0
    WDTCON.4 = 3
    OPTION_REG.7 = 1
    ADCON0.0 = 0
    OSCCON.6 = 7
    LCDCON.4=0
    LCDCON.6=1
    LCDCON.7=0
    CMCON1 = 7	    		
    intcon = 0		
    PCON.4 = 0
    PORTB =%00000001
    TRISB = %00000001
    PORTA = 0
    TRISA = 0
    PORTC = 0
    TRISC = 0
    
    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.4
    PAUSE 100
    IF PORTB.0 = 0 THEN SLP
    LOW PORTB.4
    PAUSE 1000
    IF PORTB.0 = 0 THEN SLP
    GOTO MAIN
    
    SLP:
    OPTION_REG.7=0
    HIGH PORTB.2
    PAUSE 1000
    LOW PORTB.2
    INTCON.1 = 0
    INTCON.4 = 1
    @ SLEEP 
    @ NOP
    PAUSE 100
    HIGH PORTB.2
    PAUSE 1000
    LOW PORTB.2
    g = 0
    GOTO MAIN
    END
    Last edited by Mus.me; - 16th November 2009 at 08:26.

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