Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4794

16f883 sleeping mode

$
0
0
Hi! How can I minimize the currentdraw in sleep mode with a 16f883? I 've disabled most of the peripherals. I use 4 MHz internal oscillator and disabled the watchdog . But in sleep currentdraw still high level(450 µA) . My goal is <5 µA is this possible and how.

Codes:

ANSEL=%00000000'all analogue ports to digital
ANSELH=%00000000'all analogue ports to digital
ADCON0.0=0'disable ADC
CM1CON0=%00000000'disable COMPARATOR 1
CM2CON0=%00000000'disable COMPARATOR 2
SSPCON=%00000000'disable SERIAL PORT
RCSTA=%00000000'disable SERIAL PORT
PCON=%00000000'disable BOR and ULPW
OPTION_REG=%00000000'disable INTERNAL PULLUPS
WPUB=%00000000'disable INDIVIDUAL PULLUPS
IOCB=%00000000'disable INTERRUPT ON CHANGE
CCP1CON=%00000000'disable ECCP1
PSTRCON=%00000000'disable PULSE STEERING MODE
T1CON=%00000000'disable TIMER1

TRISB=%11111111
TRISC=%00000000
TRISA=%00000000
porta=0
portc=0


SYMBOL BUTON0=PORTB.0
SYMBOL BUTON1=PORTB.1
SYMBOL BUTON3=PORTB.3
SYMBOL BUTON4=PORTB.4
SYMBOL BUTON5=PORTB.5
SYMBOL BUTON6=PORTB.6


main:
IF BUTON0=0 then portc.1=1
IF BUTON1=0 then portc.2=1
IF BUTON3=0 then portc.3=1
IF BUTON4=0 then portc.4=1
IF BUTON5=0 then portc.5=1
IF BUTON6=0 then portc.6=1
PORTC=%00000000
GOTO main

Viewing all articles
Browse latest Browse all 4794

Latest Images

Trending Articles



Latest Images