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.

[PIC] PIC microcontroller deep sleep mode

Status
Not open for further replies.

Engr Adnan Jafar

Newbie level 4
Joined
Jul 17, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
37
Hello everyone!
can any one advice me how to enter the PIC16f877 into deep sleep/sleep mode and to wake up from sleep/deep sleep mode using external interrrup Int0????
thanks in advance for you kind reply but please reply me with the code.
 

Show your program and we will add the necessary lines of code.
 

Hi,

Welcome to the forum.

The 887 can be put to sleep and reactivated by an external interrupt ; basic details shown in the Microchip 877 datasheet.. section, Special Functions.

To give you more details / help please let us know which Compiler you are using ?
 

Also tell, which compiler you are using?
 

thanks for your reply
I am using CCS PIC C compiler......... Dear sir can you write fewest lines to enter the pic18f458 into both sleep and deep sleep mode and to wake up it from sleep/deep sleep mode?????????????

- - - Updated - - -

actually sir i am working on PIC18F458 and i am using compiler CCS PIC C compiler
Sir my project is on TRADS bomb blaster project.... the project consists of transmitter and receiver side..........
i wanna to enter the receiver into sleep/deep sleep mode when transmitter sends no commands to the receiver.. so in normal state, i wanna to keep my receiver into sleep/deep sleep mode and it wake up only when transmitter send commands to it.... so sir kindly tell me how can i write fewest line of code for entering PIC18F458 into sleep/deep sleep mode and to wake up it using external interrup and what ever technique that you consider best...............
plz provide me just demo program as a help....
thanks
 

PIC CCS Compiler has a complete example which very much suits your requirements .. Go to the examples folder of the PIC CCS folder and open "ex_wakup.c" .. :)
 

thanks brother........................ okay sir, my problem about sleep mode is solved.... now plz tell me about deep sleep mode?????? whats the syntax for deep sleep mode?????? plz write the code in apply as a hint
 

Hello sir!
I have one project on radio base which contain PIC18F458 and other electronics attached with it. I wanna to save power so that battery lasts for longer time. i have entered the PIC18F458 into sleep mode. but microcontroller still using 28mA. Can anyone tell me that whats the problem now in my circuit. i have shutt down the other active components of electronics during sleep mode. but my project still using 28mA current. Plz give me a suggestion that whats the problem now ????
I have entered the PIC18F458 into sleep mode by following instruction

Code:
while(1)// i have used this instruction so that sleep instruction executed infinite time
{
sleep();
}

plz tell me whats the problem in my circuit
 
Last edited by a moderator:

The most popular fault with power saving modes is to keep PIOs driving a load or to have floating digital inputs. You need to consider the intended state of each PIO pin and set it respectively.

Secondly, internal functions are not necessarily deactivated by the sleep() instruction, e.g. ADC.

Finally you may have interrupts that are permanently firing due to coding errors.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top