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.

PIC16F727 sleep mode and interrupt wake up

Status
Not open for further replies.

lnzsy

Newbie level 3
Joined
Jan 19, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
I want to put my chip to sleep mode and then wake it up through INT pin interupt. My code is as below.

int index1;
int index2;
int i=0;
TRISC = 0;
PORTC = 0x00;
INTE = 0b1;

while (1) {
for (index1=0 ; index1<64 ; index1++) {
for (index2=0 ; index2<64 ; index2++) {
}
}

i++;
if (i == 8 ) {
INTF = 0b0;
SLEEP();
i = 10;
}
RC3 ^= 0b1;
}

When it's sleeping, I apply a positive voltage at INT pin but it does not wake up. Is there something wrong with my code? By the way, I use the internal clock.

And also, when it's sleeping, does it clear all the SRAM? What if I want to use some value after waking up?

Thanks.
Nereus
 

lnzsy

Newbie level 3
Joined
Jan 19, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
Re: PIC16F727 sleep mode and interupt wake up

Does anybody know? I really appreciate the help!

Nereus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top