I need to get current consumption to a minimum. I think I am handling all the I/O pins correctly (set all ports to outputs and drive the pins high or low depending on what is attached to each pin).

When I end the routine with a PAUSE 30000 the current draw drops to 630 uA of which 2 uA should be the peripherals and the balance the PIC.

When I end the routine with SLEEP 30 the current drops to 3 uA - fabulous but unusable because I did not enable the WDT when I burnt the bootloader into the '877A. The system never recovers from sleep but the curent is delightfully low. PortB weak pullups are OFF.

What tricks can anyone suggest to minimise current draw? I am very surprised the draw is way above the makers claim of under 10 uA.

MinimisePower2:
TRISA = %00000000
TRISB = %00000000
TRISC = %00000000 '
TRISD = %00000000
TRISE = %00000000
porta = 255
portb = $CF ' disable MicPwr and PressPwr with a LOW
portc = 255
portd = 255
ADCON0 = %00000000 ' no ADC enabled
ADCON1 = %00000111 ' nil effect if all 0 'all porta set to Digital
CMCON = %00000000
OPTION_REG = %11111111 '
INTCON = %00000000 '
T1CON = %00000000
T2CON = %00000000
CCP1CON = %00000000
TXSTA = %00000000
RCSTA = %00000000

'sleep 30
pause 30000 'MUST MUST MUST have WDT enabled to use SLEEP
goto start

Cheers
Brian