Well, I carried on trying and reread the Datasheet - It states
The power-managed Sleep mode in the PIC18F2455/2550/4455/4550 devices is identical to the legacy Sleep mode offered in all other PIC devices. It is entered by clearing the IDLEN bit (the default state on device Reset) and executing the SLEEP instruction.
I tried making IDLEN = 0 which is what I understand by clearing it - no good, BUT making IDLEN = 1 does work - at least the RTC display is updated so the PIC must be coming out of sleep with Timer 1 and is sleeping (some) as the current consumption drops from 42 mA to 26 mA. Not sure it is definitely cracked but seems to be - now to try and eek out more power consumption. I would still value wiser PIC'ers opinion though?
Any comments guys?Code:Development: lcdout $FE, $C0, "USB LP, SEC_IDLE" T0CON.7 = 0 ' Disable USBservice interrupts ' UCON.1 = 1 ' UCON not defined in PBP 2.46 @ clrf UCON ; Disable USB & detach from bus @ clrf UIE ; Mask all USB interrupts lowpower: IF dSecs = 1 THEN dSecs = 0 lcdout $FE, $02, "Time ", dec2 Hours, ":", dec2 Minutes, ":", dec2 Seconds, " " ENDIF OSCCON.7 = 1 '"Clear" IDLEN - Set surely? @ SLEEP @ NOP goto lowpower




Bookmarks