
Originally Posted by
Gusse
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
Bookmarks