Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Deep Sleep Mode in PIC 18F

Status
Not open for further replies.

natraj20

Member level 3
Joined
Oct 28, 2010
Messages
65
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Florida
Activity points
1,769
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!!
 

Seems like it actually goes to the Deep sleep mode. I checked this with the Deep sleep flag bit - DS (WDTCON register). As per the datasheet, it should wake up with any of the following sources - MCLR (clear), Power on Reset, external interrupt int0, Deep sleep watch dog timer.
But only the MCLR pin wakes this up. I am trying to do the same with the external interrupt INT 0.
 

I'm not familiar with that chip but my "gut" says look at the
way the interrupt/IO port are configured rather than the sleep/wake functions.
If the mclr works - an interrupt miss-configuration sounds like the way to go.

jack
 

Good point Jack, but all the external interrupts work fine in the normal mode.
 

Fair enough - its just the way I'd go.

jack
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top