lnzsy
Newbie level 3
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
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