sleep problem help plz >>>.


Results 1 to 21 of 21

Threaded View

  1. #15
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Gusse View Post
    Hi there,

    Any changes that you could share applications schematics with us?
    Do you have discrete pull-ups or pull-downs connected to PIC IO's?
    Is PIC only active part of the system?

    BR,
    -Gusse-
    hello . i have pic16f913 no pull up resistance external,i have a buzzer with 2 transistor but i take them off when the pic in sleep mode i test the current still 5.9 mA in sleep mode it goes up when wake up between 32 to 65 mA, 1 bottom in portb.0 for interrupt wakeup , and 2 leds i take them off but no change .here is my code example .nothings pluged in the ic external . im confused ..?im sure something in the registers or timers i donno how to set timers
    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 'CVref circuit powered down (VREN bit)=save power 
    CMCON0=%00000111
    'WDTCON = %00010110                                                
    WDTCON.0 = 0
    WDTCON.4 = 3
    OPTION_REG.7 = 1 ' i tryed  this =0  but the same problm
    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
    LOW PORTB.4
    PAUSE 1000
    GOTO MAIN
    
    SLP:
    OPTION_REG.7=0
    'INTCON.0 = 0 'RBIF
    'INTCON.3 = 1   'RBIE  
    INTCON.1 = 0
    INTCON.4 = 1
    @ SLEEP 
    @ NOP
    PAUSE 100
    HIGH PORTB.2
    PAUSE 1000
    LOW PORTB.2
    GOTO MAIN
    END
    Last edited by Mus.me; - 15th November 2009 at 14: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