I tried to use "SLEEP xx" command for PIC12F1822.

This controller uses 31 kHz LFINTOSC as a clock for WDT. And according to the datasheet the maximum prescaler number is 1:8388608, that is about 270 seconds.

But if I set "SLEEP 1" I get about 2 second sleep period. So if I set "SLEEP 21600" I get about 12 hour sleep period.

It's very useful but I don't understand why and don't understand how I can calibrate a sleep period. It's too long to wait for 12 hours to know if the period is shorter or longer.

Could somebody help with it?