natraj20
Member level 3
Hello guys,
I could get into sleep mode and Ultra low power wake up mode in PIC 18F47J53 controller but couldnt make work the Deep sleep mode. The following was done to enable the deep sleep mode.
IDLEN = 0; // (OSCCON<7>)
DSEN = 1; // (DSCONH<7>)
Sleep();
It is the exact implementation as the normal mode except for the setting of Deep Sleep Enable bit in the Deep Sleep Control High Byte register. I could not figure out if this goes to sleep mode coz no interrupt wakes the processor except for the Reset switch (MCLR). Is there any configuration bits needs to be set specifically for the deep sleep mode ?? I am not looking on the separate WDT or BOR of the Deep Sleep. I just want to wake the processor with an external interrupt. And one more question is, after deep sleep, it was given that the processor will goto Power on Reset (POR) and the execution will start from the reset's vector, but will retain the I/O port values. I could not get this coz if it is capable of retaining the value and starting the code from the reset's vector address, then will the same code will be executed again and again from the start of the code to the execution point at the deep sleep mode ??
Thanks in advance!!
I could get into sleep mode and Ultra low power wake up mode in PIC 18F47J53 controller but couldnt make work the Deep sleep mode. The following was done to enable the deep sleep mode.
IDLEN = 0; // (OSCCON<7>)
DSEN = 1; // (DSCONH<7>)
Sleep();
It is the exact implementation as the normal mode except for the setting of Deep Sleep Enable bit in the Deep Sleep Control High Byte register. I could not figure out if this goes to sleep mode coz no interrupt wakes the processor except for the Reset switch (MCLR). Is there any configuration bits needs to be set specifically for the deep sleep mode ?? I am not looking on the separate WDT or BOR of the Deep Sleep. I just want to wake the processor with an external interrupt. And one more question is, after deep sleep, it was given that the processor will goto Power on Reset (POR) and the execution will start from the reset's vector, but will retain the I/O port values. I could not get this coz if it is capable of retaining the value and starting the code from the reset's vector address, then will the same code will be executed again and again from the start of the code to the execution point at the deep sleep mode ??
Thanks in advance!!