Im developing some project and project will work with battery so sleep mode is important for me. Im putting pic16F1824 to sleep mode and it takes 25 uA still but datasheet tells 20nA. is it correct ?
That headline 20nA figure is for a 16LF part not the 16F. The sleep mode current for the 'F' part is typically 20uA at 3 volts. If the Brown-Out-Reset (BOR) is enabled that takes it to 24uA.
The section quoted below is from the 16F1934/6/7 datasheet. I believe the LDO regulator is also present in other enhanced mid-range 16F1xxx parts and would explain the higher base sleep current in the 'F' part.
8.0 LOW DROPOUT (LDO)
VOLTAGE REGULATOR
The PIC16F1934/6/7 has an internal Low Dropout
Regulator (LDO) which provides operation above 3.6V.
The LDO regulates a voltage for the internal device
logic while permitting the VDD and I/O pins to operate
at a higher voltage. There is no user enable/disable
control available for the LDO, it is always active. The
PIC16(L)F1934/6/7 operates at a maximum VDD of
3.6V and does not incorporate an LDO.